2、查看系统服务
[root@localhost ~]# netstat -utlnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0: LISTEN 1007/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0: LISTEN 1112/master
tcp 0 0 0.0.0.0:3690 0.0.0.0: LISTEN 1340/svnserve
tcp6 0 0 :::22 ::: LISTEN 1007/sshd
tcp6 0 0 ::1:25 ::: LISTEN 1112/master
udp 0 0 127.0.0.1:323 0.0.0.0: 660/chronyd
3、安装java环境
yum install java-1.8.0-openjdk.x86_64
netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0: LISTEN 1007/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0: LISTEN 1112/master
tcp 0 0 0.0.0.0:3690 0.0.0.0: LISTEN 1340/svnserve
tcp6 0 0 :::22 ::: LISTEN 1007/sshd
tcp6 0 0 ::1:25 :::* LISTEN 1112/master
4、上传apache-tomcat安装包
mount /dev/cdrom /mnt/
yum install lrzsz
rz -y
ls
5、解压tomcat安装包
tar xzvf apache-tomcat-9.0.10.tar.gz
6、进入apache-tomcat并启动
[root@localhost ~]# cd apache-tomcat-9.0.10/bin/
[root@localhost bin]# ./startup.sh
Using CATALINA_BASE: /root/apache-tomcat-9.0.10
Using CATALINA_HOME: /root/apache-tomcat-9.0.10
Using CATALINA_TMPDIR: /root/apache-tomcat-9.0.10/temp
Using JRE_HOME: /usr
Using CLASSPATH: /root/apache-tomcat-9.0.10/bin/bootstrap.jar:/root/apache-tomcat-9.0.10/bin/tomcat-juli.jar
Tomcat started.
[root@localhost bin]# netstat -tnulp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0: LISTEN 1007/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0: LISTEN 1112/master
tcp 0 0 0.0.0.0:3690 0.0.0.0: LISTEN 1340/svnserve
tcp6 0 0 :::8080 ::: LISTEN 11949/java
tcp6 0 0 :::22 ::: LISTEN 1007/sshd
tcp6 0 0 ::1:25 ::: LISTEN 1112/master
tcp6 0 0 127.0.0.1:8005 ::: LISTEN 11949/java
tcp6 0 0 :::8009 ::: LISTEN 11949/java
udp 0 0 127.0.0.1:323 0.0.0.0: 660/chronyd
udp6 0 0 ::1:323 ::: 660/chronyd
7、关闭tomcat
./shutdown.sh
原文:https://blog.51cto.com/14015577/2413957