1.安装jdk
2.下载并安装jenkins
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
下载jenkins安装源
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
将jenkins安装包添加至源清单
sudo apt-get update
更新清单
sudo apt-get install jenkins
安装jenkins
安装目录:/var/lib/jenkins
日志目录:/var/log/jenkins/jenkins.log
访问地址:http://localhost:8080/
3.配置jenkins
4启动测试jenkins
sudo /etc/init.d/jenkins start --jenkins的启动
或sudo service jenkins start
sudo /etc/init.d/jenkins stop --jenkins的停止
5运行jenkins
创建jenkins,在浏览器中输入:http://localhost:8080 会提醒你输入密码
在命令界面输入 cat /var/lib/jenkins/secrets/initialAdminPassword
获得密码填入浏览器,安装插件,创建用户