Skip to main content

Command Palette

Search for a command to run...

Day 8: Understanding Package Manager and Systemctl

Published
2 min read
S

"Passionate about simplifying the complexities of DevOps, I bring 5 years of hands-on experience in supporting development and operations teams to achieve faster, more reliable software delivery. I thrive on optimizing CI/CD pipelines, automating workflows, and troubleshooting challenges across diverse cloud environments. My expertise spans across infrastructure management, continuous integration, and performance monitoring—ensuring stability and efficiency at every stage of the software lifecycle. Always eager to learn, collaborate, and innovate, I’m committed to driving impactful change in the DevOps space."

Task 1 : Install Docker and Jenkins:

Install Docker and Jenkins on your system from your terminal using package managers.
Update the package list and install required packages:

🚀 How to Install Jenkins and Docker on Ubuntu

sudo apt update  
sudo apt install apt-transport-https ca-certificates curl software-properties-common
  • Add Docker’s official GPG key:

      curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    
  • Add the Docker APT repository:

      sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
    
  • Update the package list again:

      sudo apt update
    
  • Install Docker:

      sudo apt install docker-ce
    
  • Check Docker installation:

      sudo systemctl status docker
    

1. Install Jenkins 🛠️

Step 1: Update your system 🔄

First, let’s make sure your system is up to date:

bashCopy codesudo apt update && sudo apt upgrade -y

Step 2: Add Jenkins Repository 🗂️

Now, add the Jenkins package repository and its GPG key:

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

Then, add the repository to your system:

bashCopy codeecho "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

Step 3: Install Jenkins 🔧

Update your system again and install Jenkins:

bashCopy codesudo apt update
sudo apt install jenkins -y

Step 4: Start Jenkins 🎯

Start Jenkins and make sure it runs on boot:

bashCopy codesudo systemctl start jenkins
sudo systemctl enable jenkins

Step 5: Access Jenkins 🌐

Now, go to your browser and open Jenkins using:

arduinoCopy codehttp://your_server_ip_or_domain:8080

To unlock Jenkins, get the initial password by running:

bashCopy codesudo cat /var/lib/jenkins/secrets/initialAdminPassword

Copy the password and paste it into your browser to complete the setup.

Jenkin Logs:

"The DevOps Insight and Learning with Shivani"

Part 16 of 22

"DevOps Insight with Shivani" is a beginner-friendly series exploring DevOps tools, practices, and concepts like CI/CD pipelines. Join me for easy tutorials, practical tips, and industry updates to help you learn and grow in the DevOps world.

Up next

Introduction to File Permissions and Access Control Lists (ACL) in Linux

Managing file and directory access is a crucial aspect of Linux system administration. At the heart of this management lie file permissions and Access Control Lists (ACLs), two essential mechanisms that define who can read, write, or execute files an...

More from this blog

T

The DevOps Insight with Shivani

23 posts

Package Management and Systemctl Basics