1.
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
2
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
3.sudo apt-get install jenkins
sudo apt-get install jenkins
4.启动:sudo /etc/init.d/jenkins start
如果启动报错:
ERROR: No Java executable found in current PATH: /bin:/usr/bin:/sbin:/usr/sbin
If you actually have java installed on the system make sure the executable is in the aforementioned path and that 'type -p java' returns the java executable path
解决方法:https://blog.youkuaiyun.com/muyeju/article/details/103426539
5.访问:http://192.168.1.142:8080/,默认是8080端口
6.修改端口:sudo vim /etc/default/jenkins,然后重启:sudo /etc/init.d/jenkins restart
7.输入密码:根据提示找到初始密码:
8.安装插件
9.创建第一个管理员账户
10.实例配置