Decoding Package Managers and Systemctl: An In-Depth Exploration

Decoding Package Managers and Systemctl: An In-Depth Exploration

Let's get started with🚀

💫Basic Understanding 💫

What is the package?

A package is a collection of related software components that are designed to work together. Packages can be used to organize software, improve maintainability, and facilitate reuse

Why is package management needed in Linux?

In Linux, package management has become essential for efficient software installation, updates, and maintenance. It makes the process easier by providing a centralized repository of pre-compiled packages, establishing dependency resolution, and making removal simple.

Regular patches, simplify program management, improve system stability, and increase security, making Linux more user-friendly and dependable.

💫Types of package management 💫

😳Depends on various Parameter (OS, Language )

👉Package Managers for RPM

YUM (Yellowdog Updater Modified):

A Red Hat-based distribution (CentOS 6 and prior).

DNF (Dandified YUM): A successor to YUM that is used in current Red Hat-based distributions (Fedora, CentOS 7 and beyond).

👉DEB (Debian Package Managers)🍥

APT (Advanced Package Tool): The most important command-line tool for managing DEB packages is APT.

apt-get: A command-line tool for managing packages in older Debian-based systems. aptitude: Another command-line package manager with a text-based interface for DEB packages.

aptitude: Another command-line package manager with a text-based interface for DEB packages.

👉Package Managers in Python🐍

pip: pip is the most often used Python package manager.

conda: A package manager for managing Python packages and environments that is widely used in data research and scientific computing.

👉Java Package Managers

Maven: Used for managing Java projects and dependencies.

Gradle: Another popular build automation tool for Java that can also manage dependencies.

👉Go Package Managers

Go Modules: Introduced in Go 1.11 as the official package management solution for Go

Now, start with the practicals :

💫Installing the Packages on Linux

👉Update Linux packages with the command(Ubuntu)

sudo apt-get update

OR

sudo apt update

▶ Now, try out the installation of Docker & Jenkins packages

💫Installing Docker and Jenkins (Ubuntu-based OS)

📌Docker

Here, Not only we will install the docker but also start/stop the docker services and check the service status. (Ubuntu-based OS)

Prerequisites: Docker recommends a minimum of 2 GB of RAM for the host system.

sudo apt install docker.io -y

[Optional] if the docker is not started

sudo systemctl start docker

As the docker is running after installation, check the status now :

sudo systemctl status docker

sudo systemctl stop docker.socket
sudo systemctl status docker

So, you learn about installing docker step by step with start and stop the services.

📌Jenkins

Prerequisites:

OS : Linux, Ubuntu or CentOS

Java Version: Java 8 OR Java 11

Follow the following steps :

Update Repository :

 sudo apt-get update

Install java :

sudo apt-get install -y openjdk-11-jdk

Check the Java version :

java --version

Installing Jenkins :

wget https://get.jenkins.io/war-stable/2.414.1/jenkins.war

wget: command is a popular command-line utility for downloading files from the internet. It stands for "web get" and is commonly used in Unix-based operating systems like Linux.

Note: If the installation goes wrong; start from scratch, you should have the current time copied link used from Jenkins's official website.

You can find the Jenkins download link from the official link at: https://www.jenkins.io/

Go to the download section > hover on Genric Java package (.war) > Right-click on it copy the link address and paste it on the terminal with wget command.

Start the Jenkins

java -jar jenkins.war &

As you can see the Jenkins is up and running :

Now, you have to stop the service before you should know the process id of it.

So, use the following approach

ps aux | grep 'java -jar jenkins.war'

Congratulations 🎉 ! You learn about the Package managers and systemctl with a practical approach.

I hope you enjoy the blog post!

If you do, please show your support by giving it a like ❤, leaving a comment 💬, and spreading the word 📢 to your friends and colleagues 😊

Did you find this article valuable?

Support Vyankateshwar Taikar's blog by becoming a sponsor. Any amount is appreciated!