1.把压缩包放到根目录下
2.解压
tar -xvf 压缩包 -C /usr/local/
3.修改名称
mv 原名/ tomcat
4.配置tomcat为8081端口(意在知道在哪修改)
cd tomcat/config
vim server.xml
把8080改为8081
5.启动tomcat
cd /bin
./startup.sh(启动命令)
./shutdown.sh(停止命令)
查看日志命令
cd logs tail -f catalina.out
6.访问
访问不了需关闭防火墙
永久关闭 [root@localhost ~]# chkconfig iptables off
关闭所有端口chkconfig iptables --list
临时关闭 service iptables stop;
查看防火墙状态 service iptables status
这次安装使用chkconfig iptables off命令报错:找不到命令
尝试yum groupinstall base命令安装相关包之后依然不奏效
尝试使用 service iptables stop 报错Redirecting to /bin/systemctl restart iptables.service
百度之后解决:
1,安装systemctl
yum install iptables-services
2,设置开机启动:
systemctl enable iptables.service
然后用以下命令代替以上命令
-
systemctl stop iptables
-
systemctl start iptables
-
systemctl restart iptables
-
systemctl reload iptables