-
Jenkins 설치(centos8 기준)CI&CD 2022. 10. 12. 17:38728x90반응형
젠킨스(jenkins) 설치방법
- centos8 OS 기준이며 package manager는 yum 으로 진행.
- yum 사용시 root 권한이 필요하므로, sudo -s 이후 진행하도록 추천.
# 1.이미 설치목록중 jenkins 있는지 확인 $ yum list installed | grep jenkins # 2.jenkins repo를 /etc/yum.repos.d/jenkins.repo 에 다운로드 $ wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo # 2-1.혹시 wget이 설치 되어있지 않았다면 아래 명령어를 통해 설치한후 다시 $ yum install wget # 3.rpm key import $ rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key # 4.jenkins 설치 $ yum install jenkins # 4-1. 혹시 jenkins 설치중 아래 에러가 발생한 경우 [MIRROR] jenkins-2.249.3-1.1.noarch.rpm: Status code: 503 for https://get.jenkins.io/redhat-stable/jenkins-2.249.3-1.1.noarch.rpm (IP: 52.167.253.43) [MIRROR] jenkins-2.249.3-1.1.noarch.rpm: Status code: 503 for https://get.jenkins.io/redhat-stable/jenkins-2.249.3-1.1.noarch.rpm (IP: 52.167.253.43) [MIRROR] jenkins-2.249.3-1.1.noarch.rpm: Status code: 503 for https://get.jenkins.io/redhat-stable/jenkins-2.249.3-1.1.noarch.rpm (IP: 52.167.253.43) [MIRROR] jenkins-2.249.3-1.1.noarch.rpm: Status code: 503 for https://get.jenkins.io/redhat-stable/jenkins-2.249.3-1.1.noarch.rpm (IP: 52.167.253.43) [FAILED] jenkins-2.249.3-1.1.noarch.rpm: No more mirrors to try - All mirrors were already tried without success The downloaded packages were saved in cache until the next successful transaction. You can remove cached packages by executing 'yum clean packages'. Error: Error downloading packages: Cannot download jenkins-2.249.3-1.1.noarch.rpm: All mirrors were tried # 4-2. jenkins.repo의 baseurl을 변경해준다. $ vi /etc/yum.repos.d/jenkins.repo # 4-3. 아래처럼 추가 해준다. #baseurl=http://pkg.jenkins.io/redhat-stable baseurl=http://pkg.jenkins-ci.org/redhat-stable # 4-4. 그리고 다시 yum update 해준뒤 4번 실행 $ yum update # jdk 설치해야 jenkis 실행가능하고, jdk 버전 확인후 진행 $ yum install java-11-openjdk-devel # 5.jenkins 설정파일 변경 $ vi /etc/sysconfig/jenkins # 6.jenkins 초기 비밀번호 확인 $ cat /var/lib/jenkins/secrets/initialAdminPassword # jenkins 시작/종료/재시작 $ service jenkis start $ service jenkis stop $ service jenkis restart
728x90반응형'CI&CD' 카테고리의 다른 글
[git/github] 깃? 깃허브? 왜 사용하지? (0) 2022.10.22