๐Day 7 - Understanding Package Manager and Systemctl

Hey there! ๐
I'm Pratik R. Mandge, a DevOps Engineer passionate about all things AWS DevOps Technology. Currently on a learning adventure, I'm here to share my journey and Blog's in the world of cloud and DevOps.
๐ ๏ธ My focus? Making sense of AWS services, improving CI/CD, and diving into infrastructure as code. Whether you're fellow interns or curious enthusiasts, let's grow together in the vibrant DevOps space.
๐ Connect with me for friendly chats, shared experiences, and learning moments. Here's to embracing the learning curve and thriving in the exciting world of AWS DevOps Technology!
Follow me on LinkedIn: https://www.linkedin.com/in/pratik-mandge363
๐กWhat is a Package Manager in Linux?
A package manager in Linux is a tool that allows users to install, remove, upgrade, configure, and manage software packages on an operating system.
๐กWhat is a Package in Linux?
In simple terms, a package in Linux is like a neatly wrapped box that contains a piece of software along with all the instructions needed to install, manage, and remove that software on your computer.
๐กDifferent kinds of Package Managers
There are various kind package managers used in different Linux distributions:
apt (Advance Package Tool): It is used in Debian-based system like Ubuntu and Debian. It's a high-level package management tool that works with the dpkg package format.
sudo apt update # Update package lists sudo apt install package_name # Install a package sudo apt remove package_name # Remove a packageyum (Yellowdog Updater, Modified): It Works with RPM to manage packages on Red Hat-based systems. It simplifies package management tasks and resolves dependencies.
sudo yum install package_name # Install a package sudo yum remove package_name # Remove a packagedpkg (Debian Package): The low-level package manager for Debian-based systems. It handles the installation and removal of individual packages.
sudo dpkg -i package.deb #Install a package sudo dpkg -r package_name #Remove a packageRPM (Red Hat Package Manager): It is Used in Red Hat-based systems such as Red Hat Linux, CentOS, and Fedora. RPM manages packages in these distributions.
sudo rpm -ivh package.rpm #Install a package sudo rpm -e package_name #Remove a package
๐จTasks:
๐ทDocker Installation on your terminal using package managers.( Step by Step)

- โผ๏ธInstallation of Docker on Ubuntu
sudo apt update # Update the Package
sudo apt-get install docker.io # Install Docker on Ubuntu
- โผ๏ธCheck the status of docker service in your system
sudo service docker status # Check Docker Status
โ docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2024-02-02 05:50:50 UTC; 5min ago
TriggeredBy: โ docker.socket
Docs: https://docs.docker.com
Main PID: 2507 (dockerd)
Tasks: 7
Memory: 32.7M
CPU: 318ms
CGroup: /system.slice/docker.service
โโ2507 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
- โผ๏ธTo Enable the Docker
sudo systemctl enable docker # To Enable the Docker
**Finally Docker works Proeperly.**
๐ทJenkins Installation on your terminal using package managers.( Step by Step)

โผ๏ธUpdate Package List
sudo apt update #Update Package Listโผ๏ธInstall Java Development Kit (JDK): Jenkins require Java to run.
sudo apt install -y openjdk-11-jdk #Install Java 11 java --version #Check Java Install or notโผ๏ธFor Installing the Jenkins.
sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \ https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key 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 sudo apt-get install jenkinsโผ๏ธEnable the Jenkins Service.
sudo systemctl enable service
โผ๏ธStart the Jenkins Service
sudo systemctl start jenkinsโผ๏ธCheck Jenkins is Active or Not
sudo systemctl status jenkins
โผ๏ธIf Jenkins is not active it shows

โผ๏ธTo Access your Jenkins Dashboard,
Go to your EC2 Instance then,
Go to security group -> Edit inbound Rules -> Add rule (8080) -> Anywhere-IPv4 -> Save it.

โผ๏ธThen copy your EC2 Public IPv4 address, Go to Web Browser & paste [your_ip:8080]

โผ๏ธYou will get above path, Copy it & go to your terminal, Use cat before path.
cat /var/lib/jenkins/secrets/initialAdminPassword
โผ๏ธPaste it. You will get Administrator Password, Paste it on Jenkins Dashborad & click on Continue.

โผ๏ธThen install plugins.
โผ๏ธFinally your Jenkins Dashboard Open Successfully.๐

๐กsystemctl and systemd
systemctl is used to examine and control the state of โsystemdโ system and service manager. systemd is system and service manager for Unix like operating systems(most of the distributions, not all).
๐ซConclusion
In summary, Linux package managers guarantees efficient software management through streamlined installations and dependency handling. Simultaneously, mastering systemctl within the systemd ecosystem ensures robust control over system services, managing dependencies, and providing centralized status monitoring.
I trust this blog will be a valuable resource, unlocking fresh insights and enriching your knowledge. ๐
๐ Happy Learning :)๐




