How to Install Jenkins on CentOS 7?

Jenkins is an opensource and free tool for developers to develop, test and deploy the code continuously. It is developed in Java. Main benefit of Jenkins is to automate the task which helps to save the developer time in development process.

Following are the steps to install Jenkins on Centos 7.

  1. We will Install JAVA 8 to use Jenkins function.

    # sudo yum install java-1.8.0-openjdk-devel
  2. Verify the JAVA Version.

    # java --version
  3. Add Jenkins repository on centos with the below command.

    # curl --silent --location http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo | sudo tee /etc/yum.repos.d/jenkins.repo
  4. Add Repository in system with below command.

    # sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
  5. After installation of Repository, install Jenkins using below command.

    # sudo yum install jenkins
  6. Start the Jenkins and enable the Jenkins service to start on system boot. # sudo systemctl enable jenkins

    # sudo systemctl start jenkins 
    # sudo systemctl enable jenkins
  7. Jenkins uses port 8080. If you have the firewall enabled, you will need to allow a port in Firewall.

    # sudo firewall-cmd --permanent --zone=public --add-port=8080/tcp # sudo firewall-cmd --reload
  8. Open Jenkins in Web-browser with IPAddress:8080. We will setup Jenkins further.

  9. Once you access the Jenkins in web browser,it will ask for the password. Execute the below command to view the password.

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

        Output : 

 9a6f2643bd164d9588401d19f073b60d
  1. Copy the Password from the terminal and paste into your Jenkins setup.



  2. Click on the Install suggested plugins Box. It will start the installation process.



  3. Enter your credentials to Create First Admin User.



  4. Confirm the URL for the Jenkins and click on Save and Finish.



  5. At last, click on Start using the Jenkins button. It will redirect you to the Jenkins Dashboard.





This is it. We are done with Jenkins's installation.

Related Articles

How to Install and Configure the HAProxy on CentOS?

HAProxy is a very fast and decent tool to achieve high availability, load balancing. It can work...

What is the difference between Redhat and centOS?

If you are a system administrator, you may get questioned sometime that what is the difference...

How to Install and configure Dovecot on CentOS?

Dovecot is used to receive incoming emails on your server from Postfix. Dovecot is an open-source...

How to install Google Chrome on Ubuntu 18.04 using the Command Line?

Following are the steps to install Google Chrome using Command-Line. Edit the source.list file...

How to verify Linux System Is 32-bit or 64-bit?

You will find 64-bit OS in most modern computers. It is always recommended to have a 64-bit OS...

  • 0 Users Found This Useful

Was this answer helpful?