1. 权限问题直接 chmod 755 /etc/rc.d/rc.local 即可
2.本次发现问题
环境复杂造成,系统中有多个版本的JDK,导致tomcat无法启动
systemctl status rc-local.service
● rc-local.service - /etc/rc.d/rc.local Compatibility
Loaded: loaded (/usr/lib/systemd/system/rc-local.service; static; vendor preset: disabled)
Active: failed (Result: exit-code) since 二 2024-05-21 00:09:17 CST; 11s ago
Process: 8978 ExecStart=/etc/rc.d/rc.local start (code=exited, status=1/FAILURE)
5月 21 00:09:17 localhost.localdomain rc.local[8978]: which: no javac in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin)
5月 21 00:09:17 localhost.localdomain rc.local[8978]: readlink: 缺少操作数
5月 21 00:09:17 localhost.localdomain rc.local[8978]: Try 'readlink --help' for more information.
5月 21 00:09:17 localhost.localdomain rc.local[8978]: dirname: 缺少操作数
5月 21 00:09:17 localhost.localdomain rc.local[8978]: Try 'dirname --help' for more information.
5月 21 00:09:17 localhost.localdomain rc.local[8978]: ERROR:

最低0.47元/天 解锁文章
2489

被折叠的 条评论
为什么被折叠?



