1.更新软件包
sudo apt update
2.jenkins是java程序需安装OpenJDK 11sudo apt install openjdk-11-jdk
3.导入存储库GPG密钥
wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
4.添加密钥后,系统将返回OK 。 然后将Debian包存储库地址附加到服务器的sources.list
sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
5.更新软件包sudo apt update
可能遇到的问题:
6.安装jenkins
apt install jenkins
1 Err:6 https://pkg.jenkins.io/debian-stable binary/ Release 2 Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate. Could not handshake: Error in the certificate verification. [IP: 146.75.114.133 443] 3 Reading package lists... Done 4 E: The repository 'https://pkg.jenkins.io/debian-stable binary/ Release' does not have a Release file. 5 N: Updating from such a repository can't be done securely, and is therefore disabled by default. 6 N: See apt-secure(8) manpage for repository creation and user configuration details.解决办法:重装
ca-certificates
sudo apt install ca-certificates
7.启动jenkins
sudo systemctl start jenkins
8.查看jenkins状态
sudo systemctl status jenkins
标签:certificate,sudo,apt,pkg,io,ubuntu,jenkins,安装
From: https://www.cnblogs.com/1-qaz/p/16748658.html