How to install Jenkins on Ubuntu Server 18.04

6

Buy Organic Traffic | Cheap Organic Traffic | Increase Organic Traffic | Organic Traffic


Looking for a tool to enable continuous integration and delivery of your application? Give Jenkins a try.

jenkinshero.jpg

Image: Jenkins

Jenkins is an open source automation server that has become a crucial component in the likes of Kubernetes and GitOps. Jenkins enables the continuous integration and delivery of software. Jenkins includes a number of plugins to help the automation of building and deploying your applications.

I want to walk you through the process of installing Jenkins on Ubuntu Server 18.04.

SEE: Hybrid cloud: A guide for IT pros (TechRepublic download)

What you’ll need

The only things you’ll need are a working instance of Ubuntu 18.04 and a user account with sudo privileges. With those in hand, let’s make some automation magic.

Installing Java

Jenkins requires Java to function, but Jenkins won’t work with just any release of Java. Here’s how to install a version of Jenkins that will make the installation and usage of Jenkins possible:

  1. Open a terminal window on your Ubuntu server.
  2. Issue the command sudo apt install default-jdk-headless.
  3. Allow the installation to complete.

Note: The above installation can take some time, so be patient.

To verify Java has been installed, issue the command:

java --version

You should see that Java has, indeed, been installed (Figure A).

Figure A

jenkinsa.jpg

Our version of Java is ready.

How to install Jenkins

Next we install Jenkins. Go back to your terminal window and follow these steps:

  1. Download and install the necessary GPG key with the command wget -q -O – https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add –.
  2. Add the necessary repository with the command sudo sh -c ‘echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list’.
  3. Add the universe repository with the command sudo add-apt-repository universe.
  4. Update apt with the command sudo apt-get update.
  5. Install Jenkins with the command sudo apt-get install jenkins -y.
  6. Allow the installation to complete.

How to access Jenkins

Open a web browser and point it to http://SERVER_IP:8080 (where SERVER_IP is the IP address of the hosting server). You will then be prompted to copy and paste a password that was created during the Jenkins installation. To retrieve that password, go back to the terminal window and issue the command:

sudo less /var/lib/jenkins/secrets/initialAdminPassword

Paste that password into the required field (Figure B) and click Continue.

Figure B

jenkinsb.jpg

The required password field to unlock Jenkins.

Once you’ve unlocked Jenkins, you can then finish the installation by either installing the suggested plugins or installing only the plugins you want (Figure C).

Figure C

jenkinsc.jpg

Installing plugins for Jenkins.

I suggest clicking the Install Suggested Plugins button and allow Jenkins to do its thing. You can then install other plugins at a later time. When the plugin installation completes, you will then be prompted to create an admin user (Figure D).

Figure D

jenkinsd.jpg

Creating an admin user for Jenkins.

Fill out the necessary information for the admin user and click Save And Continue. You will then be shown the Jenkins URL. Click Finish and you’re ready to start using Jenkins.

Congratulations, you now have an incredibly powerful automation platform at the ready.

Also see

ubuntuhero.jpg

Image: Jack Wallen

Buy Website Traffic | Cheap Website Traffic | Increase Website Traffic | Website Traffic



Source link