Jenkins installation on Amazon Linux AMI (AWS EC2)


  • Become a root user
sudo su
  • Update yum (since Amazon Linux is based on RedHat Linux)
yum update -y
  • Install Java 8 and purge Java 7
yum install java-1.8.0
  • Remove Java 7
yum remove java-1.7.0-openjdk

Install Jenkins

  • Download Jenkins from the RedHat repo
wget -O /etc/yum.repos.d/jenkins.repo
  • Import the verification key using the package manager RPM
rpm --import
  • Install Jenkins
yum install jenkins --nogpgcheck -y
  • Start Jenkins
service jenkins start
  • Open the Jenkins URL with server IP and Jenkins default port
  • The default Jenkins password can be copied from the below-mentioned file
cat /var/lib/jenkins/secrets/initialAdminPassword

Edit Jenkins default port (optional)

  • Edit Jenkins config file (vi commands: “i” for insert mode, “ESC” key to escape the inserting mode, “:wq” for write an quit)
vi /etc/sysconfig/jenkins
  • Update port
  • Check Jenkins installation
fuser -v -n tcp 8080
netstat -na | grep 8080
  • Auto start Jenkins service
sudo chkconfig --list jenkins
sudo chkconfig jenkins on

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s