In RedHatLinux, Tomcat is automatically started when it is started. 1. Set system-level environment variables: Modify the/etc/profile file [root @ localhost ~] # Add JAVA_HOME =/usr/java/jdk1.6.0 _ 12exportJAVA_HOME to the vi/etc/profile file and exit the storage disk. 2. You must set/etc/rc. d/rc. local if you want to start tomcat automatically.
In RedHat Linux, Tomcat is automatically started when it is started.
1. Set system-level environment variables:
Modify the/etc/profile file
[Root @ localhost ~] # Vi/etc/profile
Add the following to the file:
JAVA_HOME =/usr/java/jdk1.6.0 _ 12
Export JAVA_HOME
Save the disk and exit.
2. You must set the/etc/rc. d/rc. local file to automatically start tomcat upon startup.
[Root @ localhost ~] # Vi/etc/rc. d/rc. local
Add the following to the file:
JAVA_HOME =/usr/java/jdk1.6.0 _ 12
Export JAVA_HOME
/Tomcat5/bin/startup. sh (Tomcat installation path in linux)
Save disk and exit
Restart the system [root @ localhost ~] # Reboot