Log in to the Linux server remotely using the SSH tool first
command line to look at the path, the following path is required to install the JDK and Tomcat, first copy the JDK and Tomcat program:
Cd/usr/local
Ls
Install JDK: This is the Linux version of jdk1.5, version number: Jdk-1_5_0-linux-i586-rpm.bin
(Recommended thunderbolt): Http://www.javaresearch.org/members/jross/jdk/jdk-1_5_0-linux-i586-rpm.bin
Under the directory where Jdk-1_5_0-linux-i586-rpm.bin executes the following command to install the JDK, it is actually an decompression process:
./Jdk-1_5_0-linux-i586-rpm.bin
After the decompression is complete:
Cd/usr
Ls
You can view a directory of more than one Java,
CD Java
Ls
This is the post-installation directory of the JDK.
Here I put Tomcat's home directory under/usr/local.
Tomcat found a Linux version that can be compressed into a zip format (such as Apache-tomcat-5.5.26.zip) and then executed under Linux
Unzip Apache-tomcat-5.5.26.zip
You can unzip Tomcat.
After the JDK and Tomcat are installed, you can set the environment variable in the edit ~/.BASHRC file.
CD ~
Ls-a
VI. BASHRC
if [-F/ETC/BASHRC]; Then
. /etc/bashrc
Fi
Export java_home=/usr/java/jdk1.5.0
Export classpath= $CLASSPATH: $JAVA _home/lib: $JAVA _home/jre/lib
Export path= $JAVA _home/bin: $JAVA _home/jre/bin: $PATH: $HOMR/bin
Export catalina_base=/usr/local/apache-tomcat-5.5.26
Export catalina_home=/usr/local/apache-tomcat-5.5.26
Start Tomcat under the bin directory of Tomcat
./startup.sh
Netstat–l can view ports, such as Tomcat's default 8080
Okay, here we go, we're testing.
http://Your ip:8080 is not seeing Tomcat's Web page anymore.
If you do not see it, run the following command to shut down the firewall, and if the remote connection is not connected to the other database, also first shut down the firewalls to try.
Service Iptables Stop
Turning on the firewall is
Service Iptables Start
For security reasons, you can also find the firewall's configuration file, and then add the ports on 8080 (Tomcat), 3306 (MySQL) such as remote access so that only these ports can be used, and the other is to turn on the firewall policy
This configuration Linux mainly refer to http://blog.csdn.net/domando/archive/2008/03/06/2155302.aspx This article, here to thank the author!
Installing JDK and deploying Tomcat under Linux