目录
下载jenkins
获取jenkins连接,笔者用的是centos,从国内开源代理网站获取,没有从jenkins逛网拿。
wget -O jenkins-2.319.3-1.1.noarch.rpm https://mirrors.tuna.tsinghua.edu.cn/jenkins/redhat-stable/jenkins-2.319.3-1.1.noarch.rpm --no-check-certificate
公司网络不好,等待漫长。终于下载完毕。
配置java环境
先安装jenkins依赖的java环境。
yum install -y java-1.8.0-openjdk*
安装jenkins,发现报错
解决办法,安装yum install -y daemonize,再安装jenkins
[root@host20 software]# rpm -ivh jenkins-2.319.3-1.1.noarch.rpm
warning: jenkins-2.319.3-1.1.noarch.rpm: Header V4 RSA/SHA512 Signature, key ID 45f2c3d5: NOKEY
error: Failed dependencies:
daemonize is needed by jenkins-2.319.3-1.1.noarch
[root@host20 software]# yum install -y daemonize
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package daemonize.x86_64 0:1.7.7-1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================================
Package Arch Version Repository Size
======================================================================================================================================
Installing:
daemonize x86_64 1.7.7-1.el7 centos-os 21 k
Transaction Summary
======================================================================================================================================
Install 1 Package
Total download size: 21 k
Installed size: 28 k
Downloading packages:
daemonize-1.7.7-1.el7.x86_64.rpm | 21 kB 00:00:02
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : daemonize-1.7.7-1.el7.x86_64 1/1
Verifying : daemonize-1.7.7-1.el7.x86_64 1/1
Installed:
daemonize.x86_64 0:1.7.7-1.el7
Complete!
[root@host20 software]# rpm -ivh jenkins-2.319.3-1.1.noarch.rpm
warning: jenkins-2.319.3-1.1.noarch.rpm: Header V4 RSA/SHA512 Signature, key ID 45f2c3d5: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:jenkins-2.319.3-1.1 ################################# [100%]
关闭防火墙
[root@host20 software]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2022-03-01 04:03:14 EST; 17h ago
Docs: man:firewalld(1)
Main PID: 878 (firewalld)
CGroup: /system.slice/firewalld.service
└─878 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
Mar 01 04:03:14 host20 systemd[1]: Starting firewalld - dynamic firewall daemon...
Mar 01 04:03:14 host20 systemd[1]: Started firewalld - dynamic firewall daemon.
Mar 01 04:03:14 host20 firewalld[878]: WARNING: ICMP type 'beyond-scope' is not supported by the kernel for ipv6.
Mar 01 04:03:14 host20 firewalld[878]: WARNING: beyond-scope: INVALID_ICMPTYPE: No supported ICMP type., ignoring for run-time.
Mar 01 04:03:14 host20 firewalld[878]: WARNING: ICMP type 'failed-policy' is not supported by the kernel for ipv6.
Mar 01 04:03:14 host20 firewalld[878]: WARNING: failed-policy: INVALID_ICMPTYPE: No supported ICMP type., ignoring for run-time.
Mar 01 04:03:14 host20 firewalld[878]: WARNING: ICMP type 'reject-route' is not supported by the kernel for ipv6.
Mar 01 04:03:14 host20 firewalld[878]: WARNING: reject-route: INVALID_ICMPTYPE: No supported ICMP type., ignoring for run-time.
[root@host20 software]# systemctl stop firewalld
[root@host20 software]# setenforce 0
[root@host20 software]# vim /etc/selinux/config
修改jenkin配置文件
vim /etc/sysconfig/jenkins。
启动jenkins发现有错。
修改文件夹权限后报错解决
访问