tar -zxvf apache-tomcat-7.0.57.tar.gz -C /usr/local
cd /usr/local/apache-tomcat-7.0.57/bin
sh startup.sh
查看文件内容命令:
more /usr/local/apache-tomcat-7.0.57/logs/catalina.out
通过分页的形式查看文件内容
tail -50 /usr/local/apache-tomcat-7.0.57/logs/catalina.out
ps -ef | grep tomcat
查看防火墙状态(systemctl status firewalld、firewall-cmd --state)
暂时关闭防火墙(systemctl stop firewalld)
永久关闭防火墙(systemctl disable firewalld)
开启防火墙(systemctl start firewalld)
开放指定端口(firewall-cmd --zone=public --add-port=8080/tcp --permanent)
关闭指定端口(firewall-cmd --zone=public --remove-port=8080/tcp --permanent)
立即生效(firewall-cmd --reload)
查看开放的端口(firewall-cmd --zone=public --list-ports)
sh shutdown.sh
./shutdown.sh
查看Tomcat进程,获得进程id:ps -ef|grep tomcat
执行命令结束进程 :kill -9 进程号