【Jenkins】Ubuntu安装Jenkins

系统环境:

Ubuntu 16.0.4

2CPU,8G

1.默认Ubuntu软件包里没有Jenkins

 

2.系统里添加存储密钥

wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -

 

3.将包存储地址加到sources.list

echo deb http://pkg.jenkins.io/debian-stable binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list

 

4.更新系统存储库

apt-get update

 

5.安装Jenkins

apt-get install jenkins

 

6.启动停止查看

systemctl start jenkins
systemctl stop jenkins
systemctl status jenkins

7.新服务器安装报错,没有jdk

8.安装openjdk

apt install openjdk-9-jdk
apt install openjdk-8-jdk    #我安装的是8版本
apt install openjdk-7-jdk

9.重新安装Jenkins

apt-get install jenkins
原文地址:https://www.cnblogs.com/chy-op/p/9686519.html