How to really switch your Mom to Linux

Filed Under (Crazyness) by jc on 10-03-2008

Tagged Under : , ,

I was reading this article on debiantutorials.org (http://www.debiantutorials.org/content/view/224/1/) and I thought it was pretty interesting.

He makes some good points (and some silly ones :]) on how to rescue her from the evils of Micro$oft. The real secret is to make it simple and functional. He used a Debian box, replaced some of her Windows programs with web applications, and what he could not replace, he just distracted her with some silly games! :)

My only question is: “How do you make you grandmother switch to Linux?” Can you do it yourself or does your mom have to do it?

More power to open source software,

JC

Mac vs PC vs Linux – South Park Style

Filed Under (Crazyness) by jc on 09-03-2008

Tagged Under : , ,

Watched this video on You Tube today could not stop laughing.

Enjoy!

Using find with mtime

Filed Under (Commands, Scripting) by jc on 02-03-2008

Tagged Under : , ,

The ‘find’ command is a very powerful search tool in UNIX systems. The mtime option comes in very handy when I am trying to troubleshoot a problem, automate tasks or do forensics. Below are some examples:

Finding all files owned by apache modified in the last 3 days within /var/www/html:

find /var/www/html -type f -user apache -mtime -3


Finding all files that were modified 3 days ago or before in the current directory:

find . -type f -mtime +3


Deleting all files in the current directory older than (modified before) 100 days:

find . -type f -mtime +100 -exec rm -f '{}' \;

Global Variables in mySQL

Filed Under (Databases) by jc on 20-02-2008

Tagged Under : , , ,

Here is how to set some global variables in mySQL on the fly without having to restart the service.

To increase max_connections from 100 to 250 for example, run

mysql> set global max_connections=250;

Check using

mysql> show global variables;

Make sure to add it to /etc/my.cnf if you want the change to persist across restarts.

Tomcat 6 Intall

Filed Under (Installations, Web) by jc on 19-02-2008

Tagged Under : , , , , ,

This is a step by step stand alone installation of Tomcat 6

JDK Install:

fetch JDK @ http://java.sun.com/

# sh jdk-6u4-linux-i586-rpm.bin
accept license

set java home and path:

# JAVA_HOME=/usr/java/jdk1.6.0_04/
# export JAVA_HOME
# PATH=$JAVA_HOME/bin:$PATH
# export PATH
# which java

Make it happen at boot time:

# cd /etc/profile.d
# vi
/etc/profile.d/jdk.sh

add the following lines to jdk.sh:

export JAVA_HOME=/usr/java/jdk1.6.0_04/ #(or the the location to java home if different)
export PATH=$JAVA_HOME/bin:$PATH

Installing Tomcat From Binary:

wget http://www.signal42.com/mirrors/apache/tomcat/tomcat-6/v6.0.16/bin/apache-tomcat-6.0.16.tar.gz
Untar:

# tar -zxvf apache-tomcat-6.0.16.tar.gz

Move it to /opt/ or desired location
# mv apache-tomcat-6.0.16 /opt/

For security, lets make it run under a underprivileged user:
# useradd tomcat -d /opt/apache-tomcat-6.0.16/temp/

Adjust permissions:
# chown -R tomcat:tomcat /opt/apache-tomcat-6.0.16/

Test install
[root@localhost opt]# sudo -u tomcat /opt/apache-tomcat-6.0.16/bin/startup.sh

or use startup script:

#vi /etc/init.d/tomcat

use the following script:

http://www.linuxzone.org/scripts/tomcat.txt

Add it to chkconfig and turn it on:

# chkconfig --add tomcat
# chkconfig tomcat on

That is it! Let me know if missed anything.