簡(jiǎn)述
我們采用Jekins作為系統(tǒng)編譯工具。
環(huán)境準(zhǔn)備
Host List
| IP Address | Hosts | Disk | Comment |
|---|---|---|---|
| 192.168.0.23 | jekins | 1TB |
OS
我們采用CentOS作為宿主機(jī)操作系統(tǒng),版本請(qǐng)升級(jí)為最新穩(wěn)定版7.6。(CentOS7即可,建議升級(jí)到最新穩(wěn)定版7.6)
升級(jí)方式,請(qǐng)參考本人的另一篇文章:http://www.itdecent.cn/p/3e3bc1f51332
并將內(nèi)核升級(jí)到最新穩(wěn)定版本4.20.
[root@localhost ~]# uname -sr
Linux 4.20.0-1.el7.elrepo.x86_64
[root@localhost ~]#
[root@localhost ~]#
安裝步驟
下載安裝Yum源
[root@localhost ~]# wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
--2019-01-10 14:55:36-- https://pkg.jenkins.io/redhat-stable/jenkins.repo
Resolving pkg.jenkins.io (pkg.jenkins.io)... 52.202.51.185
Connecting to pkg.jenkins.io (pkg.jenkins.io)|52.202.51.185|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 85
Saving to: ‘/etc/yum.repos.d/jenkins.repo’
100%[====================================================================>] 85 --.-K/s in 0s
2019-01-10 14:55:38 (1.87 MB/s) - ‘/etc/yum.repos.d/jenkins.repo’ saved [85/85]
[root@localhost ~]#
[root@localhost ~]# rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
[root@localhost ~]#
Yum安裝Jekins
[root@localhost ~]# yum install jenkins
修改JDK路徑
修改/etc/rc.d/init.d/jenkins中的JDK路徑。
[root@localhost init.d]# pwd
/etc/rc.d/init.d
[root@localhost init.d]# vi jenkins
......
candidates="
/etc/alternatives/java
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/bin/java
......
修改Jekins啟動(dòng)參數(shù)
修改/etc/sysconfig/jenkins中Jekins的相關(guān)參數(shù)。
[root@localhost ~]# vi /etc/sysconfig/jenkins