VMware Linux under Nginx installation configuration-Tomcat configuration (ii)

Source: Internet
Author: User

Preparatory work

1. Select Create Softs folder under/usr/local/, copy the apache-tomcat-7.0.26.tar.gz through FTP command;

2. Create a Tomcat8080 and Tomcat8090 two folders under/usr/local/;

Unzip the/softs/apache-tomcat-7.0.26.tar.gz into the local/tomcat8080;

Navigate to Softs:

Softs>tar -xzvf apache-tomcat-7.0. . tar. Gz-c/usr/local/tomcat8080

Then it will put the entire apache-tomcat-7.0.26 folder under the tomcat8080, in order to make not so many levels,

You have to copy all the files and subfolders under the apache-tomcat-7.0.26 to tomcat8080;

tomcat8080>CP -avx/usr/local/tomcat8080/apache-tomcat-7.0.  - / */usr/local/tomcat8080

Then delete the apache-tomcat-7.0.26 folder:

Tomcat8080>rm -rf apache-tomcat-7.0. ;

And then the tomcat8080 under the files and subfolders, all copied to tomcat8090 under;

Configure two or more Tomcat

1. Edit the profile file;

>VI /etc/profile

If you want to have a line number, then type: (Don't knock ' I ')

: Set Nu

The line number can be displayed;

Enter before and after the export corresponding location line:

2. Next to the second Tomcat, the Tomcat8090 bin, vi opens the CATALINA.SH input:

Export catalina_base=$CATALINA _2_baseexport catalina_home= $CATALINA _2_home

I add the following to the first while the done block of code;

If the JDK environment variable is not configured in/etc/profile, it can also be catalina.sh configured, which is configured on top of the above two sentences;

Export JAVA_HOME=/USR/JAVA/JDK1. 7 . 0_21export CLASSPATH=.: $JAVA _home/libpathmunge.: $JAVA _home/bin# or #export PATH=.: $JAVA _home/bin

3. After the configuration is complete, restart the linux:reboot;

Or:

Source/etc/profile

After the reboot is successful, enter the command:

PS -ef | grep Tomcat

Have input a large string of information out, it means that the installation is successful;

To start Tomcat: Select Test Port 8090:

cd/usr/local/tomcat8090/Binstartup. SH

The following information appears:

Indicates that Tomcat starts normally;

In the same way, start tomcat8080 Tomcat;

4. Open two websites in Windows 8080 and 8090, respectively; Webapps/root:

Select the number of virtual machine IPs:

Ifconfig
Inet after the IP address: respectively open http://xxx.xxx.xxx.xxx:8080/and http://xxx.xxx.xxx.xxx:8090 see whether normal;

Checking the firewall and shutting down the firewall

Sometimes, the Linux on the Tomcat is normally open, Windows access is not available, it is possible that Linux turned on the firewall; 1. Use:
Iptables-l# or #/usr/sbin/iptables-l

View the firewall status, if the following information indicates that the firewall is not turned on;

Chain INPUT (Policy accept) target     prot opt source               destination         Chain FORWARD (policy accept) target     prot Opt source               destination         Chain OUTPUT (policy ACCEPT) target     prot opt source               

2. Use:

Iptables-F

You can shut down the firewall;

VMware Linux under Nginx installation configuration-Tomcat configuration (ii)

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.