Linux JDK Tomcat installation

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.