【Ubuntu 18.04.1 LTS/jenkins_2.204.2_all.deb安裝指南】
一、安裝JAVA
sudo apt-get install openjdk-8-jdk
二、安裝Jenkins
jenkins 安裝源在國外, 下載速度慢, 使用yum或apt 安裝時,經常會下載失敗,所以不建議用這種方法安裝。
可以從清華源下載jenkins deb安裝包,然后直接安裝即可。
1、下載deb安裝包
root@ubuntu:~# cd /var/cache/apt/archives
root@ubuntu:/var/cache/apt/archives# wget https://mirrors.tuna.tsinghua.edu.cn/jenkins/debian-stable/jenkins_2.204.2_all.deb
2、安裝
dpkg -i jenkins_2.204.2_all.deb:通過命令安裝時會報依賴包錯誤

sudo apt-get -f -y install:通過命令解決安裝包依賴問題
dpkg -i jenkins_2.204.2_all.deb:再次執行安裝命令成功

3、修改端口:root@ubuntu:/var/cache/apt/archives# vi /etc/default/jenkins

保存后重啟服務:root@ubuntu:/var/cache/apt/archives# systemctl restart jenkins.service
4、登錄
https://ip:8088(按提示操作即可)





【Ubuntu 20.04.1 LTS/jenkins 2.249.1安裝指南】
一、安裝JAVA
sudo apt-get install openjdk-11-jdk
二、安裝Jenkins
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
Then add the following entry in your /etc/apt/sources.list:
deb https://pkg.jenkins.io/debian-stable binary/
Update your local package index, then finally install Jenkins:
sudo apt-get update sudo apt-get install jenkins
The apt packages were signed using this key:
pub rsa4096 2020-03-30 [SC] [expires: 2023-03-30]
62A9756BFD780C377CF24BA8FCEF32E745F2C3D5
uid Jenkins Project <jenkinsci-board@googlegroups.com>
sub rsa4096 2020-03-30 [E] [expires: 2023-03-30]
后續動作與上面Ubuntu 18保持一致(從修改端口開始)
