In a Linux environment, services play a vital role in ensuring the smooth functioning of various applications and processes. Docker and Jenkins are two popular services used by developers and system administrators. In this blog post, we will explore how to check the status of the Docker service, and then we will stop the Jenkins service, capturing before and after screenshots. Additionally, we will delve into the differences between systemctl
and service
commands, providing clarity on their usage. Let's dive in and become service management experts! ๐ ๏ธ๐
Introduction:
Package managers are essential tools for any Linux user, as they simplify the process of installing, updating, and managing software packages. Ubuntu and CentOS, two popular Linux distributions, have their respective package managers: "apt" for Ubuntu and "yum" for CentOS. In this blog post, we will walk you through the steps to install some commonly used tools on both Ubuntu and CentOS using their package managers.
Tasks
1. You have to install docker and jenkins in your system from your terminal using package managersInstalling Docker on Ubuntu:
a. Update Package Lists:
sudo apt update
b. Install Docker:
sudo apt install docker.io
c. Start and Enable Docker Service:
sudo systemctl start docker
sudo systemctl enable docker
d. Verify Docker Installation:
docker --version
Installing Jenkins on Ubuntu and CentOS:
a. Import Jenkins GPG Key:
wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
(For CentOS, replace "debian" with "redhat" in the URL.)
b. Add Jenkins Repository to Package Manager:
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
d. Install Jenkins:
sudo apt install jenkins
2.check the status of docker service in your system
sudo systemctl status docker
Stopping the Jenkins Service ๐
Next, let's proceed with stopping the Jenkins service and capturing before and after screenshots:
Step 1: Check Jenkins Status
systemctl status jenkins
This will display the current status of the Jenkins service, whether it is active or inactive, and any relevant information.
Step 2: Stop Jenkins Service
sudo systemctl stop jenkins
This command will stop the Jenkins service, preventing it from running until it is manually started again.
Step 3: Confirm Jenkins Status
systemctl status jenkins
After stopping the service, recheck the status to verify that the Jenkins service is now inactive.
Thank you for reading! ๐ Your support means the world to me. Let's keep learning, growing, and making a positive impact in the tech world together.