ubuntu 系统安装配置搭建jenkins(官方文档小结)

前端之家收集整理的这篇文章主要介绍了ubuntu 系统安装配置搭建jenkins(官方文档小结)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
  • On Debian-based distributions,such as Ubuntu,you can install Jenkins through apt-get.

  • 使用apt方式在给予debian的linux发行版上搭建jenkins;

  • Recent versions are available in an apt repository. Older but stable LTS versions are in this apt repository.

  • 最新版本的安装包可以在apt仓库中下载;

  • You need to have a JDK and JRE installed. openjdk-7-jre and openjdk-7-jdk are suggested. As of 2011-08 gcj is known to be problematic - see https://issues.jenkins-ci.org/browse/JENKINS-743.

  • 需要安装jdk环境,因为jenkins是java项目;建议安装openjdk 7以上版本;

  • Please make sure to back up any current Hudson or Jenkins files you may have.

  • 注意:备份好你之前的jenkins文件,以免丢失!!

Installation 安装

# wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
# sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
# sudo apt-get update
# sudo apt-get install jenkins

Upgrade 升级jenkins

Once installed like this,you can update to the later version of Jenkins (when it comes out) by running the following commands:

sudo apt-get update
sudo apt-get install jenkins

(aptitude or apt-get doesn’t make any difference.)这两种安装方式会有所不;

  • What does this package do? jenkins安装包会执行一下操作;

  • Jenkins will be launched as a daemon up on start. See /etc/init.d/jenkins for more details. 启动一个守护进程;

  • The ‘jenkins’ user is created to run this service. 创建一个jenkins用户来允许jenkins服务(这个在使用jenkins的docker镜像时要注意,因为docker默认用root用户,所以需要docker run -u ‘jenkins_uid’ xxxx );

  • Log file will be placed in /var/log/jenkins/jenkins.log. Check this file if you are troubleshooting Jenkins.
    /etc/default/jenkins will capture configuration parameters for the launch like e.g JENKINS_HOME

  • By default,Jenkins listen on port 8080. Access this port with your browser to start configuration.默认监听在8080端口,如果你机器上的8080端口被占用你可以按照下面的方式配一个没有占用的端口给jenkins服务;
    If your /etc/init.d/jenkins file fails to start jenkins,edit the /etc/default/jenkins to replace the line
HTTP_PORT=8080  #默认

by

HTTP_PORT=8081  #修改位8081 当然你也可以配置其他空闲端口;

Here,8081 was chosen but you can put another port available.

更进一步的配置可以在官方文档中查阅;建议查阅官方文档,好多百度的东西容易误导!!

官方文档

https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu
https://wiki.jenkins-ci.org/display/JENKINS/Use+Jenkins

原文链接:https://www.f2er.com/ubuntu/355454.html

猜你在找的Ubuntu相关文章