- 자바로 만든 오픈 소스 CI 툴
- 기본적인 자바 어플리케이션 빌드 배포는 젠킨스를 많이 쓰는거 같다, 오픈소스다 보니?
설치
- 아래는 CentOS 환경에서 설치한 것
- 설치하고 http://{서버IP}:8080 접속
- 원래 기본 포트는 8080이지만 아래에선 9090으로 바꿔버림
wget -O /etc/yum.repos.d/jenkins.repo <https://pkg.jenkins.io/redhat-stable/jenkins.repo>
rpm --import <https://pkg.jenkins.io/redhat-stable/jenkins.io.key>
yum install jenkins
vi /etc/init.d/jenkins
PARAMS="--logfile=/data/log/jenkins/jenkins.log --webroot=/var/cache/jenkins/war --daemon"
# 로그 디렉토리 변경이 필요하다면 수정, 필요하지 않다면 패스해도 된다
chown -R root.root /var/lib/jenkins
chown -R root.root /data/log/jenkins
chown -R root.root /var/cache/jenkins/
vim /etc/sysconfig/jenkins
# USER명만 수정한 뒤 저장, Port도 필요하면 같이 수정
JENKINS_USER = 'root'
JENKINS_PORT="9090"
systemctl start jenkins.service
# 항상 실행할 수 있도록 세팅
service jenkins start
service jenkins stop
service jenkins restart