Day 7 Task: Understanding package manager and systemctl
Bilal Yousaf
Linux Server Administrator | DevOps Engineer | Python | AWS | Linux | CI/CD | Dockers | Kubernetes | Ansible | Infrastructure as Code
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.
Different kinds of package managers
Package Managers differ based on packaging system but 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, aptitude command line based package managers.
Different between systemd and systemctl:
systemd is system and service manager for Unix like operating systems(most of the distributions, not all).
systemctl is the systemd command for controlling how services start on a Linux system. A service can be start, stoped and it can be configured to start at boot, on demand, manually, or prevented from starting under any circumstances. Enabling a service means it will start at boot.
Tasks
You have to install docker and Jenkins in your system from your terminal using package managers.
Task1: Install to the Docker, Start to the Docker and check the status of Docker service in your system.
sudo apt-get install docker.io
sudo systemctl start docker
sudo systemctl status docke
领英推荐
sudo systemctl stop docker
sudo systemctl status docker
Task2: Install the Jenkins, Start the Jenkins and check the status of Jenkins service.
sudo apt-get update
sudo apt-get install openjdk-11-jre
sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \
https://pkg.jenkins.io/debian/jenkins.io-2023.key
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
https://pkg.jenkins.io/debian binary/ | sudo tee \
/etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update
sudo apt-get install jenkins
This is the process to install the Jenkins, first of all you have to installed Java in
your system then you can install Jenkins after that. So all the commands are
mentioned above.
sudo systemclt start jenkins
sudo systemctl status jenkins
sudo systemctl stop jenkins
sudo systemctl status jenkins