Build JEESZ distributed architecture 2 -- install Tomcat 7 (Environment preparation) and jeesztomcat7 in CentOs
Declaration: Because the runtime environment is based on the Linux system, some preliminary environment preparations are required before the framework is implemented.
Many instances of Tomcat 7 are installed in CentOs. As the post-blog serves as the native tutorial of the Framework, detailed installation records are provided here. I have downloaded Tomcat 7, ssh has been uploaded to the specified directory. The installation process is described here.
1. install tomcat
Use sshto upload the apache-tomcat-7.0.61.tar.gz file to/usr/local and perform the following operations:
[Root @ cloud/] cd/usr/local
[Root @ cloud/] tar -zxvfapache-tomcat-7.0.61.tar.gz
[Root @ cloud/] mv apache-tomcat-7.0.61 tomcat
2. start Tomcat
[Root @ cloud ~] #/Usr/local/tomcat/bin/startup. sh
Using CATALINA_BASE:/usr/local/tomcat
Using CATALINA_HOME:/usr/local/tomcat
Using CATALINA_TMPDIR:/usr/local/tomcat/temp
Using JRE_HOME:/home/Java/jdk1.7/
Using CLASSPATH:/usr/local/tomcat/bin/bootstrap. jar:/usr/local/tomcat/bin/tomcat-juli.jar
Tomcat started.
The above information indicates that the instance has been started successfully.
3. Open firewall port 8080
[Root @ cloud/] vi +/etc/sysconfig/iptables
# Add the following code
# Tomcat 1, 8080
-A input-m state -- state NEW-m tcp-p tcp -- dport 8080-j ACCEPT
4. Restart the Firewall
[Root @ cloud/] service iptables restart
5. Check whether Tomcat is installed and running. Check whether tomcat is running properly using your own server IP Address:
Http://xxx.xxx.xxx.xxx: 8080/
The tomcat System Interface is displayed, indicating that the installation is successful!
6. Stop Tomcat
[Root @ cloud ~] #/Usr/local/tomcat/bin/shutdown. sh
Using CATALINA_BASE:/usr/local/tomcat
Using CATALINA_HOME:/usr/local/tomcat
Using CATALINA_TMPDIR:/usr/local/tomcat/temp
Using JRE_HOME:/home/java/jdk1.7
Using CLASSPATH:/usr/local/tomcat/bin/bootstrap. jar:/usr/local/tomcat/bin/tomcat-juli.jar
7. View Start and Stop logs
[Root @ cloud ~] # Cd/usr/local/tomcat/logs/
[Root @ cloud logs] # ls
Catalina.2016-02-13.log catalina. out host-manager.2016-02-14.log localhost.2016-02-14.log localhost_access_log.2016-02-14.txt manager.2016-02-14.log
Catalina.2016-02-14.log host-manager.2016-02-13.log localhost.2016-02-13.log localhost_access_log.2016-02-13.txt manager.2016-02-13.log
[Root @ cloud logs] # tail-f catalina. out
Feb 14,201 6 1:25:33 AMorg. apache. catalina. core. StandardService stopInternal
INFO: Stopping service Catalina
Feb 14,201 6 1:25:33 AM org. apache. coyote. AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-8080"]
Feb 14,201 6 1:25:33 AM org. apache. coyote. AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
Feb 14,201 6 1:25:33 AM org. apache. coyote. AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8080"]
Feb 14,201 6 1:25:33 AM org. apache. coyote. AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8009"]
For more details, click the Source Code address.:Mingli
If you are interested, you can go to the ball ~ Sharing learning technologies: 2042849237
Please keep an eye on building a distributed architecture 3-installing MySQL under CentOs (Environment preparation)