centos部署jenkins服务

时间:2024-11-15 16:38:07

1 添加jenkins repo源

[root@WebVirtMgrWeb ~]# wget -O /etc/yum.repos.d/jenkins.repo http://jenkins-ci.org/redhat/jenkins.repo

[root@WebVirtMgrWeb ~]# rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key

2 安装java软件

[root@WebVirtMgrWeb ~]# yum -y install java-1.8.0-openjdk.x86_64

3 安装jenkins

[root@WebVirtMgrWeb ~]# yum -y install jenkins

4 jekins的安装目录

[root@WebVirtMgrWeb ~]# cd /usr/lib/jenkins

[root@WebVirtMgrWeb jenkins]# ls
jenkins.war

5 jenkins的配置文件

[root@WebVirtMgrWeb jenkins]# vim /etc/sysconfig/jenkins

6 启动jenkins

[root@WebVirtMgrWeb jenkins]# /etc/init.d/jenkins start
Starting Jenkins [ OK ]

7 查看端口

[root@WebVirtMgrWeb jenkins]# netstat -lntp|grep java
tcp 0 0 :::45375 :::* LISTEN 2369/java
tcp 0 0 :::55589 :::* LISTEN 2369/java
tcp 0 0 :::8009 :::* LISTEN 2369/java
tcp 0 0 :::8080 :::* LISTEN 2369/java