Day 7 : Understanding package manager and systemctl

Day 7 : Understanding package manager and systemctl

ยท

3 min read

Introduction๐Ÿ“š

What is a package manager in Linux?

What is a package?

Different kinds of package managers

Task : Check the status of docker service in your system (make sure you completed above tasks, else docker won't be installed)

Task : Stop the service jenkins and post before and after screenshots

Task : Read about the commands systemctl vs service

*Conclusionโš”๏ธ๐ŸŽ‰

Introduction๐Ÿ“š

Welcome,Connection to day 7 of thrilling #90daysOfDevops challenge, As a DevOps engineer, your journey involves deploying and managing powerful tools that shape the digital landscape. Today, let's dive into the installation of Docker๐Ÿณ and Jenkins๐Ÿ—๏ธ using package managers, and then wield the mighty systemctl for service management. Strap in, and let's embark on this DevOps adventure!

What is a package manager in Linux?

In simpler words, a package manager is a tool that allows users to install, remove, upgrade, configure and manage software packages on an operating system. The package manager can be a graphical application like a software center or a command line tool like apt-get or pacman.

To understand package manager, you must understand what a package is.

What is a package?๐Ÿ“ฆ

A package is usually referred to an application but it could be a GUI application, command line tool or a software library (required by other software programs). A package is essentially an archive file containing the binary executable, configuration file and sometimes information about the dependencies.

Different kinds of package managers

Package Managers differ based on packaging system but same packaging system may have more than one package manager.

  • a. apt (Debian/Ubuntu):
    • Importance: Debian-based systems are prevalent in many server environments, making apt a key tool for package management.

      •   sudo apt-get install package_name
        
  • b. yum/dnf (Red Hat/CentOS):

    • Importance: Commonly used in enterprise environments, understanding yum or dnf is crucial for managing packages on Red Hat-based systems.

    •   sudo yum install package_name
      
  • c. Pacman (Arch Linux):

    • Importance: Arch Linux and its derivatives are popular among tech enthusiasts, making Pacman valuable for certain environments.
sudo pacman -S package_name

Task : Check the status of docker service in your system (make sure you completed above tasks, else docker won't be installed)

sudo apt update
sudo apt-get install -y docker.io

Checking Docker Service Status:

systemctl status docker

โœ… Ensures Docker is smoothly sailing on your system.

sudo apt install -y docker.io

Jenkins Installation on Ubuntu:

sudo apt update
sudo apt install -y jenkins

Task 2 :Stopping Jenkins Service

Stopping Jenkins Service:

sudo systemctl stop jenkins

๐Ÿšจ Halts Jenkins service like a captain giving the pause command.

Task :3:Read about the commands systemctl vs service

Decoding systemctl vs service Commands ๐Ÿ”๐Ÿ”„

  • systemctl:

    • ๐Ÿ› ๏ธ Controls the systemd system and service manager.

    • ๐Ÿ•ต๏ธ Used for managing services, examining logs, and more.

    • ๐Ÿ”‘ E.g., systemctl status docker

  • service:

    • ๐Ÿคนโ€โ™‚๏ธ High-level command to manage services.

    • ๐Ÿ”„ Often a symlink to systemctl.

    • ๐Ÿ”‘ E.g., service jenkins status

Conclusion๐ŸŽ‰

With package managers, Docker, Jenkins, and the systemctl wizardry at your disposal, you're well-equipped to navigate the Linux seas. Whether you're deploying containers or orchestrating services, these tools will be your steadfast allies on your DevOps journey. May your deployments be smooth, your services robust, and your command-line adventures legendary! ๐Ÿšข๐Ÿ’ป๐Ÿ”ง๐ŸŒ๐Ÿ’ก Keep up the fantastic work, and get ready for more thrilling adventures that lie ahead! ๐Ÿ’ช๐ŸŒŸ

๐Ÿ™Thanks for reading๐Ÿ™

ย