Skip to main content

Command Palette

Search for a command to run...

๐Ÿ“‚Day 7 - Understanding Package Manager and Systemctl

Updated
โ€ข4 min read
๐Ÿ“‚Day 7 - Understanding Package Manager and Systemctl
P

Hey there! ๐Ÿ‘‹

I'm Pratik R. Mandge, a DevOps Engineer passionate about all things AWS DevOps Technology. Currently on a learning adventure, I'm here to share my journey and Blog's in the world of cloud and DevOps.

๐Ÿ› ๏ธ My focus? Making sense of AWS services, improving CI/CD, and diving into infrastructure as code. Whether you're fellow interns or curious enthusiasts, let's grow together in the vibrant DevOps space.

๐ŸŒ Connect with me for friendly chats, shared experiences, and learning moments. Here's to embracing the learning curve and thriving in the exciting world of AWS DevOps Technology!

Follow me on LinkedIn: https://www.linkedin.com/in/pratik-mandge363

๐Ÿ’กWhat is a Package Manager in Linux?

A package manager in Linux is a tool that allows users to install, remove, upgrade, configure, and manage software packages on an operating system.

๐Ÿ’กWhat is a Package in Linux?

In simple terms, a package in Linux is like a neatly wrapped box that contains a piece of software along with all the instructions needed to install, manage, and remove that software on your computer.

๐Ÿ’กDifferent kinds of Package Managers

There are various kind package managers used in different Linux distributions:

  1. apt (Advance Package Tool): It is used in Debian-based system like Ubuntu and Debian. It's a high-level package management tool that works with the dpkg package format.

     sudo apt update # Update package lists
     sudo apt install package_name # Install a package
     sudo apt remove package_name # Remove a package
    
  2. yum (Yellowdog Updater, Modified): It Works with RPM to manage packages on Red Hat-based systems. It simplifies package management tasks and resolves dependencies.

     sudo yum install package_name # Install a package
     sudo yum remove package_name # Remove a package
    
  3. dpkg (Debian Package): The low-level package manager for Debian-based systems. It handles the installation and removal of individual packages.

     sudo dpkg -i package.deb #Install a package
     sudo dpkg -r package_name #Remove a package
    
  4. RPM (Red Hat Package Manager): It is Used in Red Hat-based systems such as Red Hat Linux, CentOS, and Fedora. RPM manages packages in these distributions.

     sudo rpm -ivh package.rpm #Install a package
     sudo rpm -e package_name #Remove a package
    

๐Ÿ”จTasks:

๐ŸทDocker Installation on your terminal using package managers.( Step by Step)

  • โ—ผ๏ธInstallation of Docker on Ubuntu
sudo apt update # Update the Package
sudo apt-get install docker.io # Install Docker on Ubuntu
  • โ—ผ๏ธCheck the status of docker service in your system
sudo service docker status # Check Docker Status

โ— docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2024-02-02 05:50:50 UTC; 5min ago
TriggeredBy: โ— docker.socket
       Docs: https://docs.docker.com
   Main PID: 2507 (dockerd)
      Tasks: 7
     Memory: 32.7M
        CPU: 318ms
     CGroup: /system.slice/docker.service
             โ””โ”€2507 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
  • โ—ผ๏ธTo Enable the Docker
sudo systemctl enable docker # To Enable the Docker

**Finally Docker works Proeperly.**

