Wednesday, March 4, 2009

Disabling SELINUX

sometimes i try to connect to MySQL server in CentOS 5 machine, but i have problem can't connect MySQL, i don't understand why, i feel this is coused by not opened the port off MySQl, and i don't know how to open the port, i remember firewall in linux is SElinux and this is my target to disable, with this step;
1. Open File : /etc/selinux/config
2. Change value SELINUX=enforcing to SELINUX=permissive or SELINUX=disable
3. Reboot the machine

and my server has connected.

here to disabling SELinux on Ubuntu

1.cd /boot/grub
2.vi grub.conf This will edit the grub.conf file.
3. Look for the line starting with "kernel" and add "selinux=0" at the end. The line will look similar to this:
kernel /boot/vmlinuz-2.4.20-selinux-2003040709 ro root=/dev/hda1 nousb selinux=0

Save the grub.conf file and reboot the server. Once the server has been rebooted, SELinux is disabled.


Wednesday, January 28, 2009

Automatic Tomcat Startup when system reboot on Linux

We was download the package apache-tomcat-6.0.18.tar.gz and uncompressed on /home directory. we want tomcat running automatic on startup system, with try make a script to running tomcat in init.d and make symlink on rcX.d (when X is number 0 - 6) in directory rc.d, but unsuccessfully. So I am googling and found this solution.
  1. Open /etc/rc.d/rc.local and Type this Commands
  2. export TOMCAT_HOME= /home/apache-tomcat-6.0.18/
  3. export CATALINA_HOME=$TOMCAT_HOME
  4. $CATALINA_HOME/bin/startup.sh
  5. export CATALINA_OPTS="-Xms512m-Xmx512m"
Note : Command number 5 for setting memory on tomcat

When we try restart system we are happy.... successfully...

Tuesday, January 27, 2009

Installing Java on linux

Simplify installing java on linux; that is:
  • Download the new version of JDK (jdk-6u11-linux-i586-rpm.bin when i am posting this blog) on Sun Microsystem site.
  • enter on terminal / console and type su
  • login on your linuk OS as root
  • type sh ./jdk-6u11-linux-i586-rpm.bin















  • press key (CTRL-C)
  • type yes for answer agreement
  • Wait while installation on progress









  • and done
check java version
$ java -version

if java version different from instalaion change the version with
export JAVA_HOME=/usr/java/jdk1.6.0_11
export PATH=/usr/java/jdk1.6.0_11/bin



and congrutulation ...!...