Day 7 Task: Understanding package manager and systemctl

Day 7 Task: 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.

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.

  • Install the docker

sudo apt-get install docker.io        

  • Start the Docker

sudo systemctl start docker        

  • Status of Docker

sudo systemctl status docke        

  • Stop the Docker service and after status of Docker:

sudo systemctl stop docker
sudo systemctl status docker        


Task2: Install the Jenkins, Start the Jenkins and check the status of Jenkins service.

  • Install the Jenkins

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.

  • Start the Jenkins:

sudo systemclt start jenkins        

  • Check the status of Jenkins:

sudo systemctl status jenkins        

  • Stop the Jenkins Services and check status:

sudo systemctl stop jenkins
sudo systemctl status jenkins        


要查看或添加评论,请登录

Bilal Yousaf的更多文章

社区洞察

其他会员也浏览了