[LINUX] Study Note 9_Install Jenkins on CentOS7

★ 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. Snap 2020-10-25 at 13.56.49.png

★ 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". Snap 2020-10-25 at 14.02.35.png

★ 11 Create First Admin User Create an admin user on the screen Snap 2020-10-25 at 14.10.06.png

★ 12 After creating a user, the following screen will appear, but proceed as it is Snap 2020-10-25 at 14.12.37.png

★ 13 Continue as it is Snap 2020-10-25 at 14.13.52.png

★ 14 The welcome screen is displayed, so it is completed once. Snap 2020-10-25 at 14.15.25.png

★ 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

Study Note 9_Install Jenkins on CentOS7
Install Faiss on CentOS 7
Install numba on CentOS 7.2
Install Python3.4 on CentOS 6.6
Install mecab-python on CentOS
Install Chainer on CentOS 6.7
Install ImageMagick-6.2.x series on CentOS7.7
Install Python 3.8 on CentOS 7 (SCL)
Install Chrome on CentOS 7 series
Install Python 3.8 on CentOS 8 (AppStream)
Steps to install MySQL 8.0 on CentOS 8.1
raspberry pi 4 centos7 install on docker
Steps to install VirtualBox on CentOS
How to install PyPy on CentOS
How to install TensorFlow on CentOS 7
Install pip on CentOS7. Also iPython.
Install VirtualBox on CentOS 7 on VirtualBox (mac + vagrant)
[Note] Install Imagick on Amazon Linux2
How to install Maven on CentOS
Install Python on CentOS using pyenv
ROS study # 1 Install ros-noetic on ubuntu 20.04
Enable sar command on CentOS (install sysstat)
Install Mecab on Linux (CentOS) with brew
How to install Eclipse GlassFish 5.1.0 on CentOS 7
How to install Apache (httpd) on CentOS8
Personal Note Package to install on Anaconda
Install PostgreSQL from source code on CentOS
Install pyenv and rbenv on CentOS system-wide
Python study note_002
Python study note_004
CentOS8 --Install --Django
Python study note_003
Jupyter Study Note_002
Jupyter Study Note_003
CentOS8 --Install --Python3
Jupyter Study Note_007
Jupyter Study Note_005
[Note] Install wxPython 3.x on Linux Mint (Ubuntu)
Install mecab on Marvericks
Install Tensorflow on Mac
Install TensorFlow on Ubuntu
Install pyenv on mac
Install pip on Mavericks
Install Python on Pidora.
Install mongodb on termux
Install Scrapy on python3
Install docker on Fedora31
Install Ansible on Mac
Install Python on Mac
Install Python 3 on Mac
Install Plone (4.3.6) on MacOSX (10.10.3)
Install PySide2 on Ubuntu
Install gensim on Marvericks
[Note] How to give sudo authority to user on CentOS
Install Anaconda on Windows 10
Install python on windows
Install enebular-agent on Chromebook
Install pycuda on Windows10
Install aws-cli on MacPorts
Install pygraphviz on Windows 10
Install Docker on AWS