Quick Installation of Jenkins on Ubuntu 22.04 [Linux distribution]
Ref: https://www.jenkins.io/doc/book/installing/linux/#debianubuntu
Jenkins is an open-source automation server widely used for continuous integration (CI) and continuous delivery (CD). It helps developers automate parts of the software development process, like building, testing, and deploying code, ensuring smoother workflows and faster releases..
I’m assuming your Ubuntu 22.04 server is already set up.
This article is designed to guide you through quickly installing Jenkins and configuring the Jenkins service to start, whether you choose to run all the commands at once or execute them one by one.
Jenkins relies on Java to operate, so the installation command for Java is also included below.
During the execution of some commands, you may encounter a prompt asking for confirmation to proceed with a “Yes” or “No” option.
sudo apt update
sudo apt install fontconfig openjdk-17-jre
java -version
sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \
https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key
echo "deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc]" \
https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
/etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update
sudo apt-get install jenkins
sudo systemctl enable jenkins
sudo systemctl start jenkins
sudo systemctl status jenkins
If everything is set up correctly, you should see an output similar to this, confirming that the Jenkins service is now active and running.
If you had your Ubuntu 22.04 server setup on AWS EC2 Instance, go ahead to expose the HTTP ports and the following security ports as seen below
Now you can access the Jenkins service by navigating to your server’s PIP address followed by the port 8080 e.g http://<ServerPIPAddress>:8080
Run this command to get the administrator password and input it
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
Now you can start using Jenkins.
If you found this guide helpful, please consider following me on Twitter and connecting on LinkedIn. Don’t forget to give this article a 👏 if you enjoyed reading it as a show of support. Thanks! ✌️