yum -y install? tomcat? 只安裝了主要組件所以沒有歡迎頁
yum list available tomcat*? ?發(fā)現(xiàn)還要很多其它相關(guān)組件沒有安裝于是改成下面的命令重新安裝
yum -y install? tomcat*?
一定要帶*號安裝所有關(guān)聯(lián)項目否則會出現(xiàn)服務(wù)啟動成功打不開歡迎頁的問題
默認(rèn)安裝路徑為 /usr/share/tomcat/
修改端口等配置文件?/usr/share/tomcat/conf/server.xml
防火墻開啟默認(rèn)的 8080端口后,reload 刷新防火墻設(shè)置
firewall-cmd --add-port=8080/tcp --permanent
firewall-cmd? --reload
# 啟動 tomcat
systemctl start tomcat
# 查看運行狀態(tài)
systemctl status tomcat
# 最后訪問網(wǎng)頁應(yīng)該就出現(xiàn)歡迎頁面了
http://192.168.225.128:8080/
參考鏈接:
https://developer.aliyun.com/article/712866