본문 바로가기
개발/DevOps

젠킨스 버전 업데이트하기

by leedonggeun 2022. 11. 7.

젠킨스 버전을 왜 업데이트해야할까?

젠킨스를 사용하다 보면 당연히 젠킨스의 버전이 업데이트가 필요한 경우가 옵니다.
젠킨스 자체의 취약점이 발견되어 조치될 수도 있고, UI 등의 변경이 이루어질 수 있기 때문입니다.

이제, 젠킨스의 버전 업데이트를 하는 방법을 알아봅시다.

1. 패키지 매니저(yum)를 통한 업데이트

CentOS7.9 버전 기준입니다.

yum update jenkins 명령어를 입력합니다.

[root@jenkins ~]# yum update jenkins
Loaded plugins: fastestmirror, langpacks
Determining fastest mirrors
epel/x86_64/metalink                                                                                                                                                                                              | 6.6 kB  00:00:00     
 * base: mirror.kakao.com
 * epel: ftp.riken.jp
 * extras: mirror.kakao.com
 * updates: mirror.kakao.com
base                                                                                                                                                                                                              | 3.6 kB  00:00:00     
epel                                                                                                                                                                                                              | 4.7 kB  00:00:00     
extras                                                                                                                                                                                                            | 2.9 kB  00:00:00     
jenkins                                                                                                                                                                                                           | 2.9 kB  00:00:00     
updates                                                                                                                                                                                                           | 2.9 kB  00:00:00     
(1/6): epel/x86_64/group_gz                                                                                                                                                                                       |  98 kB  00:00:00     
(2/6): epel/x86_64/updateinfo                                                                                                                                                                                     | 1.0 MB  00:00:00     
(3/6): epel/x86_64/primary_db                                                                                                                                                                                     | 7.0 MB  00:00:00     
(4/6): extras/7/x86_64/primary_db                                                                                                                                                                                 | 249 kB  00:00:00     
(5/6): updates/7/x86_64/primary_db                                                                                                                                                                                |  17 MB  00:00:00     
(6/6): jenkins/primary_db                                                                                                                                                                                         |  44 kB  00:00:01     
Resolving Dependencies
--> Running transaction check
---> Package jenkins.noarch 0:2.346.1-1.1 will be updated
---> Package jenkins.noarch 0:2.361.3-1.1 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================================================================================================================================================
 Package                                                Arch                                                  Version                                                       Repository                                              Size
=========================================================================================================================================================================================================================================
Updating:
 jenkins                                                noarch                                                2.361.3-1.1                                                   jenkins                                                 89 M

Transaction Summary
=========================================================================================================================================================================================================================================
Upgrade  1 Package

Total download size: 89 M
Is this ok [y/d/N]:

아래와 같이 젠킨스 최신 버전(LTS) 패키지를 다운로드를 하고, 설치하게 됩니다.

Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
jenkins-2.361.3-1.1.noarch.rpm                                                                                                                                                                                    |  89 MB  00:07:48     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : jenkins-2.361.3-1.1.noarch                                                                                                                                                                                            1/2 
  Cleanup    : jenkins-2.346.1-1.1.noarch                                                                                                                                                                                            2/2 
  Verifying  : jenkins-2.361.3-1.1.noarch                                                                                                                                                                                            1/2 
  Verifying  : jenkins-2.346.1-1.1.noarch                                                                                                                                                                                            2/2 

Updated:
  jenkins.noarch 0:2.361.3-1.1                                                                                                                                                                                                           

Complete!

정상적으로 Complete! 가 표시되었다면, 아래와 같이 jenkins를 시작하고, 상태 확인 시 active를 확인할 수 있습니다.

[root@jenkins ~]# systemctl start jenkins
[root@jenkins ~]# systemctl status jenkins
● jenkins.service - Jenkins Continuous Integration Server
   Loaded: loaded (/usr/lib/systemd/system/jenkins.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2022-11-07 10:50:21 KST; 6s ago
 Main PID: 14803 (java)
   CGroup: /system.slice/jenkins.service
           └─14803 /usr/bin/java -Djava.awt.headless=true -jar /usr/share/java/jenkins.war --webroot=%C/jenkins/war --httpPort=8080

Nov 07 10:50:19 jenkins jenkins[14803]: 2022-11-07 01:50:19.033+0000 [id=28]        INFO        jenkins.InitReactorRunner$1#onAttained: Augmented all extensions
Nov 07 10:50:20 jenkins jenkins[14803]: 2022-11-07 01:50:20.523+0000 [id=33]        INFO        jenkins.InitReactorRunner$1#onAttained: System config loaded
Nov 07 10:50:20 jenkins jenkins[14803]: 2022-11-07 01:50:20.915+0000 [id=32]        INFO        jenkins.InitReactorRunner$1#onAttained: System config adapted
Nov 07 10:50:20 jenkins jenkins[14803]: 2022-11-07 01:50:20.920+0000 [id=28]        INFO        jenkins.InitReactorRunner$1#onAttained: Loaded all jobs
Nov 07 10:50:20 jenkins jenkins[14803]: 2022-11-07 01:50:20.942+0000 [id=33]        INFO        jenkins.InitReactorRunner$1#onAttained: Configuration for all jobs updated
Nov 07 10:50:20 jenkins jenkins[14803]: 2022-11-07 01:50:20.980+0000 [id=50]        INFO        hudson.model.AsyncPeriodicWork#lambda$doRun$1: Started Download metadata
Nov 07 10:50:21 jenkins jenkins[14803]: 2022-11-07 01:50:21.000+0000 [id=50]        INFO        hudson.util.Retrier#start: Attempt #1 to do the action check updates server
Nov 07 10:50:21 jenkins jenkins[14803]: 2022-11-07 01:50:21.228+0000 [id=33]        INFO        jenkins.InitReactorRunner$1#onAttained: Completed initialization
Nov 07 10:50:21 jenkins jenkins[14803]: 2022-11-07 01:50:21.258+0000 [id=22]        INFO        hudson.lifecycle.Lifecycle#onReady: Jenkins is fully up and running
Nov 07 10:50:21 jenkins systemd[1]: Started Jenkins Continuous Integration Server.
[root@jenkins ~]#

젠킨스 Web PORT로 접근 시 아래와 같이 표시되고 정상적으로 업데이트 된 것을 확인할 수 있습니다!

'개발 > DevOps' 카테고리의 다른 글

Docker Swarm 환경에서 자원 할당을 해보자.  (0) 2023.01.29
Docker Swarm이란 무엇일까?  (0) 2022.11.25
Docker를 설치해보자  (0) 2022.11.24
Docker란 무엇일까?  (0) 2022.11.23
젠킨스 Jenkins  (0) 2022.11.03

댓글