Skip to main content

Command Palette

Search for a command to run...

Day:7 Simplifying DevOps Tool Installation with Package Managers on Ubuntu and CentOSπŸš€

Day#7 of the #90DaysOfDevOps Challenge!

Published
β€’5 min read
Day:7 Simplifying DevOps Tool Installation with Package Managers on Ubuntu and CentOSπŸš€
V

Experienced QA professional with a passion for manual and automation testing. Proficient in DevOps practices, ensuring seamless integration and continuous delivery. Dedicated to ensuring top-notch software quality and efficiency. Eager to contribute my skills to Hashnode's vibrant tech community. Let's collaborate and create exceptional experiences!

πŸ“¦ Introduction πŸš€

In the world of DevOps, the ability to efficiently manage software installations and dependencies is crucial. Package managers in Linux play a vital role in simplifying this process by automating the installation, configuration, and removal of software packages. πŸ’»

So, In this blog, we'll explore what package managers are, different types of packages, and how to install Docker and Jenkins using package managers on Ubuntu and CentOS. πŸ³πŸ”§

Additionally, we'll take a look at systemctl and systemd to manage services and check the status of Docker. πŸ› οΈπŸ‹

Let's dive in! πŸ’‘πŸŠβ€β™‚οΈ

πŸ” What is a Package Manager in Linux? πŸ“¦πŸ§

A package manager is a crucial tool that simplifies the management of software packages on Linux-based operating systems. Its core functions involve facilitating the installation, updating, and removal of software packages. The package manager efficiently handles dependencies, ensuring that all essential components are correctly installed.

Additionally, it oversees repositories, which store collections of software packages, and automates the retrieval of packages from these repositories during the installation process.

This approach streamlines software management and provides Linux users with a seamless and hassle-free experience. πŸš€πŸ’»βœ¨

πŸ“¦ What is a Package? πŸ“¦

In the context of Linux package management, a package is like a magical 🎁 compressed archive that contains all the necessary files πŸ“‚, metadata πŸ“„, and instructions πŸ“ required for the installation and configuration of a specific software application.

Packages typically have file extensions such as .deb for Debian-based systems like Ubuntu and .rpm for Red Hat-based systems like CentOS. πŸ§πŸ’»

πŸ“¦πŸ’» Different Kinds of Package Managers πŸ“¦πŸ’»

Linux enthusiasts know that package managers are the backbone of a smooth and efficient software management experience. These nifty tools allow users to easily install, update, and remove applications while handling dependencies seamlessly. Let's explore some popular package managers and their corresponding emojis:

  1. Advanced Package Tool (APT) for Debian and Ubuntu πŸš€πŸ“¦ APT, represented by πŸš€πŸ“¦, is the rocket-fast package manager used in Debian and its derivatives like Ubuntu. It's loved for its reliability and ease of use, making software installation a breeze for millions of users worldwide.

  2. Yellowdog Updater, Modified (YUM) for CentOS and Red Hat πŸ•πŸ”„πŸŽ© YUM, symbolized by πŸ•πŸ”„πŸŽ©, is the trusty package manager that serves CentOS and Red Hat distributions. This clever dog fetches software packages and updates with a hat-tip of elegance, ensuring smooth package management for system administrators and users alike.

  3. DNF (Dandified YUM) for modern Fedora systems πŸ¦ŒπŸŽ©πŸ“¦ DNF, represented by πŸ¦ŒπŸŽ©πŸ“¦, gracefully took the reins from YUM to become the default package manager in modern Fedora systems. This dandy deer brings a touch of refinement to package management, providing faster performance and resolving dependencies with ease.

Now, let's put this knowledge into action and dive into the practical part of our blog! πŸ› οΈπŸ’» Remember to choose the right package manager for your Linux distribution to unlock a world of software possibilities. Happy exploring! 🌟😊

🐳Installing Docker and Jenkins Using Package Managers

πŸ“¦Installing Docker on Ubuntu: To install Docker on Ubuntu

follow these steps: Open your terminal. Execute the following commands:

πŸ“¦Installing Docker on CentOS: To install Docker on CentOS

follow these steps: Open your terminal. Execute the following commands:

πŸ“¦ Installing Jenkins on Ubuntu and CentOS

Both Ubuntu and CentOS use Java to run Jenkins, so we need to install the Java Development Kit (JDK) first.

For Ubuntu: To install Jenkins on Ubuntu, execute the following steps:

Install the Java Development Kit (JDK):

Proceed to install Jenkins:

For CentOS: To install Jenkins on CentOS, execute the following steps:

Install the Java Development Kit (JDK):

Proceed to install Jenkins:

🧠 Understanding systemctl and systemd

systemd is a system and service manager for Linux, while systemctl is the command-line tool used to control and manage services using systemd. It allows us to start, stop, restart, enable, and disable services easily.

πŸ’‘ Difference between systemctl and service

both systemctl and service are commands used in Linux-based operating systems to manage system services.

However, systemctl is a more modern and advanced command, while service is a legacy command used in older Linux distributions.

Let's take a closer look at the differences between systemctl and service, along with their respective usage examples.

systemctl: It is the primary service management tool in systems that use the systemd init system. systemd is a system and service manager that has replaced the traditional SysV init system in many modern Linux distributions. systemctl allows you to control the system and service state, enable or disable services to start at boot and query the status of services.

To check the status of the Docker service:

To start the Docker service:

To stop the Docker service:

To enable the Docker service to start at boot:

To disable the Docker service from starting at boot:

service: service is a command used to interact with SysV init scripts, the traditional initialization system used in older Linux distributions. While service can still be found in many systems, it is considered a legacy command, and newer systems that use systemd tend to favor systemctl.

To check the status of the Docker service using the service:

To start the Docker service using the service:

To stop the Docker service using service:

To restart the Docker service using the service:

πŸŽ‰ Conclusion πŸŽ‰

In this blog, we've explored the importance of package managers in Linux, the different types of packages, and how to install Docker and Jenkins using package managers on Ubuntu and CentOS.

Additionally, we've learned about systemctl and systemd for managing services and checking the status of Docker.

By leveraging package managers, DevOps professionals can efficiently handle software installations and focus on delivering robust and reliable applications. πŸ’ͺπŸš€

Thank you for taking the time to read this blog. I hope you found the information helpful and insightful. So please keep yourself updated with my latest insights and articles on DevOps πŸš€ by following me on :

Hashnode: vishaltoyou.hashcode.dev

LinkedIn: linkedin.com/in/vishalphadnis

So, Stay in the loop and stay ahead in the world of DevOps!

Happy learning and Linux-ing πŸš€πŸ˜ŠπŸ§πŸ“¦πŸ”§πŸ› οΈπŸ’»πŸ’ΌπŸ”πŸ“ˆπŸš€πŸŒŸπŸ“ŠπŸ“š