Get the App
SLTechnology News&Howtos  ›  Servers  › 

Set up JEESZ distributed architecture and install Tomcat7 under 2--CentOs (environment preparation)

Shulou Source: shulou.com Published: 2022-06-02 17:39:52 10月03日 Update

Disclaimer: because the running environment is based on the Linux system, you need to do some preliminary environment preparation before doing this framework.

Many instances of Tomcat7 are installed under CentOs. Because the blog serves as the native tutorial of the framework, detailed installation records are made here. I have downloaded Tomcat7 and uploaded it to the specified directory through ssh. Here, I will explain the installation process directly.

1. Install tomcat

Upload the apache-tomcat-7.0.61.tar.gz file to / usr/local through ssh and do the following:

[root@cloud /] cd / usr/local

[root@cloud /] tar-zxvfapache-tomcat-7.0.61.tar.gz

[root@cloud /] mv apache-tomcat-7.0.61 tomcat

two。 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 message indicates that it has been started successfully.

3. Firewall opens port 8080

[root@cloud /] vi + / etc/sysconfig/iptables

# add the following code

# Tomcat 8080

-An INPUT-m state-- state NEW-m tcp-p tcp-- dport 8080-j ACCEPT

4. Restart the firewall

[root@cloud /] service iptables restart

5. Verify that the Tomcat installation is running, and check that tomcat is working properly through your own server IP:

Http://xxx.xxx.xxx.xxx:8080/

See the tomcat system interface, 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, 2016 1:25:33 AMorg.apache.catalina.core.StandardService stopInternal

INFO: Stopping service Catalina

Feb 14, 2016 1:25:33 AM org.apache.coyote.AbstractProtocol stop

INFO: Stopping ProtocolHandler ["http-bio-8080"]

Feb 14, 2016 1:25:33 AM org.apache.coyote.AbstractProtocol stop

INFO: Stopping ProtocolHandler ["ajp-bio-8009"]

Feb 14, 2016 1:25:33 AM org.apache.coyote.AbstractProtocol destroy

INFO: Destroying ProtocolHandler ["http-bio-8080"]

Feb 14, 2016 1:25:33 AM org.apache.coyote.AbstractProtocol destroy

INFO: Destroying ProtocolHandler ["ajp-bio-8009"]

For more details, please click the source address to obtain: mingli.com

Interested friends can go to the ball to share the learning skills: 2042849237

Please continue to pay attention to building a distributed architecture and installing MySQL under 3--CentOs (environment preparation)

Tags: Environment run prepare success Framework system Firewall Fire Protection distributed Architecture Code Information interest Prophase blog address instance Technology tutorial File Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn OPPO Reno Docker Redmi Microsoft