Install Jenkins on AWS EC2 Instance
1. What is Jenkins…?
Jenkins is an open-source automation server. It helps automate the parts of software development related to building, testing, and deploying, facilitating continuous integration and continuous delivery.
2. Step to Install Jenkins on AWS EC2 Instance
1. Login to your AWS Account
2. Then go to launch instance
3. Use Amazon Linux as OS(AMI) => Amazon Linux 2 Kernel 5.10 AMI 2.0.20230404.1 x86_64 HVM gp2
4. Open port 8080 globally (Jenkins Use port 8080 default)
5. Launch Instance
6. Connect you EC2 with the help of putty or AWS console
7. First update your instance
sudo yum update
8. Add the Jenkins repo using below command
sudo wget -O /etc/yum.repos.d/jenkins.repo \
https://pkg.jenkins.io/redhat-stable/jenkins.repo
9. Import a key file from Jenkins CI to install package
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key
10. Again upgrade your machine
sudo yum upgrade
11. Then install java on your machine
sudo amazon-linux-extras install java-openjdk11 -y
12. finally install Jenkins
sudo yum install jenkins -y
13. Now enable & start Jenkins service
sudo systemctl enable jenkins
sudo systemctl start jenkins
14. Now check Jenkins status
sudo systemctl status jenkins
15. hit public IP along with port number and your Jenkins is successfully installed on your machine