๐ŸทJenkins Installation on your terminal using package managers.( Step by Step)

  • โ—ผ๏ธUpdate Package List

       sudo apt update #Update Package List
    
  • โ—ผ๏ธInstall Java Development Kit (JDK): Jenkins require Java to run.

      sudo apt install -y openjdk-11-jdk #Install Java 11
      java --version #Check Java Install or not
    
  • โ—ผ๏ธFor Installing the Jenkins.

      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
    
  • โ—ผ๏ธEnable the Jenkins Service.

      sudo systemctl enable service
    

  • โ—ผ๏ธStart the Jenkins Service

      sudo systemctl start jenkins
    
  • โ—ผ๏ธCheck Jenkins is Active or Not

      sudo systemctl status jenkins
    

  • โ—ผ๏ธIf Jenkins is not active it shows

  • โ—ผ๏ธTo Access your Jenkins Dashboard,

    1. Go to your EC2 Instance then,

    2. Go to security group -> Edit inbound Rules -> Add rule (8080) -> Anywhere-IPv4 -> Save it.

  • โ—ผ๏ธThen copy your EC2 Public IPv4 address, Go to Web Browser & paste [your_ip:8080]

  • โ—ผ๏ธYou will get above path, Copy it & go to your terminal, Use cat before path.

    cat /var/lib/jenkins/secrets/initialAdminPassword

  • โ—ผ๏ธPaste it. You will get Administrator Password, Paste it on Jenkins Dashborad & click on Continue.

  • โ—ผ๏ธThen install plugins.

  • โ—ผ๏ธFinally your Jenkins Dashboard Open Successfully.๐ŸŽŠ

๐Ÿ’กsystemctl and systemd

systemctl is used to examine and control the state of โ€œsystemdโ€ system and service manager. systemd is system and service manager for Unix like operating systems(most of the distributions, not all).

๐Ÿ›ซConclusion

In summary, Linux package managers guarantees efficient software management through streamlined installations and dependency handling. Simultaneously, mastering systemctl within the systemd ecosystem ensures robust control over system services, managing dependencies, and providing centralized status monitoring.

I trust this blog will be a valuable resource, unlocking fresh insights and enriching your knowledge. ๐ŸŒŸ

๐Ÿ“š Happy Learning :)๐Ÿ˜Š

More from this blog

๐Ÿš€ ๐——๐—ฎ๐˜† ๐Ÿญ ๐—ผ๐—ณ ๐— ๐˜† ๐Ÿณ-๐——๐—ฎ๐˜† ๐—”๐—ช๐—ฆ ๐—–๐—ต๐—ฎ๐—น๐—น๐—ฒ๐—ป๐—ด๐—ฒ ๐ŸŒŸ

Today, I kicked off my AWS Challenge with a deep dive into several fundamental concepts. Hereโ€™s what I covered: ๐Ÿท๏ธ ๐˜ผ๐™’๐™Ž ๐™‹๐™ง๐™ž๐™˜๐™ž๐™ฃ๐™œ ๐™ˆ๐™ค๐™™๐™š๐™ก๐™จ:AWS offers various pricing models to cater to different business needs: ๐Ÿญ) ๐—ข๐—ป-๐——๐—ฒ๐—บ๐—ฎ๐—ป๐—ฑ ๐—œ๐—ป...

May 22, 20242 min read
๐Ÿš€ ๐——๐—ฎ๐˜† ๐Ÿญ ๐—ผ๐—ณ ๐— ๐˜† ๐Ÿณ-๐——๐—ฎ๐˜† ๐—”๐—ช๐—ฆ ๐—–๐—ต๐—ฎ๐—น๐—น๐—ฒ๐—ป๐—ด๐—ฒ ๐ŸŒŸ

๐ŸŒŸ ๐—˜๐˜…๐—ฝ๐—น๐—ผ๐—ฟ๐—ถ๐—ป๐—ด ๐˜๐—ต๐—ฒ ๐—ž๐—ฒ๐˜† ๐—–๐—ผ๐—บ๐—ฝ๐—ผ๐—ป๐—ฒ๐—ป๐˜๐˜€ ๐—ผ๐—ณ ๐—ž๐˜‚๐—ฏ๐—ฒ๐—ฟ๐—ป๐—ฒ๐˜๐—ฒ๐˜€ ! ๐ŸŒŸ

Kubernetes is designed to automate the deployment, scaling, and operation of application containers. The architecture is divided into two main components: ๐™ˆ๐™–๐™จ๐™ฉ๐™š๐™ง and ๐™’๐™ค๐™ง๐™ ๐™š๐™ง. Hereโ€™s a detailed breakdown: ๐Ÿ”ถ๐™ˆ๐™–๐™จ๐™ฉ๐™š๐™ง ๐™‰๐™ค๐™™๐™š ๐˜พ๐™ค๐™ข๐™ฅ๐™ค๏ฟฝ...

