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



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

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

Hello everyone,

In this video, I have explained about the installation of Jenkins on AWS EC2-Instance.

What is Jenkins ?

Jenkins is one of the famous and most used CI/CD Tool in the IT Market today. It can be Integrated with many other tools like git hub , git lab , bit bucket and many more.. It can also be used for testing and as well as for performing automation.

Commands used in this video:
1. Create AWS EC2 instance and configure security group to open port 8080.

2. Check JAVA installation, if not install JAVA
sudo yum install java-1.8.0

3. Download latest Jenkins code package using below link,
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo

4. Import a key file from Jenkins CI to enable installation from the package. Execute the below command.
sudo rpm –import https://www.youtube.com/redirect?event=video_description&redir_token=QUFFLUhqbnp2Wm9UckVGQ196UnZnYkYza1Rjck1TSi1vd3xBQ3Jtc0tsYW5DOUZjbDYwNDZfUXBfQzZiQlBrMzdvZmN0QkhOeV9tWExOVVpaV0lXbTgxVWU1RjJxWG80YXZrY0FwcGRHRFFzMEJtNk9PNDZnV2JwdF9pM1VjVTVCZUJMQmJORkpRQXpIdWhUaTZab2o4bk5wYw&q=https%3A%2F%2Fpkg.jenkins.io%2Fredhat-stable%2Fjenkins.io.key

5. Install Jenkins
sudo yum install jenkins

6. Start Jenkins service,
sudo service jenkins start

7. Access Jenkins server on browser using public DNS on port 8080
https://{ec2-instance-public-dns}:8080/

8. Once the Jenkins is started, unlock Jenkins by providing the Administrator password
sudo su –
cd /var/lib/jenkins/secrets/
cat initialAdminPassword
455605da254c4dab94307549fe113034

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

#Jenkins #JenkinsAutomation

Comments are closed.