★ 1 Switch the user to root and start, first check the Java version (It seems that it will not work unless Java 1.7 or higher is installed)
[root@localhost ~]# java -version
openjdk version "1.8.0_222-ea"
OpenJDK Runtime Environment (build 1.8.0_222-ea-b03)
OpenJDK 64-Bit Server VM (build 25.222-b03, mixed mode)
★ 2 Add yum repository
[root@localhost ~]# wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo
--2020-10-25 13:09:38-- http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo
pkg.jenkins-ci.org (pkg.jenkins-ci.org)Is inquiring to DNS... 52.202.51.185
pkg.jenkins-ci.org (pkg.jenkins-ci.org)|52.202.51.185|:Connecting to 80...Connected.
Sent a connection request via HTTP, waiting for a response... 200 OK
length: 85
`/etc/yum.repos.d/jenkins.repo'Saving in
100%[===================================================================================================================================================>] 85 --.-K/s time 0s
2020-10-25 13:09:39 (5.16 MB/s) - `/etc/yum.repos.d/jenkins.repo'Save to[85/85]
★ 3 RPM public key installation
[root@localhost ~]# rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
[root@localhost ~]#
If it is ★ 4 ★ 3, the error "The public key of jenkins-2.249.2-1.1.noarch.rpm is not installed" will appear when installing Jenkins with yum of ★ 5 below, so import the following
[root@localhost ~]# rpm --import https://pkg.jenkins.io/redhat/jenkins.io.key
[root@localhost ~]#
★ 5 Installation of Jenkins package
[root@localhost ~]# yum -y install jenkins
Loaded plugin:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: ftp.riken.jp
* extras: ftp.riken.jp
* updates: ftp.riken.jp
Resolving dependencies
-->Performing transaction confirmation.
--->Package jenkins.noarch 0:2.249.2-1.Install 1
-->Dependency resolution finished.
Resolved the dependency
=============================================================================================================================================================================================
Package architecture version repository capacity
=============================================================================================================================================================================================
During installation:
jenkins noarch 2.249.2-1.1 jenkins 64 M
Transaction summary
=============================================================================================================================================================================================
Installation 1 package
Total capacity: 64 M
Installation capacity: 64 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
During installation: jenkins-2.249.2-1.1.noarch 1/1
During verification: jenkins-2.249.2-1.1.noarch 1/1
Installation:
jenkins.noarch 0:2.249.2-1.1
Has completed!
[root@localhost ~]#
★ 6 Standby port setting (Since it is 8080, change it to 8000 in consideration of collision of other services)
[root@localhost ~]# vim /etc/sysconfig/jenkins
---
JENKINS_PORT="8000"
---
★ 7 Service activation and start (enable seems to fail, but https://qiita.com/sawa_toru/items/d8eedef13ab66e823404 According to
[root@localhost ~]# systemctl enable jenkins
jenkins.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig jenkins on
[root@localhost ~]# systemctl start jenkins
[root@localhost ~]#
★ 8 Access with "http: // localhost: 8000" in your browser Below, you will see a screen called Unlock Jenkins where you can enter the administrator password.
★ 9 Check the initial Administrator Password below and enter it on the screen of ★ 8.
[root@localhost ~]# cat /var/lib/jenkins/secrets/initialAdminPassword
★ 10 The Customer Jenkins screen will appear, so select "install suggested plugins".
★ 11 Create First Admin User Create an admin user on the screen
★ 12 After creating a user, the following screen will appear, but proceed as it is
★ 13 Continue as it is
★ 14 The welcome screen is displayed, so it is completed once.
★ 15 Referenced articles
・ Https://qiita.com/inakadegaebal/items/b526ffbdbe7ff2b443f1 ・ Https://stackoverflow.com/questions/61344317/im-getting-error-public-key-for-jenkins-2-232-1-1-noarch-rpm-is-not-installed ・ Https://weblabo.oscasierra.net/jenkins-install-centos7/ ・ Htps: // Quiita. This m / Sawa_Take / Te ms / d8 Ede f13 A b66 E 823404
Recommended Posts