One, JDK installation
1. Download the installation file
jdk-6u11-linux-i586-rpm
2. Create the installation path
Mkdir/usr/java
Upload files to the installation path, I used the Upload tool is WINSCP
3. Installation
RPM-IVH jdk-6u11-linux-i586-rpm
4. Configure Environment variables
Vi/etc/profile
Add the following content
Export java_home=/usr/java/jdk1.6.0_27
Export Java_bin=/usr/java/jdk1.6.0_27/bin
Export path= $PATH: $JAVA _home/bin
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Export Java_home java_bin PATH CLASSPATH
II. TOMCAT Installation
After download good apache-tomcat-6.0.10.tar.gz, input command #tar-zxvf apache-tomcat-6.0.10.tar.gz; extract, unzip, input #cp-r apache-tomcat-6.0.10/u Sr/local/tomcat; to copy apache-tomcat-6.0.10 to/usr/local/and rename to Tomcat
Enter/usr/local/tomcat/bin/startup.sh; start Tomcat, if display Using catalina_base:/usr/local/tomcat
Using Catalina_home:/usr/local/tomcat
Using Catalina_temdir:/usr/local/tomcat/temp
Using Java_home:/usr/java/jdk1.6.0_01
That means that Tomcat is already installed and now accesses http://localhost:8080 using a browser, and the Tomcat default page indicates that the installation was successful.
Linux installs Tomcat and the local access is normal, but Tomcat cannot be accessed by the outside world need to open port 8080 on linux default fence
Open it
/etc/sysconfig/iptables
[Email protected] ~]# VI
/etc/sysconfig/iptables
At-a rh-firewall-1-input-j REJECT--reject-with
Icmp-host-prohibited This sentence above added
-A rh-firewall-1-input-p tcp-m state--state
New-m TCP--dport 8080-j ACCEPT
Restarting the firewall
[[Email protected]
sysconfig]# Service iptables Restart
Input Http://Linux
IP address: 8080/
See the Tomcat Welcome screen!
Linux JDK Tomcat installation