1.安装java8环境,

  1. java -version // 查看java是否已安装
  2. sudo add-apt-repository ppa:openjdk-r/ppa
  3. sudo apt-get update
  4. sudo apt-get install openjdk-8-jdk

参考资料:https://www.cnblogs.com/wxishang1991/p/5662499.html
备注:此处ubantu版本为14.04,历经波折oracle版本始终无法安装成功

2.安装Jenkins

  1. wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -

打开文件/etc/apt/sources.list添加deb https://pkg.jenkins.io/debian-stable binary/
然后执行如下命令

  1. sudo apt-get update
  2. sudo apt-get install jenkins

参考资料:https://pkg.jenkins.io/debian-stable/

3.配置
打开域名:8080按照提提操作

4.启动

  1. service jenkins start
  2. service jenkins restart
  3. service jenkins stop

5.修改默认端口
/etc/default/jenkins
找到如下修改即可
HTTP_PORT=8080
页面的‘系统设置’中有个Jenkins URL,但是感觉没啥用

作者 铁血 汉子 2019年9月13日
2025/04/07/12:02:11pm 2019/9/13/12:00:48
0 1557