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.
- Open /etc/rc.d/rc.local and Type this Commands
- export TOMCAT_HOME= /home/apache-tomcat-6.0.18/
- export CATALINA_HOME=$TOMCAT_HOME
- $CATALINA_HOME/bin/startup.sh
- export CATALINA_OPTS="-Xms512m-Xmx512m"
Note : Command number 5 for setting memory on tomcat
When we try restart system we are happy.... successfully...