젠킨스는 yum 리포지터리를 추가한 후에 yum명령어로 설치할 수 있다.
yum(Yellodog Update Modified)이란?
: 레드햇 계열의 리눅스 배포판에서 사용하는 프로그램(패키지) 설치 관리 도구
1) wget 설치
sudo yum -y install wget
: yum 리포지터리를 추가하기 위해 wget 명령어로 젠킨스 설치파일을 다운로드한다.
wget 은 웹서버로부터 콘텐츠를 가져오는 프로그램
CentOS는 wget 이 없으므로 wget 부터 설치한다.
>실행결과
[insight@instance-1 /]$ sudo yum -y install wget
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.kakao.com
* epel: ftp.iij.ad.jp
* extras: mirror.kakao.com
* updates: mirror.kakao.com
Resolving Dependencies
--> Running transaction check
---> Package wget.x86_64 0:1.14-18.el7_6.1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================
Package Arch Version Repository Size
======================================================================================================================
Installing:
wget x86_64 1.14-18.el7_6.1 base 547 k
Transaction Summary
======================================================================================================================
Install 1 Package
Total download size: 547 k
Installed size: 2.0 M
Downloading packages:
wget-1.14-18.el7_6.1.x86_64.rpm | 547 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : wget-1.14-18.el7_6.1.x86_64 1/1
Verifying : wget-1.14-18.el7_6.1.x86_64 1/1
Installed:
wget.x86_64 0:1.14-18.el7_6.1
Complete!
2) 젠킨스 설치파일 다운로드
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
>실행결과
[insight@instance-1 /]$ sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
--2022-06-06 15:15:04-- https://pkg.jenkins.io/redhat-stable/jenkins.repo
Resolving pkg.jenkins.io (pkg.jenkins.io)... 151.101.2.133, 151.101.66.133, 151.101.130.133, ...
Connecting to pkg.jenkins.io (pkg.jenkins.io)|151.101.2.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 85
Saving to: ‘/etc/yum.repos.d/jenkins.repo’
100%[============================================================================>] 85 --.-K/s in 0s
2022-06-06 15:15:04 (6.10 MB/s) - ‘/etc/yum.repos.d/jenkins.repo’ saved [85/85]
[insight@instance-1 /]$ sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
3) yum을 이용하여 젠킨스 설치
sudo yum -y install jenkins
>실행결과
[insight@instance-1 /]$ sudo yum -y install jenkins
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.kakao.com
* epel: ftp.iij.ad.jp
* extras: mirror.kakao.com
* updates: mirror.kakao.com
Resolving Dependencies
--> Running transaction check
---> Package jenkins.noarch 0:2.332.3-1.1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================
Package Arch Version Repository Size
======================================================================================================================
Installing:
jenkins noarch 2.332.3-1.1 jenkins 90 M
Transaction Summary
======================================================================================================================
Install 1 Package
Total download size: 90 M
Installed size: 91 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
jenkins-2.332.3-1.1.noarch.rpm | 90 MB 00:00:04
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : jenkins-2.332.3-1.1.noarch 1/1
Verifying : jenkins-2.332.3-1.1.noarch 1/1
Installed:
jenkins.noarch 0:2.332.3-1.1
Complete!
4) 젠킨스 설치 완료 확인
rpm -qa | grep jenkins
>실행결과
[insight@instance-1 /]$ rpm -qa | grep jenkins
jenkins-2.332.3-1.1.noarch
5) 젠킨스 설정하기
: 젠킨스의 기본 포트는 8080이다. 만약 기존 서비스가 8080을 사용한다면 /etc/sysconfig/jenkins 에서 수정한다.
( /etc/sysconfig/jenkins : 젠킨스 설정파일)
jenkins 파일의 JENKINS_PORT="8080"항목 수정
[insight@instance-1 sysconfig]$ pwd
/etc/sysconfig
[insight@instance-1 sysconfig]$ vi jenkins
6)젠킨스 실행
sudo systemctl start jenkins
'공부 > ETC' 카테고리의 다른 글
Git 구조/용어정리 (0) | 2022.03.28 |
---|