Day 7 Task: Understanding package manager and systemctl-Linux
Deepak Patil
DevOps engineer with 3+yrs DevOps/ DevSecOps/ Cloud Experience in AWS?? | DevOps ?? Technologies ?????? Linux ??? | Git ?? | Terraform?? | Docker ?? | Kubernetes | EKS | HELM | ? | Jenkins ???.
What is a package manager in Linux?
What are package managers In Linux Package Managers are essentially?software applications?that help users to Search, Download, Install, Remove, and Update software applications on their computer operating system. These can be either Command Line tools or a complete Graphical User Interface application.
What is a package?
A package is usually referred to as an application but it could be a GUI application, command line tool, or a software library (required by other software programs). A package is essentially an archive file containing the binary executable, configuration file, and sometimes information about the dependencies.
Different kinds of package managers
Package Managers differ based on the packaging system but the same packaging system may have more than one package manager.
For example, RPM has Yum and DNF, package managers. For DEB, you have apt-get, aptitude command line-based package managers.
Task-1: You have to install docker and Jenkins in your system from your terminal using package managers
Steps to install Docker in Ubuntu operating System
Steps to install Jenkins in Ubuntu operating System
Step 1: Install Java
Jenkins requires the Java Runtime Environment (JRE).
1.?Check if you already have java?installed on your Ubuntu system:?java --version
2. Depending on which Java version you want to install, Java 8 or 11, run one of the following commands:
To install OpenJDK 8, run:? sudo apt install openjdk-8-jdk -y?
To install OpenJDK 11, run:? sudo apt install openjdk-11-jdk -y
Step 2: Add Jenkins Repository
It is recommended to install Jenkins using the project-maintained repository, rather than from the default Ubuntu repository. The reason for that is because the Jenkins version in the default Ubuntu repository might not be the latest available version, which means it could lack the latest features and bug fixes.
1. Start by importing the GPG key. The GPG key verifies package integrity but there is no output. Run:
curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo tee /usr/share/keyrings/jenkins-keyring.asc > /dev/null
2. Add the Jenkins software repository to the source list and provide the authentication 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
Step 3: Install Jenkins
1. Update the system repository
sudo apt update
2. Install Jenkins by running:
sudo apt install jenkins -y
领英推荐
3. To check if Jenkins is installed and running, run the following command:
sudo systemctl status jenkins?
A bright green entry labeled?active (running)?should appear in the output, indicating that the service is running.
Stop the service Jenkins and post before and after screenshots.
Before stop Jenkins service:
Use- sudo systemctl status jenkins
After stop Jenkins service:
Use- 1. First stop jenkins service: sudo systemctl stop jenkins
2. Then Check jenkins service: sudo systemctl status jenkins
Difference between systemctl and service command
To start, stop, and restart the service, we can run the respective commands with?systemctl:
1. To start Jenkins service Syntax:? sudo systemctl start jenkins
2. To stop Jenkins service Syntax:? sudo systemctl stop jenkins
3. To check Jenkins status Syntax:? sudo systemctl status jenkins
4. To enable Jenkins service Syntax:? sudo systemctl enable jenkins
To start, stop, and restart the service, we can run the respective commands with?service:
1. To start Jenkins service Syntax:? sudo service jenkins start
2. To stop Jenkins service Syntax:? sudo service jenkins stop
3. To check Jenkins status Syntax:? sudo service jenkins status
4. To enable Jenkins service Syntax:? sudo service jenkins enable
Thank you for reading this article...
Happy Learning!
Python Programming | SQL | Linux | MySQL | Flask | Django | Git & Github |
2 年????
RPA Developer | Python | Data Analytics|Automation Anywhere 360 | MS SQL
2 年Really informative....simply explained ??