[root@57cb30d8743b /]# 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.
[root@57cb30d8743b /]# systemctl status jenkins.service
● jenkins.service - LSB: Jenkins Automation Server
Loaded: loaded (/etc/rc.d/init.d/jenkins; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2021-01-13 14:08:30 UTC; 14s ago
Docs: man:systemd-sysv-generator(8)
Process: 86 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=1/FAILURE)
Jan 13 14:08:30 57cb30d8743b systemd[1]: Starting LSB: Jenkins Automation Server...
Jan 13 14:08:30 57cb30d8743b jenkins[86]: /etc/rc.d/init.d/jenkins: line 59: /etc/init.d/func...ory
Jan 13 14:08:30 57cb30d8743b systemd[1]: jenkins.service: control process exited, code=exited...s=1
Jan 13 14:08:30 57cb30d8743b systemd[1]: Failed to start LSB: Jenkins Automation Server.
Jan 13 14:08:30 57cb30d8743b systemd[1]: Unit jenkins.service entered failed state.
Jan 13 14:08:30 57cb30d8743b systemd[1]: jenkins.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
最主要的是这行错误信息
Jan 13 14:08:30 57cb30d8743b jenkins[86]: /etc/rc.d/init.d/jenkins: line 59: /etc/init.d/func...ory
查看/etc/rc.d/init.d/jenkins: line 59
发现没有59行那个文件
[root@57cb30d8743b jdk1.8.0_161]# rpm -qf /etc/init.d/functions
error: file /etc/init.d/functions: No such file or directory
安装 initscripts
yum install initscripts
yum install initscripts
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* extras: mirror.bit.edu.cn
* updates: mirrors.163.com
Resolving Dependencies
--> Running transaction check
---> Package initscripts.x86_64 0:9.49.53-1.el7_9.1 will be installed
--> Processing Dependency: sysvinit-tools >= 2.87-5 for package: initscripts-9.49.53-1.el7_9.1.x86_64
--> Processing Dependency: iproute for package: initscripts-9.49.53-1.el7_9.1.x86_64
--> Running transaction check
....
Installed:
initscripts.x86_64 0:9.49.53-1.el7_9.1
Dependency Installed:
iproute.x86_64 0:4.11.0-30.el7 iptables.x86_64 0:1.4.21-35.el7 libmnl.x86_64 0:1.0.3-7.el7
libnetfilter_conntrack.x86_64 0:1.0.6-1.el7_3 libnfnetlink.x86_64 0:1.0.1-4.el7 sysvinit-tools.x86_64 0:2.88-14.dsf.el7
Complete!
重新启动Jenkins