0% found this document useful (0 votes)
24 views3 pages

02-How To Install Jenkins

This document provides steps to install Jenkins on an EC2 CentOS machine. It involves installing Java, adding the Jenkins repo, importing keys, installing Jenkins, starting the service, and accessing the GUI on port 8080 to get the initial password and complete setup.

Uploaded by

Heba Refaie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views3 pages

02-How To Install Jenkins

This document provides steps to install Jenkins on an EC2 CentOS machine. It involves installing Java, adding the Jenkins repo, importing keys, installing Jenkins, starting the service, and accessing the GUI on port 8080 to get the initial password and complete setup.

Uploaded by

Heba Refaie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

How to Install Jenkins on EC2 centos/redhat

1. Jenkins works on java (can be installed on either Linux or windows OS)


2. You will need to install java first, below the steps to install Jenkins on the Linux machine
Check the note “How to install Java on Linux”
3. To check whether the java is installed or not
$ java -version
4. You will need a root user, or a user with sudo access.

Add Jenkins to the centos repository

The below command will reach out to Jenkins server and download the repository:
(wget -O download the content from the internet to a file)
sudo wget -O /etc/yum.repos.d/jenkins.repo \

https://pkg.jenkins.io/redhat-stable/jenkins.repo

Otherwise, you can add Jenkins repo manually


sudo nano /etc/yum.repos.d/jenkins.repo

And add the following lines and save file.


[jenkins]

name=Jenkins-stable

baseurl=http://pkg.jenkins.io/redhat

gpgcheck=1

Import the Jenkins key to make sure that the software is legitimate

sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key


sudo yum upgrade

Install Jenkins

sudo yum install jenkins java-1.8.0-openjdk-devel -y


sudo systemctl daemon-reload

Start and Enable Jenkins

systemctl start jenkins

systemctl status jenkins

systemctl enable Jenkins


Starting Jenkins GUI

The default URL for jenkins is

http://dns-name-or-ip:8080

In case of using and EC2, we will need to allow port 8080 on the inbound security group rules

Now you will be able to access Jenkins GUI and you can get the initial Admin user password

[root@ip-172-31-28-24 jenkins]# cat /var/lib/jenkins/secrets/initialAdminPassword

d684e9e812e64be4b444eabd25f1fe79

change your password to Admin/admin

You might also like