+5 votes
357 views
How to install Jenkins CentOS 8

in Linux / Unix by (552k points)
reopened | 357 views

1 Answer

+3 votes
Best answer

1. Install Java Cent0S 8
2. Add Jenkins repository in CentOS 8
3. Install Jenkins on CentOS 8
4. Open Jenkins in CentOS 8

There are utilities developed to help have centralized control of a system or a project within that system, these must be reliable, secure and robust, for this reason we find in Jenkins a complete solution to manage projects on Linux systems, in this case we speak of CentOS 8..

 

What is Jenkins
Jenkins is an open source automation server in which numerous plugins are integrated that allow you to develop, implement or automate a project.

 

One of its advantages is that it can be installed through the packages and repositories of the native operating system or using Docker, additionally its operation is practical if it is run independently on a computer that has Java Runtime Environment (JRE).

 

Jenkins runs as a standalone application through its respective process through the integrated Java servlet container / application server (Jetty) or it can be run in containers such as Java, Apache Tomcat, etc..

 

 

Jenkins requirements
The basic requirements to use Jenkins are:

 

  • 256 MB RAM
  • 1 GB of hard disk space, ideally 10 GB if we are going to use Jenkins as a Docker container

 

For management through the software interface, the following is required:

 

  • Java: Java 8 in 32- and 64-bit versions, Java 11 runtime (for Jenkins 2.164 and 2.164.1), Java 9, 10 and currently Java 12 is not supported
  • Web browsers like Chrome, Edge, Firefox or Safari are supported
  • Policy support required for Windows

 

 

Let's see how to install Jenkins on CentOS 8.

 


1. Install Java Cent0S 8

 

Step 1

We must have Java JRE 8 or Java 11 for Jenkins to work correctly, for this (Java 11) we are going to execute the following command:
 dnf  install   java   -11  -openjdk-devel 
image

 

Step 2

After this analysis we confirm the download of the packages and installation by entering the letter S:

 

 

image

 

Step 3

At the end of the process we will see the following:

 

image

 

Step 4

We check the Java version with the following command:
 java -version 
image

 

 


2. Add Jenkins repository in CentOS 8

 

Step 1

Jenkins is not available in the CentOS 8 repositories, so we must add the repository manually, for this we execute:
 rpm -  import  https:  //pkg.jenkins.io/redhat-stable/jenkins.io.key  
image

 

 

Step 2

We attach the repository with the following command:
  cd  /etc/yum.repos.d/ curl -O https://pkg.jenkins.io/redhat-stable/jenkins.repo 
image

 

 


3. Install Jenkins on CentOS 8

 

Step 1

We install Jenkins with the following command:
 dnf  install  Jenkins 
image

 

 

Step 2

We enter the letter s to confirm the process and when it is finished we will see the following:

 

image

 

 

Step 3

Now we start the Jenkins service and see its current state:
 systemctl  start  jenkins systemctl  status  jenkins 
image

 

 

Step 4

The next step is to configure the firewall to allow access to Jenkins port 8080, in this case we execute the following:
 firewall-cmd -  add  -port =  8080  / tcp --permanent firewall-cmd –reload 
image

 

 


4. Open Jenkins in CentOS 8

 

Step 1

We go to one of the supported browsers and enter the following syntax:
 http:  // Server_IP: 8080  
Step 2

First, we will see the following:

 

 

image

 

 

Step 3

We can see that it requests that we enter the password generated by the application, to access it we go to CentOS 8 and execute:
 cat /  var  / lib / jenkins / secrets / initialAdminPassword 
image

 

 

Step 4

We enter this password in the respective field in the browser:

 

image

 

 

Step 5

We click on "Continue" and we will see the following:

 

image

 

 

Step 6

We click on the option “Install suggested plugins” and the installation process of each of the add-ons will proceed:

 

image

 

 

Step 7

We can see the progress of the installation:

 

image

 

 

Step 8

When this process has finished we must enter:

 

  • Administrator user name
  • Password
  • Full name
  • Mail

 

 

image

 

 

Step 9

We click on "Save and Continue" and we will be directed to the configuration of the Jenkins instance. In this case, TechnoWikis recommends you leave the default value.

 

 

image

 

 

Step 10

We click on "Save and Finish" to complete the process:

 

image

 

 

Step 11

Now we will access Jenkins in CentOS 8 by clicking on "Start using Jenkins":

 

image

 

 

Step 12

Here we will have all the options to work on the appropriate projects in Jenkins.
At the next login we must access with the user that we created during the configuration process:

 

 

image

 

TechnoWikis has explained how to install and configure Jenkins on CentOS 8 to have a functional tool for project control..

 


by (3.5m points)

Related questions

+4 votes
1 answer
asked Jul 17, 2020 in Linux / Unix by backtothefuture (552k points) | 656 views
+4 votes
1 answer
asked Oct 8, 2020 in Linux / Unix by backtothefuture (552k points) | 371 views
+5 votes
1 answer
asked Sep 2, 2020 in Linux / Unix by backtothefuture (552k points) | 2k views
+3 votes
1 answer
asked Aug 13, 2020 in Linux / Unix by backtothefuture (552k points) | 1.9k views
+4 votes
1 answer
asked Jun 9, 2020 in Linux / Unix by backtothefuture (552k points) | 629 views
Sponsored articles cost $40 per post. You can contact us via Feedback

Most popular questions within the last 30 days

10,659 questions
10,791 answers
510 comments
3 users