Day 7 Task: Understanding Package manager and systemctl

Day 7 Task: Understanding Package manager and systemctl

Hello Friends,

In this blog we are going to discuss about package management and systemctl.

What is a package?

The package is a collection of files that holds data and metadata like descriptions, binaries, dependencies, versions etc.,

What is a package manager in Linux?

A package manager is a tool that is used to install, upgrade, manage and remove packages. It is responsible to manage dependencies and to track all installed packages.

Different kinds of package managers

Different package managers are depending upon Linux distributors.

  • yum or dnf and rpm is the package manager in RedHat-based Linux systems.

    dnf is a newer version of Yum.

    How to install and remove a package?

    #yum install <package name>

    #yum remove<package name>

    How to update or upgrade a package?

    #yum update<package name>

    #yum upgrade<package name>

    update will

  • apt is the package manager Debian based OS Ubuntu, Kali Linux etc.,

    How to install and remove a package?

    #apt-get install <package name>

    #apt remove <package name>

    How to update a package?

    #apt update <package name>

    Docker Installation using the package manager

    First will update the system by using the below command.

  • sudo apt update -y

  • sudo apt-get install docker.io -y ==> To install docker

  • docker version -> To check the version of the docker.

  • systemctl status docker ==> To check the status of the docker service.

    Jenkins Installation using the package manager

  • sudo apt install openjdk-11-jre -y

  • java -version ==> To check Java version

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

  • echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] pkg.jenkins.io/debian binary/ | sudo tee /etc/apt/sources.list.d/Jenkins.list > /dev/null

  • sudo apt install Jenkins -y

  • sudo systemctl status Jenkins

  • sudo systemctl enable Jenkins

  • sudo systemctl start Jenkins

    Thank You for reading this blog

    Parimal Pradhan

    You can follow me on LinkedIn for my daily updates:- linkedin.com/in/parimal-pradhan-b62021168

    Great initiative by the #trainwithshubham community. Thank you Shubham Londhe

    #devops #90daysofdevops

Did you find this article valuable?

Support Parimal Pradhan by becoming a sponsor. Any amount is appreciated!