Day-07: Understanding package manager and systemctl

๐Ÿ“ฆ Installing Docker and Jenkins using Package Managers on Ubuntu and CentOS ๐Ÿณ

ยท

4 min read

Day-07: Understanding package manager and systemctl

Hello there, tech enthusiasts! Today, we're going to dive into the exciting world of package managers and learn how to install two powerful tools, Docker and Jenkins, on Ubuntu and CentOS systems using these package managers. ๐Ÿš€

๐Ÿง Package Manager - What's That?

Before we start, let's quickly understand what a package manager is in Linux. ๐Ÿค”

A package manager is like a magic wand ๐Ÿช„ for your operating system. It allows you to effortlessly install, remove, upgrade, configure, and manage software packages. Think of these packages as little gift boxes ๐ŸŽ containing amazing applications, both graphical and command-line tools, or even software libraries that other programs need to function. These packages come bundled with the necessary binary executables, configuration files, and sometimes information about their dependencies. ๐ŸŽ‰

๐Ÿ’ผ Package - Unwrapping the Gifts

Alright, let's get a clearer picture of what a package exactly is. ๐Ÿ“ฆ

A package typically refers to an application, but it could be anything from a user-friendly GUI app to a powerful command-line tool or a software library essential for other programs. It's like a neatly wrapped present ๐ŸŽ, containing all the goodies required to get the software up and running on your system. This includes the executable program itself, configuration files, and sometimes crucial information about any other software it relies on. ๐ŸŽ

๐Ÿ“ฆ Different Kinds of Package Managers

Now, let's explore some popular package managers and the systems they're used on. ๐Ÿ“ฆ

  • RPM Package Manager: This one is used on various Linux distributions and has package managers like Yum and DNF. ๐Ÿฝ๏ธ

  • DEB Package Manager: This system is commonly found on Debian-based distributions, and it features package managers like apt-get and aptitude. ๐Ÿงญ

Now, let's get our hands dirty and install Docker and Jenkins on Ubuntu and CentOS using these package managers! ๐Ÿงฐ

๐Ÿณ Installing Docker with Package Managers ๐Ÿณ

Ubuntu - Using apt-get ๐Ÿ…

To install Docker on Ubuntu, open up your terminal and type in the following command:

$sudo apt-get update
$sudo apt-get install docker.io

CentOS - Using yum ๐Ÿฎ

For CentOS, use the yum package manager to install Docker:

$sudoy  yum update
$sudo yum install docker

๐Ÿ”จ Installing Jenkins with Package Managers ๐Ÿ”จ

Ubuntu - Using apt-get ๐Ÿ…

To install Jenkins on Ubuntu, follow these commands:

$sudo apt-get update
$sudo apt-get install jenkins

CentOS - Using yum ๐Ÿฎ

For CentOS, use the yum package manager to install Jenkins:

$sudo yum update
$sudo yum install jenkins

๐Ÿ”Ž systemctl and systemd - Managing Services ๐Ÿ”Ž

Now that we have Docker and Jenkins installed, let's learn about systemctl, which helps us examine and control services managed by systemd. ๐Ÿ› ๏ธ

systemd is the superhero that manages services on Unix-like operating systems (most of them, not all). It handles starting, stopping, and maintaining these services with ease. ๐Ÿฆธโ€โ™‚๏ธ

๐Ÿ‹ Checking Docker Service Status ๐Ÿ‹

To check the status of Docker service, simply enter the following command:

$systemctl status docker

๐Ÿ›‘ Stopping Jenkins Service ๐Ÿ›‘

Let's put Jenkins on pause for a moment. Use the following commands to stop the Jenkins service:

$sudo systemctl stop jenkins

๐Ÿ“ธ Before and After Screenshots ๐Ÿ“ธ

Take screenshots before stopping the Jenkins service and after stopping it, and witness the magical change! โœจ

๐Ÿ“œ systemctl vs service - The Showdown ๐Ÿ“œ

Now, let's get into a thrilling showdown of systemctl vs service! ๐Ÿ‘Š

Both systemctl and service are used to control services, but systemctl is the newer, more powerful contender, while service is the traditional champion. ๐Ÿฅ‹

To check the Docker status, use:

$systemctl status docker

๐Ÿ’ป vs ๐Ÿ–ฅ๏ธ

$service docker status

In this corner, we have systemctl with its detailed status report, and in the opposite corner, we have the service command with its compact display. ๐ŸฅŠ

Choose your fighter and unleash the power of service management! ๐Ÿฅ‹๐Ÿ›ก๏ธ

There you have it, folks! We've explored the enchanting world of package managers, installed Docker and Jenkins on Ubuntu and CentOS, and discovered the might of systemctl and systemd. ๐ŸŒŸ

Remember, with package managers at your disposal, installing and managing software becomes as easy as a few magical commands! So go ahead, explore, and make the most of these powerful tools. Happy coding! ๐Ÿš€๐Ÿ”ฅ

I hope you enjoyed this thrilling adventure! Until next time! ๐Ÿ‘‹๐Ÿ˜Š

Hope you like my blog...!

If you like the content follow me on LinkedIn: https://www.linkedin.com/in/ashok-sana

Follow my Whatsapp & telegram community: https://chat.whatsapp.com/BzX1aruZIH645l29LxvgO3

https://t.me/ExplorewithAshok

Happy learning......!

Did you find this article valuable?

Support Ashoksana by becoming a sponsor. Any amount is appreciated!

ย