安装环境
ubuntu 20.04 LTS
安装步骤
# Installation of Java
sudo apt update
sudo apt install fontconfig openjdk-17-jre
root@aip-slave-node:~# java --version
openjdk 17.0.8.1 2023-08-24
OpenJDK Runtime Environment (build 17.0.8.1+1-Ubuntu-0ubuntu122.04)
OpenJDK 64-Bit Server VM (build 17.0.8.1+1-Ubuntu-0ubuntu122.04, mixed mode, sharing)
# Long Term Support release jenkins
sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \
https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
/etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update
sudo apt-get install jenkins
# systemctl cat jenkins
# journalctl -u jenkins.service
# vim /lib/systemd/system/jenkins.service
###################
Environment="JENKINS_PORT=80"
AmbientCapabilities=CAP_NET_BIND_SERVICE
###################
验证
https://jenkins.example.com/
jenkins.example.com
为服务器对应IP地址
直接进入管理页面/忘记密码
进入
${JENKINS_HOME}/config.xml
删除下面内容
```xml
true
true
false
false
```