Centos上搭建tomcat

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值