本文主要介紹Jenkins環(huán)境的搭建方法旋恼。
軟件安裝
安裝環(huán)境:Ubuntu 20.04
$sudo apt-get install default-jdk
$wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
$sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
$sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 9B7D32F2D50582E6
$sudo apt-get update
$sudo apt-get install jenkins
安裝注意:按照官方的方法井誉, 沒有 sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 9B7D32F2D50582E6
這條命令莲兢,會(huì)在 apt-get update
的地方出現(xiàn)錯(cuò)誤妄壶,導(dǎo)致后面無法進(jìn)行 apt-get install jenkins
:
......
Get:12 http://cn.archive.ubuntu.com/ubuntu focal-backports InRelease [98.3 kB]
Reading package lists... Done
W: GPG error: https://pkg.jenkins.io/debian-stable binary/ Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9B7D32F2D50582E6
E: The repository 'https://pkg.jenkins.io/debian-stable binary/ Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.