启动tomcat服务:sh startup.sh或./startup.sh
关闭tomcat服务:./shutdown.sh
linux 下启动tomcat
问题1:
[root@test233 bin]# sh startup.sh
Cannot find ./catalina.sh
The file is absent or does not have execute permission
This file is needed to run this program
解决办法:
给.sh文件授权
[root@test233 bin]# chmod +x *.sh
问题2:
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program
解决方法:
检查Java环境
1.上传Linux环境下的jdk
2.解压jdk文件
3.编辑.bash_profile文件 vim /root/.bash_profile
进行 :wq!强制保存
4.启动tomcat
5.测试命令
查看tomcat是否启动
6.如果还不能访问则配置防火墙。执行下面命令,重启tomcat服务
firewall-cmd --permanent --zone=public --add-port=8080/tcp
firewall-cmd --reload
firewall-cmd --zone=public --query-port=8080/tcp
7.访问