linux CentOS7安装tomcat
一.安装JDK
1.获取到root管理员权限
2.$ yum install java-1.8.0-openjdk
3.$ java -version查看是否成功
二.安装tomcat
1.获取到root管理员权限
2.$ yum install tomcat
3.$ systemctl status tomcat 查看tomcat服务的状态
4.$ systemctl start tomcat 启动tomcat
5.$ systemctl stop tomcat 停止tomcat
6.$ systemctl restart tomcat 重启tomcat
7.http://localhost:8080 访问
三.防火墙
1.$ sudo systemctl status firewalld 查看防火墙状态,看到active(running)就意味着防火墙打开了
2.$ sudo systemctl stop firewalld 关闭后查看是否关闭成功,如果看到inactive(dead)就意味着防火墙关闭了
3.$ sudo systemctl start firewalld 启动防火墙
4.$ sudo systemctl disable firewalld 永久关闭防火墙