【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保持一致(从修改端口开始)