# rpm -qa | grep jenkins
# wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
# rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
# yum install jenkins
# rpm -qa | grep jenkins
jenkins-2.24-1.1.noarch
# ls /usr/lib/jenkins/jenkins.war
# service jenkins start
Starting jenkins (via systemctl): [ OK ]
# ps -ef | grep jenkins
jenkins 22138 1 99 20:38 ? 00:00:05 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib/jenkins/jenkins.war
--logfile=/var/log/jenkins/jenkins.log --webroot=/var/cache/jenkins/war --daemon --httpPort=8080 --debug=5 --handlerCountMax=100 --handlerCountMaxIdle=20
# netstat -anop | grep jenkins
# netstat -anop | grep 8080
tcp 0 0 :::8080
# chkconfig --list jenkins
jenkins 0:off 1:off 2:off 3:on 4:off 5:on 6:off
# chkconfig jenkins on
# chkconfig --list jenkins
jenkins 0:off 1:off 2:off 3:on 4:off 5:on 6:off
-- 포트정보는
vi /etc/sysconfig/jenkins
JENKINS_PORT="8080"
Jenkins는 “service jenkins start” 해도 되지만,
이런 경우 별도의 웹서버가 또 작동된다. (리소스 낭비)
이미 Tomcat 이 있으니까 이것으로 서비스 해보자.
# jenkins.war 파일을 Tomcat 관리 폴더로 이동 시킨다.
cp /usr/lib/jenkins/jenkins.war /home/tomcat6
# Tomcat server.xml 에 /home/tomcat6 를 추가 한다.
vi /etc/tomcat6/server.xml
-----------------------------------------------------------------------------
<Host name="jenkins.xxx.com" appBase="/home/tomcat6"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="" debug="1" />
</Host>
# 접속해 본다.
http://127.0.0.1:8080/jenkins