CentOS 8 安装 jenkins 提示错误 Failed to start LSB: Jenkins Automation Server

提示错误的信息如下:

[[email protected] yhu]# systemctl start jenkins
Job for jenkins.service failed because the control process exited with error code.
See "systemctl status jenkins.service" and "journalctl -xe" for details.
[[email protected] yhu]# systemctl status jenkins.service
● jenkins.service - LSB: Jenkins Automation Server
   Loaded: loaded (/etc/rc.d/init.d/jenkins; generated)
   Active: failed (Result: exit-code) since Sun 2020-12-06 10:01:32 EST; 20s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 12315 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=1/FAILURE)

Dec 06 10:01:32 devops-norctx-com systemd[1]: Starting LSB: Jenkins Automation Server...
Dec 06 10:01:32 devops-norctx-com runuser[12322]: pam_unix(runuser:session): session opened for user jenkins by (uid=0)
Dec 06 10:01:32 devops-norctx-com runuser[12322]: pam_unix(runuser:session): session closed for user jenkins
Dec 06 10:01:32 devops-norctx-com systemd[1]: jenkins.service: Control process exited, code=exited status=1
Dec 06 10:01:32 devops-norctx-com jenkins[12315]: Starting Jenkins bash: /usr/bin/java: No such file or directory
Dec 06 10:01:32 devops-norctx-com systemd[1]: jenkins.service: Failed with result 'exit-code'.
Dec 06 10:01:32 devops-norctx-com jenkins[12315]: [FAILED]
Dec 06 10:01:32 devops-norctx-com systemd[1]: Failed to start LSB: Jenkins Automation Server.

问题和解决

这是因为你没有在你的操作系统中安装 JDK。

请单击下面的链接来在了解在 CentOS 8 上安装 JDK:CentOS 8 安装 OpenJDK 11