What is a package manager in Linux?
A package manager in Linux is a software tool that helps users to install, remove, and manage software packages on their system. It automates the process of finding, downloading, and installing packages, as well as managing dependencies between packages.
There are several popular package managers available for Linux, including APT (Advanced Package Tool) used by Debian and Ubuntu, RPM (Red Hat Package Manager) used by Red Hat, CentOS, and Fedora, and Pacman used by Arch Linux. Each package manager has its own set of commands and syntax, but they all serve the same purpose of simplifying the process of installing and managing software on a Linux system.
Different kinds of package managers:
APT (Advanced Package Tool): APT is the default package manager used by Debian and its derivatives, such as Ubuntu and Linux Mint. It is a command-line tool that can install, update, and remove packages and their dependencies.
YUM (Yellowdog Updater Modified): YUM is the default package manager used by Red Hat, CentOS, and Fedora. It is a command-line tool that can install, update, and remove packages and their dependencies.
Tasks
check the status of docker service in your system (make sure you completed above tasks, else docker won't be installed
Install the Docker package and its dependencies**:**
sudo apt-get install docker.io
Docker Status
Docker Version
Check the version of Docker:
docker --version
stop the service jenkins and post before and after screenshots
Installing Jenkins:
Step-1 Installing Java:
Step-2 Check java Version:
Step-3 Add Jenkins Repository:
Step-4 Add the Jenkins software repository to the source list and provide the authentication key:
sudo wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add - echo "deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] https://pkg.jenkins.io/debian-stable binary/" | sudo tee /etc/apt/sources.list.d/jenkins.list > /dev/null sudo apt-get update
Step-5 Installing Jenkins:
1. Update the system repository one more time. Updating refreshes the cache and makes the system aware of the new Jenkins repository.
sudo apt update
Step-6 Run Installing Jenkins:
sudo apt install jenkins -y
To check if Jenkins is installed and running, run the following command:
sudo systemctl status jenkins
Step-7 Open port 8080 by running the following commands:
sudo ufw allow 8080 sudo ufw status
Step-8 Open a web browser and navigate to your server's IP address. Use the following syntax:
http://ip_address_or_domain:8080
Note: use your Instance Public id if you are using Instance as your Server:
Now Just Login into Jenkins:
Create your username and Password:
systemctl and system:
Systemd is a system and service manager, while systemctl is a command-line utility for managing system services.
Systemd provides a suite of daemons, libraries, and utilities to manage system components, while systemctl is a specific tool within that suite.
check the status of the docker service in your system:
Check the status of the Docker service on your Linux system using the following command in the terminal:
systemctl status docker
To Stop the Service:
To stop the Docker service, you can use the following command in the terminal:
sudo systemctl stop docker
This will stop the Docker service immediately. If you want to prevent the service from starting automatically at boot, you can also disable it using the following command:
sudo systemctl disable docker
Note: I have used APT PackageManager here to install both Jenkins and Docker
APT (Advanced Package Tool) is a package manager used in Debian-based Linux distributions like Ubuntu, Linux Mint, and Debian itself. APT provides a simple way to manage packages, which are collections of software files that can be installed and removed from the system