May 19, 20242 min read
๐ŸŒŸ ๐—˜๐˜…๐—ฝ๐—น๐—ผ๐—ฟ๐—ถ๐—ป๐—ด ๐˜๐—ต๐—ฒ ๐—ž๐—ฒ๐˜† ๐—–๐—ผ๐—บ๐—ฝ๐—ผ๐—ป๐—ฒ๐—ป๐˜๐˜€ ๐—ผ๐—ณ ๐—ž๐˜‚๐—ฏ๐—ฒ๐—ฟ๐—ป๐—ฒ๐˜๐—ฒ๐˜€ ! ๐ŸŒŸ

โ›…๏ธImportant AWS Services: Part - 3

๐Ÿš€๐™€๐™ญ๐™˜๐™ž๐™ฉ๐™š๐™™ ๐™ฉ๐™ค ๐™จ๐™๐™–๐™ง๐™š ๐™ข๐™ฎ ๐™š๐™ญ๐™ฅ๐™š๐™ง๐™ฉ๐™ž๐™จ๐™š ๐™ž๐™ฃ ๐˜ผ๐™’๐™Ž ๐™ฌ๐™ž๐™ฉ๐™ ๐™– ๐™›๐™ค๐™˜๐™ช๐™จ ๐™ค๐™ฃ ๐™˜๐™ค๐™ฃ๐™ฉ๐™–๐™ž๐™ฃ๐™š๐™ง๐™ž๐™ฏ๐™–๐™ฉ๐™ž๐™ค๐™ฃ ๐™–๐™ฃ๐™™ ๐™™๐™š๐™ฅ๐™ก๐™ค๐™ฎ โ–ถ๏ธ๐—”๐—บ๐—ฎ๐˜‡๐—ผ๐—ป ๐—˜๐—น๐—ฎ๐˜€๐˜๐—ถ๐—ฐ ๐—ž๐˜‚๐—ฏ๐—ฒ๐—ฟ๐—ป๐—ฒ๐˜๐—ฒ๐˜€ ๐—ฆ๐—ฒ๐—ฟ๐˜ƒ๐—ถ๐—ฐ๐—ฒ (๐—˜๐—ž๐—ฆ): โ–ช๏ธFully managed Kuberne...

May 12, 20242 min read
โ›…๏ธImportant AWS Services: Part - 3

โ›…๏ธImportant AWS Services: Part - 2

โšœ๏ธ๐™„๐™ข๐™ฅ๐™ค๐™ง๐™ฉ๐™–๐™ฃ๐™ฉ ๐™ฌ๐™ž๐™™๐™š ๐™ง๐™–๐™ฃ๐™œ๐™š ๐™ค๐™› ๐˜ผ๐™’๐™Ž ๐™จ๐™š๐™ง๐™ซ๐™ž๐™˜๐™š๐™จ ๐™ฉ๐™๐™–๐™ฉ ๐™˜๐™–๐™ฃ ๐™š๐™ฃ๐™–๐™—๐™ก๐™š ๐™ฉ๐™ค ๐™–๐™ง๐™˜๐™๐™ž๐™ฉ๐™š๐™˜๐™ฉ ๐™จ๐™˜๐™–๐™ก๐™–๐™—๐™ก๐™š, ๐™จ๐™š๐™˜๐™ช๐™ง๐™š, ๐™–๐™ฃ๐™™ ๐™š๐™›๐™›๐™ž๐™˜๐™ž๐™š๐™ฃ๐™ฉ ๐™˜๐™ก๐™ค๐™ช๐™™ ๐™จ๐™ค๐™ก๐™ช๐™ฉ๐™ž๐™ค๐™ฃ๐™จ. ๐™ƒ๐™š๐™ง๐™š ๐™–๐™ง๐™š ๐™จ๐™ค๐™ข๐™š ๐™ ๐™š๐™ฎ ๐™จ๐™š๐™ง...

May 10, 20243 min read
โ›…๏ธImportant AWS Services: Part - 2

PratikM's Blog

49 posts