Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Applications»How to Install Jenkins on Ubuntu 20.04

    How to Install Jenkins on Ubuntu 20.04

    RahulBy RahulSeptember 12, 20204 Mins ReadUpdated:January 9, 2021

    Jenkins is an automation server and a continuous integration tool. It provides several plugins for building deployments and automation for your applications. You can use Jenkins as a simple CI (Continuous Integration) server or configure this for the CD (Continuous Delivery) hub. With Jenkin’s help, you can efficiently distribute work across multiple machines, helping drive builds, tests, and deployments across multiple platforms faster.

    This tutorial describe you to how to install Jenkins on Ubuntu 20.04 Linux system. Let’s go through the tutorial and complete Jenkins installation on an Ubuntu system.

    Step 1 – Installing Java

    Jenkins required Java to run on any operating systems. The latest versions of Jenkins is test with Java 8 & 11 versions. To fulfill the requirements, you can install OpenJDK on your system.

    To install OpenJDK Java on your Ubuntu system, type:

    sudo apt update 
    sudo apt install default-jdk 
    

    Once the installation finished, check the Java version by typing the below command:

    java -version 
    
    openjdk version "11.0.9.1" 2020-11-04
    OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04)
    OpenJDK 64-Bit Server VM (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)
    

    Step 2 – Installing Jenkins

    Jenkins official team provides the Debian packages for the installaton on Ubuntu systems. You just need to configure official PPA to your system and install Jenkins on Ubuntu systems.

    Use below steps to install Jenkins on Ubuntu:

    1. Import GPG Key – Use the following command to import GPG to your system.
      wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add - 
      
    2. Add PPA – Next, configure the Jenkins PPA to your Ubuntu system using the following command:
      sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'  
      
    3. Install Jenkins – Update the apt-get cache before installing Jenkins on Ubuntu. After that, you can install Jenkins on an Ubuntu system by running the below commands.
      sudo apt update 
      sudo apt install jenkins 
      

      Once the installation complected, Jenkins service run on port 8080. If the same port is occupied by any other service on your system, You can edit /etc/default/jenkins file and change its port by setting HTTP_PORT value.

    4. Check Service – Finally check the jenkins service status using the following command.
      sudo systemctl status jenkins 
      
      ● jenkins.service - LSB: Start Jenkins at boot time
           Loaded: loaded (/etc/init.d/jenkins; generated)
           Active: active (exited) since Sat 2021-01-09 23:02:34 IST; 3s ago
             Docs: man:systemd-sysv-generator(8)
          Process: 337540 ExecStart=/etc/init.d/jenkins start (code=exited, status=0/SUCCESS)
      
      Jan 09 23:02:33 vm108 systemd[1]: Starting LSB: Start Jenkins at boot time...
      Jan 09 23:02:33 vm108 jenkins[337540]: Correct java version found
      Jan 09 23:02:33 vm108 jenkins[337540]:  * Starting Jenkins Automation Server jenkins
      Jan 09 23:02:33 vm108 su[337576]: (to jenkins) root on none
      Jan 09 23:02:33 vm108 su[337576]: pam_unix(su-l:session): session opened for user jenkins by (uid=0)
      Jan 09 23:02:33 vm108 su[337576]: pam_unix(su-l:session): session closed for user jenkins
      Jan 09 23:02:34 vm108 jenkins[337540]:    ...done.
      Jan 09 23:02:34 vm108 systemd[1]: Started LSB: Start Jenkins at boot time. 
      

    You have successfully installed Jenkins on Ubuntu 20.04 system. Next initialize the Jenkins installation for first and configure it.

    Step 3 – Access Jenkins Web Interface

    Access your server on port 8080 (Or updated port) in your favorite web browser. The default installation password can be found at /var/lib/jenkins/secrets/initialAdminPassword as showing in the below image.

    Install and Use Jenkins 1

    Now select the appropriate option to install the plugin. You can choose to install suggested plugins or select the required plugins options.

    Install and Use Jenkins 2

    Next, create an admin account for your Jenkins setup. Which is required to log in to Jenkins.

    Install and Use Jenkins 3

    After the successful completion of the Jenkins setup wizard, You will be redirected to Jenkins dashboard.

    Install and Use Jenkins 4

    Step 4 – Installing Jenkins Plugin

    Login to Jenkins dashboard and navigate to Manage Jenkins >> Manage Plugins >> Available Tab and select the plugins to install.

    jenkings-plugin-install

    To update existing installed plugins in Jenkins Manage Jenkins >> Manage Plugins >> Update Tab

    Step 5 – Add More Accounts

    To create more accounts, login to the Jenkins admin panel and then navigate to Manage Jenkins >> Manage Users >> Create User . Enter the required details and click Create User.

    jenkings-create-user

    Conclusion

    This tutorial helps you to install Jenkins on your Ubuntu 20.04 Linux system. You can now configure your application with CI/CD architecture.

    CI Jenkins
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleMySQL case-sensitive Search with LIKE
    Next Article How to keep your feature branch up to date.

    Related Posts

    (Resolved) – ReactJS 404 Error on Page Reload

    Updated:June 30, 20222 Mins Read

    10 Best Linux Screen Recording Tools in 2022

    Updated:May 5, 20228 Mins Read

    10 Best Open Source Linux Code Editors

    Updated:September 24, 20216 Mins Read

    How to Install Facebook Messenger on Ubuntu 21.04 & 20.04

    2 Mins Read

    How To Install TeamViewer on Fedora 35/34

    Updated:February 15, 20222 Mins Read

    How to Reset Jenkins Admin User Password

    Updated:January 15, 20212 Mins Read

    Leave A Reply Cancel Reply

    Recent Posts
    • How To Install Docker on Ubuntu 22.04
    • How to Install Bower on Ubuntu 22.04 & 20.04
    • How to run “npm start” through Docker
    • Filesystem Hierarchy Structure (FHS) in Linux
    • How to accept user input in Python
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.