service tomcat8 restart
Redirecting to /bin/systemctl restart tomcat8.service
Failed to restart tomcat8.service: Unit not found.
[root@AHDL-CVK-022 ~]#
systenctl tomcat8 status
Unknown operation 'tomcat8'.
service tomcat status
Redirecting to /bin/systemctl status tomcat.service
unit tomcat.service could not be found.
结论先说
CAS 0730P10(CVM)用的就是 tomcat8。
你报:
plaintext
Failed to restart tomcat8.service: Unit not found.
说明:systemd 里没有 tomcat8.service 单元,但 CAS 仍可用 service 脚本启停。
一、正确命令(CAS 官方标准)
bash
运行
# 查看状态
service tomcat8 status
# 重启
service tomcat8 restart
# 停止/启动
service tomcat8 stop
service tomcat8 start
不要用:
plaintext
systemctl restart tomcat8
CAS 的 tomcat8 没注册成 systemd service,只能用 service tomcat8。
二、手动启停(兜底,service 也不行时)
bash
运行
# 找到 tomcat8 路径(CAS 一般在 /usr/share/tomcat8)
find / -name catalina.sh
# 进入 bin 目录
cd /usr/share/tomcat8/bin
# 停止
./shutdown.sh
# 启动
./startup.sh
# 查看日志
tail -f /var/log/tomcat8/catalina.out
三、为什么你提示 Unit not found
CAS 0730P10 的 tomcat8 是 sysvinit 脚本,不是 systemd 单元;
所以 systemctl 找不到,只能用 service tomcat8。
四、一句话总结
CAS0730P10 用 tomcat8;只能用 service tomcat8 restart,不要用 systemctl。
暂无评论
tomcat 或 tomcat8 的独立系统服务,因此你直接使用 service 或 systemctl 命令会提示找不到该服务。1service h3c_cas_portal restart/opt/cloud/portal/tomcat/bin 目录下)1# 1. 进入 CAS Tomcat 的 bin 目录
2cd /opt/cloud/portal/tomcat/bin
3
4# 2. 先关闭 Tomcat
5./shutdown.sh
6
7# 3. 等待几秒后,再启动 Tomcat
8./startup.sh暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论