centos8,启动Tomcat9 失败

centos8,启动Tomcat9 失败
使用VM装了个CentOS8,想着装个Tomcat玩一下,照着网上教程装好了,配置完了启动报错,报错的字串忘记截图了,借用下别人的

[root@CentOS8 ~]# journalctl -xe
– Defined-By: systemd
– Support: https://access.redhat.com/support

– tomcat.service 单元已结束停止操作。
11月 15 10:44:43 openbravo systemd[1]: Starting Apache Tomcat Web Application Container…
– Subject: tomcat.service 单元已开始启动
– Defined-By: systemd
– Support: https://access.redhat.com/support

– tomcat.service 单元已开始启动。
11月 15 10:44:43 openbravo systemd[14925]: tomcat.service: Failed to execute command: Permission denied
11月 15 10:44:43 openbravo systemd[14925]: tomcat.service: Failed at step EXEC spawning /opt/tomcat/bin/startup.sh>
– Subject: 进程 /opt/tomcat/bin/startup.sh 无法执行
– Defined-By: systemd
– Support: https://access.redhat.com/support

– 进程 /opt/tomcat/bin/startup.sh 无法被执行并已失败。

– 该进程返回的错误代码为 13。
11月 15 10:44:43 openbravo systemd[1]: tomcat.service: Control process exited, code=exited status=203
11月 15 10:44:43 openbravo systemd[1]: tomcat.service: Failed with result ‘exit-code’.
11月 15 10:44:43 openbravo systemd[1]: Failed to start Apache Tomcat Web Application Container.
– Subject: tomcat.service 单元已失败
– Defined-By: systemd
– Support: https://access.redhat.com/support

– tomcat.service 单元已失败。

– 结果为“RESULT”。
11月 15 10:44:43 openbravo setroubleshoot[14916]: SELinux is preventing /usr/lib/systemd/systemd from execute acce>
11月 15 10:44:43 openbravo platform-python[14916]: SELinux is preventing /usr/lib/systemd/systemd from execute acc>

                                                *****  Plugin catchall (100. confidence) suggests   **********>
                                                
                                                If you believe that systemd should be allowed execute access o>
                                                Then you should report this as a bug.
                                                You can generate a local policy module to allow this access.
                                                Do
                                                allow this access for now by executing:
                                                # ausearch -c '(artup.sh)' --raw | audit2allow -M my-artupsh
                                                # semodule -X 300 -i my-artupsh.pp

根据提示执行了命令:

                                                # ausearch -c '(artup.sh)' --raw | audit2allow -M my-artupsh
                                                # semodule -X 300 -i my-artupsh.pp

但是还是没用,查了半天资料还是没啥效果,最后想着JAVA-HOME,没配置,配置一下,结果配置了一下,再启动,就行了

在这里插入图片描述

虽然可以了,但是还没弄清楚原因,之前弄了半天结果是java-home未配置的问题

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值