ide

Centos Apache Jenkins

C/H 2017. 3. 27. 08:30

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

# 별도 서비스 생성
service jenkins start

# Ant
yum install ant.x86_64

# 방화벽해제
iptables -I INPUT 1 -p tcp --dport 8080 -j ACCEPT
service iptables save
service iptables restart

Tomcat 설치 (필요하다면...)

# yum-plugin-priorities
yum install yum-plugin-priorities
# jpackage 6.3 설치
rpm -Uvh http://mirrors.dotsrc.org/jpackage/6.0/generic/free/RPMS/jpackage-release-6-3.jpp6.noarch.rpm

# 톰캣 설치
yum install tomcat tomcat-admin-webapps tomcat-webapps

vi /etc/sysconfig/jenkins

# 기본 포트
JENKINS_PORT="8181"
# 전체
JENKINS_LISTEN_ADDRESS="0.0.0.0"
#JENKINS_LISTEN_ADDRESS="127.0.0.1" #Proxy 사용시 로컬로만 접근하도록 변경
JENKINS_HTTPS_PORT=""

Apache Proxy

# /etc/httpd/conf.d/jenkins.conf
<VirtualHost *:80>
    ServerName jenkins.happytalk.io

    ProxyRequests Off
    ProxyPreserveHost On
    AllowEncodedSlashes NoDecode

    <Proxy *:80>
        Order deny,allow
        Allow from all
    </Proxy>

    # 톰캣으로 연결
    #ProxyPass / ajp://127.0.0.1:8181/
    #ProxyPassReverse / ajp://127.0.0.1:8181/
    ProxyPass / http://127.0.0.1:8181/
    ProxyPassReverse / http://127.0.0.1:8181/

    <Location />
        Order allow,deny
        Allow from all
    </Location>
</VirtualHost>

프록시 접근 확인

curl -iL -e http://your.reverse.proxy/jenkins/manage \
   http://your.reverse.proxy/jenkins/administrativeMonitor/hudson.diagnosis.ReverseProxySetupMonitor/test

Jenkins Unblocking

/var/lib/jenkins/secrets/initialAdminPassword

반응형

'ide' 카테고리의 다른 글

jenkins staging db newst sehll  (0) 2017.04.17
Jenkins webhook 인증없이 실행  (0) 2017.04.13
Atom Editor  (0) 2015.12.17
키보드/마우스 공유 S/W  (0) 2009.02.24
무료소프트웨어 홈페이지  (0) 2008.02.26