How to install Jenkins on Amazon AWS EC2 Linux | 8 Steps

How to install Jenkins on Amazon AWS EC2 Linux | 8 Steps



Free Courses
Hi, I am Raghav & today we will learn:
1. How to download and install Jenkins on aws ec2 linux
2. How to access Jenkins from browser
3. How to start and stop Jenkins
4. How to start Jenkins on different port
5. How to uninstall Jenkins

Step 1 : Connect to your Linux machine
SetUp JAVA PATH
Set up Custom TCP port: 8080 in AWS Security Groups

Step 2: Update Packages
sudo yum update

Step 3 : Check Java is installed. If not install java
java -version
sudo yum install java-1.8.0

To check and select one out of multiple java versions available
sudo /usr/sbin/alternatives –config java

Step 4 : Download latest Jenkins code package
sudo wget -O /etc/yum.repos.d/jenkins.repo

Step 5 : Import a key file from Jenkins-CI to enable installation from the package
sudo rpm –import

Step 6 : Install Jenkins
sudo yum install jenkins

Step 7 : Start jenkins
sudo service jenkins start

Step 8 : Access Jenkins server using the public DNS of your ec2 on port 8080

example :

Note : Here you might have to allow port 8080 in your security group settings

Useful tips

To start jenkins on a diff port
Update port number in /etc/sysconfig/jenkins

To fetch initial admin password
sudo su –
cd /var/lib/jenkins/secrets/
cat initialAdminPassword
0bcbbcab7f984af7b4171b55e9201d04
To stop Jenkins
sudo service jenkins stop

To uninstall Jenkins
sudo service jenkins stop
sudo yum remove jenkins
sudo rm -r /var/lib/jenkins

References

HIT SUBSCRIBE & BELL TO GET NEW VIDEOS

JOIN me on this educational journey as a member and get exclusive perks – Click the JOIN button

ONLINE COURSES TO LEARN

———— UI TESTING ————
Selenium Beginners –
Selenium Java Framework from Scratch –
Selenium Python –
Selenium Tips –
Selenium Builder –
Katalon Studio –
Robot Framework with RIDE-
Robot Framework with Eclipse –

———— API TESTING ————
Web Services (API) –
SoapUI –
Postman –
General –
Katalon Studio API Testing –

———— MOBILE TESTING ————
Mobile Playlist –

———— CI | CD | DEVOPS ————
Jenkins Beginner –
Jenkins Tips & Trick –
Docker –

———— VERSION CONTROL SYSTEM ————
Git & GitHub –

———— PERFORMANCE TESTING ————
JMeter Beginner –
JMeter Intermediate –
JMeter Advanced –
JMeter Tips & Tricks –
Performance Testing –

———— JAVA ————
Java Beginners –
Java Tips & Tricks –

———— MAVEN ————
Maven –

———— OTHERS ————
Redis-
Misc –
Tools & Tips –
QnA Friday-
Sunday Special –

Ask Raghav –
Interviews –
All Playlists –

Keep Learning,
Raghav

Website –
LifeCharger –
Udemy Courses –
Facebook –
Twitter –
Youtube –

You can support my mission for education here:

Leave a Reply

Your email address will not be published. Required fields are marked *