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未配置的問題


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM