Linux test Environment Deployment Tomcat (II)

Source: Internet
Author: User
Tags gz file iptables

Installation configuration Tomcat

1: Download the latest installation package at

2: Install Tomcat

Upload the apache-tomcat-8.0.21.tar.gz file to the/usr/local to do the following: (this path is variable)
Copy Code
The code is as follows:
[Email protected] local]# cd/usr/local
[[email protected] local]# TAR-ZXVF apache-tomcat-8.0.21.tar.gz//Decompression Pack
[[email protected] local]# RM-RF apache-tomcat-8.0.21.tar.gz//Delete compressed package
[[Email protected] local]# MV apache-tomcat-8.0.21 Tomcat//renamed Tomcat

And then

Service iptables Stop shutting down the firewall

3: Start Tomcat to perform the following actions
Copy Code
The code is as follows:
[[email protected] ~]#/usr/local/tomcat/bin/ Tomcat
Using catalina_base:/usr/local/tomcat
Using Catalina_home:/usr/local/tomcat
Using Catalina_tmpdir:/usr/local/tomcat/temp
Using Jre_home:/usr/java/jdk1.7.0/jre
Using CLASSPATH:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar

The above information indicates that the message has been successfully started.

If the following error occurs:

Neither the Java_home nor the JRE_HOME environment variable is defined
At least one of these environment variable are needed to run this program

Be aware that the prerequisites also set the Java path

Add content to apache-tomcat-8.0.9/bin/

Export javahome=/opt/jdk1.8.0
Export classpath=.: $JAVAHOME/lib: $JREHOME/lib: $CLASSPATH
Export path= $JAVAHOME/bin: $JREHOME/bin: $PATH

Firewall Open 8080 Port

Add 8080 ports to the firewall configuration and do the following:
[Email protected] ~]# VI +/etc/sysconfig/iptables
-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 8080-jaccept

Restarting the firewall
[Email protected] java]# service iptables restart
Check Tomcat installation Run

See if Tomcat is working properly with the following address:
See the Tomcat system interface to show that the installation was successful!

Stop Tomcat
[[email protected] ~]#/usr/local/tomcat/bin/ Tomcat

Automatically start the Tomcat service


You can then add the following content to the text to

Service Iptables Stop

export JAVA_HOME=/usr/java/jdk1.8.0_25




Linux test Environment Deployment Tomcat (II)

Related Article

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: 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.