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