What is a package?
A package is a collection of software files that contains everything needed to install and run a particular software program, including executables, libraries, documentation, and configuration files.
Using packages makes it easy to install and update software Instead of having to manually download and install each component of a software program, the package manager takes care of everything automatically.
What is a package manager in Linux?
A package manager is a tool that allows users to install, remove, upgrade, configure and manage software packages on an operating system. A package manager simplifies the management of software.
Different types of package managers are as follows
yum: This is used in Red Hat-based distributions such as CentOS.
apt: This is used in Debian-based distributions such as Ubuntu.
Pacman: Used in Arch Linux
Install Docker on Ubuntu
Remove any docker file running on the system using the below command,
sudo apt-get remove docker docker-engine
docker.io
Update the package database,
sudo apt-get update
Install docker using the below command,
sudo apt install
docker.io
Install all dependency packages,
sudo snap install docker
You can check the version of docker installed using this command,
docker --version
To check the docker installation is done correctly you can run the below command,
sudo docker run hello-world
By following these steps you can successfully install Docker on Ubuntu.
To check the docker status we can use the below command,
systemctl status docker
ORservice docker status
Install Jenkins on Ubuntu
Install Java by using the below command:
sudo apt install openjdk-11-jdk -y
The below command is used to add the Jenkins repository key to your system:
wget -q -O -
https://pkg.jenkins.io/debian-stable/jenkins.io.key
| sudo apt-key add -
Add the Jenkins repository to your system:
sudo sh -c 'echo deb
https://pkg.jenkins.io/debian-stable
binary/ > /etc/apt/sources.list.d/jenkins.list'
Update your package:
sudo apt update
Install Jenkins by using the following command:
sudo apt install jenkins
Now that Jenkins is installed in your system start Jenkins and display the status using the below commands.
sudo systemctl start jenkins
sudo systemctl status jenkins
By following these steps you can successfully install Jenkins on Ubuntu.
systemctl :
systemctl is a command-line utility used in modern Linux distributions that use the systemd init system to manage system services. It allows users to start, stop, restart, reload, enable or disable services, view the status of a service
systemctl start service
: This is used to start a service.
systemctl stop service
: This is used to stop service.
systemctl restart service
: This is used to restart a service.
systemctl enable service
: This is used to enable a service to start automatically at boot time
service:
service is a command-line utility used in Linux distributions that use the traditional SysVinit init system to manage system services. It allows users to start, stop, restart, reload, enable or disable services, and view the status of a service.
service service-name start
: This command is used to start a service.
service service-name stop
: This command is used to stop service.
service service-name restart
: This command is used to restart a service.
Thank you for reading the blog.
Suggestions are always welcome. Thank you !!