jenkins install and use

1, the installation JDK
yum install -y java

2, install jenkins

Yum repository library to add Jenkins, Jenkins will install download here.

1 wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
2 rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
3 yum install -y jenkins

If you can not install it to the official website to download jenkis rmp package, the official website address (http://pkg.jenkins-ci.org/redhat-stable/)

1 wget http://pkg.jenkins-ci.org/redhat-stable/jenkins-2.7.3-1.1.noarch.rpm
2 rpm -ivh jenkins-2.7.3-1.1.noarch.rpm

Configuring the port jenkis

 vi /etc/sysconfig/jenkins

Found modify the port number:

JENKINS_PORT = "8080" this port does not conflict can not be modified 

3, start jenkins

service jenkins start/stop/restart
  • After a successful installation Jenkins will start with the system as a daemon
  • The system will create a "jenkins" allows the user to the service, if you change the owner of the service, while the need to modify the / var / log / jenkins, / var / lib / jenkins, and / var / cache / jenkins owner
  • Boot time from / etc / sysconfig / jenkins obtain configuration parameters
  • By default, Jenkins is running on port 8080 in a browser to directly access the servicing end configuration
  • Jenkins configuration is applied to the RPM of the warehouse /etc/yum.repos.d/jenkins.repo

4, open jenkins 

Access in the browser 
for the first time will be asked to enter the initial password to enter the following figure, 
the initial password at: / var / lib / jenkins /  secrets / initialAdminPassword

Select "Install suggested plugins" to install the default plug-ins, following Jenkins will themselves to download the plug-in installation. 

 

 

yum install -y java

2, install jenkins

Yum repository library to add Jenkins, Jenkins will install download here.

1 wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
2 rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
3 yum install -y jenkins

If you can not install it to the official website to download jenkis rmp package, the official website address (http://pkg.jenkins-ci.org/redhat-stable/)

1 wget http://pkg.jenkins-ci.org/redhat-stable/jenkins-2.7.3-1.1.noarch.rpm
2 rpm -ivh jenkins-2.7.3-1.1.noarch.rpm

Configuring the port jenkis

 vi /etc/sysconfig/jenkins

Found modify the port number:

JENKINS_PORT = "8080" this port does not conflict can not be modified 

3, start jenkins

service jenkins start/stop/restart
  • 安装成功后Jenkins将作为一个守护进程随系统启动
  • 系统会创建一个“jenkins”用户来允许这个服务,如果改变服务所有者,同时需要修改/var/log/jenkins, /var/lib/jenkins, 和/var/cache/jenkins的所有者
  • 启动的时候将从/etc/sysconfig/jenkins获取配置参数
  • 默认情况下,Jenkins运行在8080端口,在浏览器中直接访问该端进行服务配置
  • Jenkins的RPM仓库配置被加到/etc/yum.repos.d/jenkins.repo

4、打开jenkins 

在浏览器中访问 
首次进入会要求输入初始密码如下图, 
初始密码在:/var/lib/jenkins/secrets/initialAdminPassword 

选择“Install suggested plugins”安装默认的插件,下面Jenkins就会自己去下载相关的插件进行安装。 

 

 

Guess you like

Origin www.cnblogs.com/edeny/p/11139374.html