基础环境 open jdk
//添加java的ppa
sudo add-apt-repository ppa:webupd8team/java
//更新软件源
sudo apt-get update
//安装java8
sudo apt-get install oracle-java8-installer
官网
https://www.jenkins.io/doc/book/installing/linux/
安装命令:
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > \
/etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins
存在问题:
//添加密匙到系统库的时候
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
//抛出以下错误
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
解决方法:
之前在Jenkins 官网上看到有有写解决方法来着, 最近想起了去找, 找不找了. 要是谁知道可以贴一下. 谢谢.
Jenkins 命令
命令行模式
# 启动Jenkins
sudo systemctl start jenkins
# 查看Jenkins 运行状态
sudo systemctl status jenkins
# 启动 Jenkins
service jenkins start
# 重启 Jenkins
service jenkins restart
# 关闭 Jenkins
service jenkins stop
浏览器进入Jenkins,登录
http://localhost:8080/
关闭Jenkins
http://localhost:8080/exit
重启Jenkies
http://localhost:8080/restart
重新加载配置信息
http://localhost:8080/reload