Tuesday 29 January 2019

How To Install Jenkins on Ubuntu 18.04


To install Jenkins on your Ubuntu system, follow these steps:
  1. Install Java.
    Since Jenkins is a Java application, the first step is to install Java. Update the package index and install the Java 8 OpenJDK package with the following commands:
    sudo apt updatesudo apt install openjdk-8-jdk
    Copy
    The current version of Jenkins does not support Java 10 (and Java 11) yet. If you have multiple versions of Java installed on your machine make sure Java 8 is the default Java version.
  2. Add the Jenkins Debian repository.
    Import the GPG keys of the Jenkins repository using the following wgetcommand:
    wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
    Copy
    The commands above should output OK which means that the key has been successfully imported and packages from this repository will be considered trusted.
    Next, add the Jenkins repository to the system with:
    sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
    Copy
  3. Install Jenkins.
    Once the Jenkins repository is enabled, update the apt package list and install the latest version of Jenkins by typing:
    sudo apt updatesudo apt install jenkins
    Copy
    Jenkins service will automatically start after the installation process is complete. You can verify it by printing the service status:
    systemctl status jenkins
    Copy
    You should see something similar to this:
    ● jenkins.service - LSB: Start Jenkins at boot time
    Loaded: loaded (/etc/init.d/jenkins; generated)
    Active: active (exited) since Wed 2018-08-22 13:03:08 PDT; 2min 16s ago
        Docs: man:systemd-sysv-generator(8)
        Tasks: 0 (limit: 2319)
    CGroup: /system.slice/jenkins.service
    Copy
https://linuxize.com/post/how-to-install-jenkins-on-ubuntu-18-04/


No comments:

Post a Comment