Day-7- Understanding Package Manager and Systemctl:

Day-7- Understanding Package Manager and Systemctl:

What is a package manager:

Data Governance and BI Compliance - b.telligent

A package manager in Linux is a software tool that helps users to install, remove, and manage software packages on their system. It automates the process of finding, downloading, and installing packages, as well as managing dependencies between packages.

There are several popular package managers available for Linux, including APT (Advanced Package Tool) used by Debian and Ubuntu, RPM (Red Hat Package Manager) used by Red Hat, CentOS, and Fedora, and Pacman used by Arch Linux. Each package manager has its own set of commands and syntax, but they all serve the same purpose of simplifying the process of installing and managing software on a Linux system.

Different kinds of package managers:

  1. APT (Advanced Package Tool): APT is the default package manager used by Debian and its derivatives, such as Ubuntu and Linux Mint. It is a command-line tool that can install, update, and remove packages and their dependencies.

  2. YUM (Yellowdog Updater Modified): YUM is the default package manager used by Red Hat, CentOS, and Fedora. It is a command-line tool that can install, update, and remove packages and their dependencies.

Docker Installation:

Best and Cheap Docker Hosting in Australia Click Here!! | ASP.NET ...

Update the package list:

sudo apt-get update

Install the Docker package and its dependencies:

sudo apt-get install docker.io

Check the version of Docker:

docker --version

Installing Jenkins:

Continuous Integration and Deployment Products & Reviews

Step-1 Installing Java:

sudo apt-cache search openjdk
sudo apt-get install fontconfig openjdk-11-jre

Step-2 Check java Version:

java --version

Step-3 Add Jenkins Repository:

curl -fsSL https://pkg.jenkins.io/debian/jenkins.io-2023.key | sudo tee \
    /usr/share/keyrings/jenkins-keyring.asc > /dev/null

Step-4 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 binary/ | sudo tee \
    /etc/apt/sources.list.d/jenkins.list > /dev/null

1. Update the system repository one more time. Updating refreshes the cache and makes the system aware of the new Jenkins repository.

sudo apt update

Step-6 Run Installing Jenkins:

sudo apt-get install jenkins

To check if Jenkins is installed and running, run the following command:

sudo systemctl status jenkins

Step-7 Open port 8080 by running the following commands:

sudo ufw allow 8080
sudo ufw status

Step-8 Open a web browser and navigate to your server's IP address. Use the following syntax:

http://ip_address_or_domain:8080

Note: use your Instance Public id if you are using Instance as your Server:

here It will ask for a password to log in as path of the password is highlighted in red colour just copy it and paste into your browser:

Now Just Login into Jenkins:

Create your username and Password:

systemctl and system:

  • Systemd is a system and service manager, while systemctl is a command-line utility for managing system services.

  • Systemd provides a suite of daemons, libraries, and utilities to manage system components, while systemctl is a specific tool within that suite.

check the status of the docker service in your system:

Check the status of the Docker service on your Linux system using the following command in the terminal:

systemctl status docker

To Stop the Service:

To stop the Docker service, you can use the following command in the terminal:

sudo systemctl stop docker

This will stop the Docker service immediately. If you want to prevent the service from starting automatically at boot, you can also disable it using the following command:

sudo systemctl disable docker

check the status of Jenkins service in your system:

systemctl status jenkins

To Stop the Service:

To stop the Jenkins service, you can use the following command in the terminal:

sudo systemctl stop jenkins

Note: I have used APT PackageManager here to install both Jenkins and Docker

APT (Advanced Package Tool) is a package manager used in Debian-based Linux distributions like Ubuntu, Linux Mint, and Debian itself. APT provides a simple way to manage packages, which are collections of software files that can be installed and removed from the system.

-------------- THANK YOU -----------------