Jenkins installation with EC2

Ravindra NaikRavindra Naik
4 min read

What is Jenkins?

Jenkins is an open-source automation server used for:

  • Continuous Integration (CI) – automatically testing and integrating code.

  • Continuous Delivery/Deployment (CD) – automating the release process.

  • Orchestrating DevOps pipelines – managing end-to-end software delivery.


Why Use Jenkins?

  1. Automates builds and tests – saves time and reduces manual errors.

  2. Supports CI/CD – enables frequent, reliable code releases.

  3. Highly extensible – over 1,800 plugins for tools like Git, Docker, Slack, AWS, etc.

  4. Pipeline as Code – write workflows in Jenkinsfile and store in version control.

  5. Cross-platform – works on Windows, Linux, and macOS.

  6. Distributed builds – runs jobs on multiple machines to speed up tasks.

  7. Tool integration – connects with GitHub, Maven, Gradle, JIRA, Kubernetes, and more.

  8. Monitoring and logging – provides a web UI for build logs, test reports, and status.

  9. Open-source and free – no license cost, with large community support.

  10. Trigger on events – builds can start on code push, pull requests, or scheduled times.

Jenkins Installation Steps:

Step1: Once you login into your AWS Account, serach for EC2 service and click on Launch instance.

Step2: Select Name tag, provide server name and Amazon Machine Image (AMI) as Redhat as shows below

Step3: Jenkins need 2 vCPU and 4 GiB Memory so, Select Instance type t2.medium instance type.

Step4: For login instance need keypair, click on new key pair to create new key pair.

Step5: Give Key pair name(any name), select key pair type as RSA and format as .pem, Click on Create key pair.

Step6: Security groups provides security(Controll traffic) to jenkins server. Select Create security group.

Step7: Provide storage minimum 10 GiB, need more available to increase volume later.

Step8: Select number of instances and Click on Launch instance as shows below.

Step9: Ec2 instance created Successfully.

Step10: To connect Jenkins-server instance, select the instance and click on connect as show below.

Step11: Multiple options to connect instance. Select SSH Client option and copy ssh url show as below.

Step12: Open Git-bash and switch to where the keypair downloaded and paste the copied ssh url. Select continue to connecting as yes and switch to root user and check your username as root.

Step13: Update Jenkins server instance to install all the require dependencies and complete.

Step14: Install required tools to run jenkins server instance and check installed or not at end.

Step15: Install require dependencies path path to Jenkins server.

Step16: install required rpm packages for Jenkins server and update the instance.

Step17: Install Java as required dependencies for Jenkins packages and complete.

Step18: Install Jenkins by accepting continuoes to yes and complete.

Step19: Reload the daemon service.

Step20: Enable the Jenkins service.

Step21: Initially Jenkins service in disable status(inactive), check by status as shows below.

Step22: Try to start Jenkins service.

Step23: Now, Jenkins server up and enabled so Jenkins server in running(active) status.

Step24: Go to AWS Dashboard and select Jenkins instance and Click on Security and select security group as shown as below.

Step25: Click on Edit inbound rules as shown below.

Step26: Jenkins default port is 8080, need to access anywhere. Click on Add rule and select type as Custom TCP, port range 8080 and source as Anywhere 0.0.0.0/0 and save the rule as shows.

Step27: Security group is successfully updated with new rule.

Step27: Select Jenkins instance and click on Details and copy Public IP of Jenkins Instace as shows below.

Step28: Open browser tab and paste Jenkins server public Ip address with poet number 8080. Jenkins server redirected and copy the Jenkins server path as shown below.

Step29: Here need to open password of Jenkins server. To view password, Come to Gitbash jenkins server and paste the Jenkins path using CAT command as shows below. Copy the below password.

Step30: Go to web browser and paste the password as shows below and click on Continue.

Step31: Jenkins Suggest to install default plugins, Click on Install suggested plugins it Installs automatically.

Step32: Need to create Jekins first user provide required details and click on Save and Continue.

Step33: Jenkins shows Jenkins server default url and click on save and finish as shows below.

Step34: Jenkins is ready to start, Click on Start using jenkins.

Step35: Finally Jenkins server Dashboard appears, cross check with username provided and Explore.

Thank you..

5
Subscribe to my newsletter

Read articles from Ravindra Naik directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Ravindra Naik
Ravindra Naik