官网教程
https://www.jenkins.io/doc/book/installing/linux/#debianubuntu
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
过程中使用到的其他命令
jenkins --version
java --version
netstat -tuln | grep 8080
vim /usr/lib/systemd/system/jenkins.service
systemctl daemon-reload
systemctl start jenkins
systemctl status jenkins
sudo ufw allow 8081
netstat -tuln | grep 8081
ps aux | grep jenkins