Code With Bisky

Master Jenkins Installation in Minutes! | Easy Step-by-Step Guide for Beginners

Key Topics covered:

  • Install Jenkins on Ubuntu 22.04 Server
  • Setting up environment variables
  • Running Jenkins on Ubuntu 22.04 Server
  • Accessing Jenkins Web Interface
  • Basic Jenkins configuration and security setup

Description:

In this comprehensive step-by-step guide, we will show you how to set up Jenkins, the leading automation server, on your system. Jenkins is a powerful tool that facilitates continuous integration and continuous delivery (CI/CD) pipelines, making software development and deployment more efficient.

1. Install Jenkins on Ubuntu 22.04 Server:


wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key |sudo gpg --dearmor -o /usr/share/keyrings/jenkins.gpg
sudo sh -c 'echo deb [signed-by=/usr/share/keyrings/jenkins.gpg] http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'

        

curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | sudo tee \
  /usr/share/keyrings/jenkins-keyring.asc > /dev/null
        

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 update
sudo apt install -y openjdk-17-jdk
sudo apt install jenkins
        

2. Start Jenkins Service:


sudo systemctl start jenkins.service
sudo systemctl status jenkins
        
Jenkins Running

Jenkins Service Running

3. Open Port 8080

Jenkins runs on port 8080. By default, the port is closed by firewall. We need to open it to be able to access the Web Interface.


sudo ufw allow 8080
sudo ufw status
        
.gitlab-ci-in-root-directory

Port 8080 is open

4. Accessing web interface:

We can access the web interface on http://your_server_ip_address_or_domain:8080

We need to unlock the jenkins for the first time after installation. Copy the paasword from cat /var/lib/jenkins/secrets/initialAdminPassword

Unlock Jenkins

Unlock Jenkins

Install Suggested Plugins

Install Suggested Plugins

Plugins Installation

Plugins Installation

Create Admin User

Create Admin User

Account Ready

Account Is Ready Now. Click button start Using Jenkins

Dashboard Welcome

Welcome Dashboard. We have installed Jenkins on ubuntu 22.04

Conclusion:

Congratulations! You have successfully completed the Jenkins installation process, and you are now ready to take advantage of the powerful automation capabilities it offers. By setting up Jenkins on your system, you've opened the doors to streamline your software development and deployment processes, making them more efficient and reliable.

Remember, Jenkins is an incredibly versatile tool with a vast array of plugins and integrations available. As you continue your journey with Jenkins, explore its extensive documentation and join the supportive Jenkins community to enhance your knowledge and skills.

Incorporate Jenkins into your CI/CD pipelines, experiment with different configurations, and continuously improve your development workflow. Regularly check for updates and security patches to ensure that you're using the latest and most secure version of Jenkins.

Don't forget to subscribe to our channel for more tutorials on various tech-related topics. If you have any questions or suggestions for future content, please leave them in the comments section below, and we'll be happy to help.