Installation guides

Installing Jenkins on RHEL

Step-by-Step Guide

  1. Update the Package Index
    Open a terminal and update the package index to ensure you have the latest information about available packages:
   sudo yum update -y
  1. Install Java
    Jenkins requires Java to run. Install OpenJDK, which is a free and open-source implementation of the Java Platform:
   sudo yum install java-11-openjdk-devel -y

Verify the Java installation:

   java -version
  1. Add Jenkins Repository
    Add the Jenkins repository to your system:
   sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
   sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
  1. Install Jenkins
    Install Jenkins using the yum package manager:
   sudo yum install jenkins -y
  1. Start and Enable Jenkins
    Start the Jenkins service:
   sudo systemctl start jenkins

Enable Jenkins to start on boot:

   sudo systemctl enable jenkins
  1. Adjust the Firewall
    Ensure that your firewall allows traffic on port 8080, which is the default port for Jenkins. If you are using firewalld, you can allow traffic with:
   sudo firewall-cmd --permanent --zone=public --add-port=8080/tcp
   sudo firewall-cmd --reload
  1. Verify Jenkins Installation
    Check the Jenkins service status to ensure it is running:
   sudo systemctl status jenkins

If Jenkins is running, you should see an active (running) status.

  1. Access Jenkins Web Interface
    Open your web browser and navigate to http://your_server_ip:8080. You should see the Jenkins unlock screen.
  2. Unlock Jenkins
    Retrieve the initial administrator password by running the following command: sudo cat /var/lib/jenkins/secrets/initialAdminPassword Copy the password and paste it into the “Administrator password” field in the Jenkins web interface.
  3. Install Suggested Plugins
    After unlocking Jenkins, you will be prompted to install plugins. Click on “Install suggested plugins” to start the installation process.
  4. Create First Admin User
    Once the plugins are installed, you will be prompted to create the first admin user. Fill in the required information and click “Save and Finish”.
  5. Start Using Jenkins
    After creating the admin user, Jenkins is ready to use. Click on “Start using Jenkins” to access the Jenkins dashboard.
  6. Configure Jenkins (Optional)
    Configure Jenkins according to your needs. You can install additional plugins, set up credentials, and configure global settings from the Jenkins dashboard.
  7. Set Up a Simple Job (Optional)
    To set up a simple job, click on “New Item” in the Jenkins dashboard, enter a name for your job, select “Freestyle project”, and click “OK”. Configure the job settings and click “Save”. To run the job, click on “Build Now”.
Other Recent Posts