Environment for Tomcat and JRE built under Linux

Source: Internet
Author: User

1. Download the Linux version of Tomcat and JRE
Tomcat Download: Http://pan.baidu.com/s/1nt7D87J;
JRE Download: Http://pan.baidu.com/s/1sj4hAVV;
After the download is complete, upload to/usr/local (directory customization)

2. Installing the JRE

#chmod u+x./jre-6u26-linux-i586-rpm.bin  Executable Permissions #./jre-6u26-linux-i586-rpm.bin

3. Install Tomcat

TAR-ZXVF APACHE-TOMCAT-6.0.39.TAR.GZMV apache-tomcat-6.0.39 Tomcat

4. Configure Environment variables

Vim. BASHRC Add export jre_home=/usr/java/jre1.6.0_26export classpath= $CLASSPATH: $JRE _home/libexport path= $JRE _home/ Bin: $PATH: $HOMR/bin or vim/etc/profile add export jre_home=/usr/java/jre1.6.0_26export classpath= $CLASSPATH: $JRE _home /libexport path= $JRE _home/bin: $PATH: $HOMR/bin

  source. BASHRC (Source/etc/profile) takes the environment variable into effect, fully or by restarting

5. Modify the default port

Vim/usr/local/tomcat/conf/server.xml change the 8080 port in the file to the desired port, such as 8081PS: Check port usage before modifying port Netstat-npa

6. Shut down the network firewall

/sbin/service iptables Stop or add 8081 port to the network firewall vim/usr/local/palladium/pldacl/sbin/iptables-a input-p TCP--dport 8081 -j ACCEPT

7. Open Tomcat Service

/usr/local/tomcat/bin/startup.sh/usr/local/tomcat/bin/shutdown.sh  Close Service

8. Visit

http://ip:8081

  Note: To shut down the network firewall before accessing

9. Add the following port access rules to the/etc/sysconfig/iptables file

-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 8081-j ACCEPT

10. Other commands

Java-version View the JRE version Ps-ef|grep Tomcat view Tomcat process echo $JRE _homechkconfig  iptables  off permanently shut down the firewall

Environment for Tomcat and JRE built under Linux

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.