Jenkins Installation




 Manually installing Jenkins involves a series of steps, including downloading the Jenkins WAR file, configuring the server, and setting up plugins. This process can become repetitive and error-prone, especially when dealing with multiple installations or server rebuilds. By automating the installation via a shell script, you can ensure consistency, reduce the likelihood of human errors, and expedite the setup process.


-----------------------------------------------------------------------------------------------------------------------------

#!/bin/bash


echo "updating system"


sudo yum update –y


echo "Adding repo and key"


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-2023.key


sudo yum upgrade -y



echo "installing java"


sudo amazon-linux-extras install java-openjdk11 -y


echo "installing jenkins"


sudo yum install jenkins -y


sudo systemctl enable jenkins


sudo systemctl start jenkins


sudo systemctl status jenkins

----------------------------------------------------------------------------------------------------------------------------



Post a Comment

Post a Comment (0)

Previous Post Next Post