Installing Jenkins

Akshit Modi
4 min readApr 18, 2021

So in this Blog we are going to cover how to install Jenkins in a virtual machine and on top of AWS cloud. If you don’t have idea about what is Jenkins then you can refer to my this blog.

Here we are using RedHat version 8 as a base OS, so command might be differ depending on your OS.

Jenkins is basically working on top of Java so you have to install jdk for it.

Installing Jenkins on cloud

Step 1: Launch a instance using redhat ami and give some storage to it. Please make sure to allow port 8080 and ssh (22). Jenkins use this (8080) port behind the seen for its dashboard.

Step 2: Install JDK for java environment.

[root@localhost ~]# yum install java-1.8.0-openjdk -y 

Step 3: Install Jenkins.

[root@localhost ~]#   sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key[root@localhost ~]#   yum install jenkins -y

But here we don’t have wget command available so we have to install first wget using yum.

Step 4: Start Jenkins server.

[root@localhost ~]# systemctl start jenkins
[root@localhost ~]# systemctl status jenkins

step 5: Now Jenkins is installed.

It comes up with default password but lets change a password and configure it little bit.

→ Access Jenkins dashboard using http://<IP>:8080

→ We can also use public DNS instead of public IP.

http://ec2-52-66-195-168.ap-south-1.compute.amazonaws.com:8080

Here it is asking for a password which is present in the /var/lib/jenkins/secrets/initiailAdminPassword file.

vim /var/lib/jenkins/secrets/initiailAdminPassword

→ Now you have to follow any one step from below.

  1. You can click on suggested plugins.
    → It will install all the basic plugins which we use.
  2. Don’t download any plugin (Recommended).
    → Here if you directly install all plugins then you cannot able to learn properly. So we will recommend you to proceed without installing any plugin.
    → For this you can close that screen.

Now you got screen like this.

Step-6: Change password.

We have already login from default password but it is a good practice to use your own password and which can be easily remembered by you.

For this you have to change your password. Click on admin in the nav bar. It will land you to another page. Click on configure and change your password there and save the settings.

So you have successfully installed and you are ready to go with first practical. You can also follow my this practical demo. But before this let me also cover how to install Jenkins in your VM.

Installing Jenkins in Virtual Machine

If you are going to install in your VM then you can follow above step but you have to disable firewall or configure port 8080 in the firewall (You can download jdk online and use that one).

→ We are doing this step because mostly we don’t use virtual machine browser instead of this we can use base OS browser directly. Which can easy to operate.

→ In our case we are running redhat vm on top of windows and we will perform most of practicals on windows chrome browser.

→ For stopping firewall in redhat you can use this command.

[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl disable firewalld

Thanks for reading, if you are looking for some hands-on you can start with this blog.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response