Understanding Package Manager and systemctl ๐ง๐ป
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
.
Youโll often find me using the term โpackageโ in tutorials and articles. To understand a package manager, you must first grasp what a package is.
What is a Package? ๐ฆ
A package is usually referred to as an application, but it could also be a GUI application, a command-line tool, or a software library required by other software programs. Essentially, a package is an archive file containing the binary executable, configuration files, and sometimes information about the dependencies.
Different Kinds of Package Managers ๐ฆ
Package managers differ based on the packaging system, but the same packaging system may have more than one package manager.
For example:
RPM has Yum and DNF package managers.
For DEB, you have apt-get and aptitude command-line-based package managers.
Tasks ๐
- Installing Docker and Jenkins Using Package Managers ๐
Your first task is to install Docker and Jenkins on your system from the terminal using package managers. Below are the commands to achieve this on Ubuntu and CentOS:
On Ubuntu (using apt-get):
sudo apt-get update
sudo apt-get install docker.io -y
sudo apt-get install jenkins -y
On CentOS (using yum):
sudo yum install docker -y
sudo yum install jenkins -y
- Write a Small Blog or Article
Write a small blog or article documenting the installation process for Docker and Jenkins on both Ubuntu and CentOS using the package managers mentioned above. Feel free to include any tips or troubleshooting steps you encountered during the installation.
Understanding systemctl and systemd ๐ ๏ธ
systemctl
is used to examine and control the state of the "systemd" system and service manager. systemd is a system and service manager for Unix-like operating systems (most distributions, but not all).
Tasks ๐
- Check the Status of Docker Service ๐
First, check the status of the Docker service in your system to ensure that you have completed the above tasks successfully. Use the following command:
systemctl status docker
- Stop the Jenkins Service and Post Before and After Screenshots ๐
Stop the Jenkins service on your system using the following command and capture screenshots of the status before and after stopping the service:
sudo systemctl stop jenkins
- Read About the Commands systemctl vs service
To better understand the differences between systemctl
and service
commands, read about their functionalities and use cases. Compare the commands:
systemctl status docker
service docker status
For Reference, read this article.
Let's keep learning and growing! Happy DevOps Journey! ๐๐ฉโ๐ป๐จโ๐ป