How to install Jenkins on CentOS 8

Jenkins is the most popular, open source, Java-based automation server, which allows you to easily set up a continuous integration and continuous release pipeline.

Continuous Integration (CI) is a DevOps practice. When team members submit code to the version control warehouse normally, automated builds and tests are run. Continuous release (CD) is a series of practices. When the code is modified, it is automatically built, tested, and released to the production environment.

This tutorial will involve some steps to install Jenkins from the official Jenkins repository on CentOS 8.

One, install Jenkins

As root or another user with sudo privileges, perform the following steps to install Jenkins on CentOS 8.

  1. Jenkins is written in Java, so the first step is to install Java. Jenkins requires the Java version to be between 8 and 11. However, some Jenkins plug-ins may not be compatible with Java 8.

We will install OpenJDK 8:

sudo dnf install java-1.8.0-openjdk-devel

If you have installed multiple versions of Java in your system, please make sure that Java 8 is the default Java version.

  1. The next step is to enable the Jenkins source repository. Run the following command to download the repo file and import the GPG key:
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo
sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
  1. Enter the following command to install the latest stable version of Jenkins:
sudo yum install jenkins

Once the installation process is complete, start the Jenkins service and enable the startup function:

sudo systemctl start jenkins
sudo systemctl enable jenkins

To check whether Jenkins is running, type:

systemctl status jenkins

The output should look like this:

Loaded:loaded(/etc/rc.d/init.d/jenkins; generated)
Active:active(running) since Thu 2019-10-3121:31:36 UTC; 3s ago
...

Second, adjust the firewall##

If you have installed Jenkins on a remote CentOS server protected by a firewall, you need to open the port number 8080.

Use the following command to open the necessary ports:

sudo firewall-cmd --permanent --zone=public--add-port=8080/tcp
sudo firewall-cmd --reload

Three, set up Jenkins

To start Jenkins setup, first open your browser, and enter the domain name or server IP address, plus the port number 8080:

http://your_ip_or_domain:8080

An interface similar to the following will appear, prompting you to enter the super administrator password created during the installation process:

Use cat to display the password in the terminal:

sudo cat /var/lib/jenkins/secrets/initialAdminPassword

You will see a 32-bit alphanumeric password, like the following:

e1bc55ea402640c58970b8db41e4f3bc

Copy the password of the terminal, paste it into the "Administrator Password" text area, and click "Continue".

On the next screen, you will be asked if you want to install the suggested plugins or choose the plugins to install yourself. Click "Install suggested plugins" and the installation process will begin.

Once the installation is complete, you will be prompted to set up the first administrator user. Fill in all required information and click "Save and Continue".

On the next page, the installer will ask you to set the address of the Jenkins instance. The URL text area is filled with an automatically generated URL.

To complete the steps, confirm the URL, and click the "Save and End" button.

Finally, click the "Start using Jenkins" button, and you will be redirected to the Jenkins backend (the backend you logged in with the administrator account created in the previous step).

If you get here, you have successfully installed Jenkins on your CentOS system.

Four, conclusion##

In this tutorial, we showed how to install Jenkins on CentOS/RHEL and complete the initial configuration.

You can now browse Jenkins official documentation, and start exploring the workflow and plug-in mode of Jenkins.

Recommended Posts

How to install Jenkins on CentOS 8
How to install Jenkins on CentOS 8
How to install jdk1.8 on centOS7
How to install MySQL on CentOS 8
How to install Memcached on CentOS 8
How to install R on CentOS 8
How to install Virtualbox on CentOS 8
How to install TensorFlow on CentOS 8
How to install TeamViewer on CentOS 8
How to install Perl 5 on CentOS
How to install Git on CentOS 8
How to install Gradle on CentOS 8
How to install Elasticsearch on CentOS 8
How to install Java on CentOS 8
How to install Go on CentOS 8
How to install GCC on CentOS 8
How to install Jenkins on Ubuntu 16.04
How to install Yarn on CentOS 8
How to install Nginx on CentOS 8
How to install Asterisk on CentOS 7
How to install Jenkins on Ubuntu 20.04
How to install Vagrant on CentOS 8
How to install Python 3.8 on CentOS 8
How to install Tomcat 9 on CentOS 8
How to install Webmin on CentOS 8
How to install Jenkins on Ubuntu 18.04
How to install Ruby on CentOS 8
How to install Skype on CentOS 8
How to install htop on CentOS 8
How to install Python on CentOS 8
How to install Elasticsearch on CentOS 8
How to install Postgresql on CentOS 8
How to install Wordpress on Centos
How to install htop on CentOS 8
How to install TeamViewer on CentOS 8
How to install MariaDB on CentOS 8
How to install MongoDB on CentOS 7
How to install Odoo 13 on CentOS 8
How to install Apache on CentOS 8
How to install OpenCV on CentOS 8
How to install PHP on CentOS 8
How to install MongoDB on CentOS 8
Install Jenkins on centos7
How to install Apache Maven on CentOS 8
How to install Apache Kafka on CentOS 7
[Graphic] How to install tomcat on centos
R&D: How To Install Python 3 on CentOS 7
How to install GCC compiler on CentOS 7
How to install offline JDK1.8 on centos7.0
How to install and configure Elasticsearch on CentOS 7
How to install Visual Studio Code on CentOS 8
How to install and use Docker on CentOS 7
How to install RPM packages on CentOS Linux
How to install and configure VNC on CentOS 8
How to install and use Composer on CentOS 8
How to install and configure Redis on CentOS 8
How to install Node.js and npm on CentOS 8
How to install jdk1.8.0_151 and mysql5.6.38 on centos7.2.1511
How to install and configure phpMyAdmin on CentOS 6
How to install and use Curl on CentOS 8
How to install and configure Owncloud on CentOS 8