tomcat service set up

CentOS 7.6 environment
Firewall: Close
selinux: Close

Ingredients: tomcat compiled binary package surface, and the JDK
https://pan.baidu.com/s/16E3SyjuuQc3cc76GN5oSBQ

The upper half: surface mounted compiled binary paragraph jdk
extract to / usr / local /
the tar-12.0.2_linux -xf jdk-x64_bin.tar.gz -C / usr / local /

Create a soft link
ln -s jdk-12.0.2 / / usr / local / java

Open the / etc / profile file with java environment variables
(at the end of the additional content)
vi / etc / profile
JAVA_HOME = / usr / local / java
the PATH = $ JAVA_HOME / bin: $ the PATH
Export JAVA_HOME the PATH

Let the environment variables to take effect
source / etc / profile

Lower half: install Tomcat Service

And extracting the specified storage path tomcat
tar xf apache-tomcat-9.0.22.tar.gz -C / usr / local /

Create a soft link
ln -s /usr/local/apache-tomcat-9.0.22/ / usr / local / tomcat

Open the / etc / profile file with tomcat environment variables
(environment variables jdk just added to the next line)
vi / etc / profile
CATALINA_HOME = / usr / local / tomcat
Export CATALINA_HOME

The system will load this file into force
source / etc / profile

Tomcat startup script
bash /usr/local/tomcat/bin/startup.sh

Close tomcat script
bash /usr/local/tomcat/bin/shutdown.sh

View is running? OK (if not all three ports together, more than a few times to run the startup script)
8005: Tomcat own port
8009: responsible for forwarding to another program service port
8080: charge of receiving port at the entrance to the site requested by the client
[root @ testOS local ] # netstat -tnlp | grep the Java
tcp6 0 0 127.0.0.1:8005 ::: LISTEN 8802 / the Java
tcp6 0 0 ::: 8009 :::
LISTEN 8802 / the Java
tcp6 0 0 ::: 8080 ::: * LISTEN 8802 / java

Guess you like

Origin blog.51cto.com/kangxi/2428084