首页 > 其他 > 详细

Centos上搭建tomcat

时间:2019-06-28 01:53:44      阅读:99      评论:0      收藏:0      [点我收藏+]
1、查看系统版本号
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)

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

Centos上搭建tomcat

原文:https://blog.51cto.com/14015577/2413957

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!