In this tutorial we will be seeing how to install Jenkins on AWS EC2 instance.
From the last tutorial, we’ve already installed Java and added the path variable now let’s install Jenkins
Step 1: Use the below command, here Wget command is a Linux command line utility that helps us to download the files from the web and YUM (Yellowdog Updater Modified) is an open source command-line as well as graphical based package management tool for RPM (RedHat Package Manager) based Linux systems. It allows users and system administrator to easily install, update, remove or search software packages on a systems.
$sudo yum -y install wget
$sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
$sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
$sudo yum -y install jenkins
That’s all it will install Jenkins on the your Red Hat server you should see something like this on completion
To reverify the installation you can check the Jenkins status
$sudo service jenkins status
Step 2: Now let’s start our Jenkins using below command and setup jenkins to boot at start
# Start jenkins systemctl start jenkins #Jenkins to start at boot, systemctl enable jenkins
Step 2: Now let’s open Jenkins using our browser, open AWS Console and grab the IPv4 Public IP address of our server and copy paste on web browser appended by “:” and port no which is “8080”, in my case it will be 5.37.348.318:8080
If all goes well you should be able to see below screen on your browser
Step 3: Now let’s grab the password copy paste red color path in our terminal.
Copy paste below password and you’re done!!
Let me know in the comment section if you’ve any query or doubt.