First, TOMCAT7 installation configuration

Source: Internet
Author: User

1.SELINUX and Firewalls

#关闭SELINUX

Vi/etc/selinux/config

SELINUX = disabled

#防火墙

1) Turn off the firewall

Centos6.5 version

Service Iptables stop# shutting down the firewall

Chkconfig iptables off# boot does not start

CENTOS7 version

Systemctl Start Firewalld.service #启动防火墙

Systemctl Stop Firewalld.service #关闭防火墙

Systemctl Disable Firewalld.service #禁止开机启动

2) Open port

Vi/etc/sysconfig/iptables

-A input-p tcp-m state--state new-m TCP--dport 80-j ACCEPT #开启80端口

Service iptables Restart #重启防火墙生效

2.Tomcat Installation and Configuration

1) obtain the installation package;

Https://pan.baidu.com/s/1i5ln2p3

To assign permissions to the Tomcat folder

Chmod-r 755/usr/tomcat/apache-tomcat-7.0.57_linux_64bit

2) Copy Tomcat's Bin directory under Tomcat-service startup script to/etc/init.d/, rename to Tomcat

Cp/usr/tomcat/apache-tomcat-7.0.57_linux_64bit/bin/tomcat-service/etc/init.d/tomcat

3) Catalina_home and JVM parameter adjustment

Sed-i "S/\/usr\/local\/tomcat7/\/usr\/tomcat\/apache-tomcat-7.0.57_linux_64bit/g"/etc/init.d/tomcat
chmod +x/etc/init.d/tomcat
Chkconfig--add Tomcat
Chkconfig--level 345 Tomcat onsed-i "s/wrapper.java.maxmemory=768/wrapper.java.maxmemory=2048/g"/usr/tomcat/ Apache-tomcat-7.0.57_linux_64bit/bin/wrapper.conf

3. Port number Modification

Port parameter for server.xml under CONF directory (default 8080)

4. Restart Tomcat

Service Tomcat Restart

First, TOMCAT7 installation configuration

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.