It is a #day7 of #90DaysOfDevOps🐧
1)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 centre or a command lines tool like apt-get or Pacman
2)What is a package?
A package is usually called an application but 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.
3)Different kinds of package managers
Based on the Linux distro that you are using it will have a different package manager. Also, a Linux distro can have different package managers as well. Following is the list of Linux distros and their respective package managers:
Debian and ubuntu => apt
CentOs and RHEL => yum, dnf
You have to install docker and Jenkins in your system from your terminal using package managers
DOCKER INSTALLATION STEP-BY-STEP
First, you need to check the location of the docker. If the docker is installed in your system then you will get the location. Using the
which
command you can able to see the location of the docker.
ubuntu@ip-172-38-22-300:~$ which docker
ubuntu@ip-172-38-22-300:~$
did not get any location which means docker is not installed on your system.
Now you can start the installation !!
sudo apt update
sudo apt-get install
docker.io
docker --version
output :
Docker version 20.10.21, build 20.10.21-0ubuntu1~22.04.2
check the location
which docker
output :
/usr/bin/docker
check docker status
sudo systemctl status docker
output :
Active: active (running) since Sat 2023-04-08 05:33:03 UTC; 4min 47s ago
if you want to stop running activation then...
sudo systemctl stop docker
now you check the status
sudo systemctl status docker
output :
Active: inactive (dead) since Sat 2023-04-08 05:42:21 UTC; 8s ago
if you want to start activation then...
sudo systemctl start docker
sudo systemctl status docker
output :
Active: active (running) since Sat 2023-04-08 05:47:57 UTC; 10s ago
JENKINS INSTALLATION STEP-BY-STEP
sudo apt update
Install java
sudo apt install openjdk-11-jre
Validate Installation
java -version
Install Jenkins
||
Just copy these commands and paste them onto your terminal.
curl -fsSL
https://pkg.jenkins.io/debian/jenkins.io.key
| sudo tee \ /usr/share/keyrings/jenkins-keyring.asc > /dev/null d-by=/usr/share/keyrings/jenkins-keyring.asc] \
https://pkg.jenkins.io/debian
binary/ | sudo tee \ /etc/apt/sources.list.d/Jenkins.list > /dev/null
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
Start Jenkins
sudo systemctl enable jenkins
sudo systemctl start jenkins
sudo systemctl status jenkins
4)Difference in systemctl and systemd
systemd is a system and service manager for Linux systems that provides many powerful features for managing processes and system resources. systemctl is a command-line utility that is used to control and manage the systemd system and service manager.
With systemctl, you can start, stop, and restart services, enable and disable them to start at boot, and check the status of services. You can also use systemctl to view and manage system logs, configure system startup and shutdown, and set system-wide environment variables.
systemd
gives us the systemctl
commands suite which is mostly used to enable services to start at boot time. We can also start, stop, reload, restart and check the status of services with the help of systemctl; Whileas service
command is a wrapper script that allows system administrators to start, stop, and check the status of services without worrying too much about the actual init system being used.
Thank you very much for giving your valuable time for reading this article !!☺😊
Arijit Manna