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..
The basic requirements to use Jenkins are:
- 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
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
After this analysis we confirm the download of the packages and installation by entering the letter S:
At the end of the process we will see the following:
We check the Java version with the following command:
2. Add Jenkins repository in CentOS 8
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
We attach the repository with the following command:
cd /etc/yum.repos.d/ curl -O https://pkg.jenkins.io/redhat-stable/jenkins.repo
3. Install Jenkins on CentOS 8
We install Jenkins with the following command:
dnf install Jenkins
We enter the letter s to confirm the process and when it is finished we will see the following:
Now we start the Jenkins service and see its current state:
systemctl start jenkins systemctl status jenkins
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
4. Open Jenkins in CentOS 8
We go to one of the supported browsers and enter the following syntax:
http: // Server_IP: 8080
First, we will see the following:
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
We enter this password in the respective field in the browser:
We click on "Continue" and we will see the following:
We click on the option “Install suggested plugins” and the installation process of each of the add-ons will proceed:
We can see the progress of the installation:
When this process has finished we must enter:
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.
We click on "Save and Finish" to complete the process:
Now we will access Jenkins in CentOS 8 by clicking on "Start using Jenkins":
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:
TechnoWikis has explained how to install and configure Jenkins on CentOS 8 to have a functional tool for project control..