Hi, we continue to Linux articles in this article we will look at package management and package & program installation.
Package Management :
If we use the Linux operating system as Desktop or Server, we do this through the terminal when we install a program or package.
This may be due to faster opening of the terminal and running the command. Since the machines we use as servers do not have a specific GUI, we have to do this from the terminal.
However, if our Linux operating system is used as desktop, we can download the application by searching through our web browser and finding the appropriate linux version. In this article, we will perform our operation over the terminal while installing our applications.
The Linux operating system has different distros, such as Red Hat, Ubuntu, Linux Mint, Oracle Linux, etc.
Although these operating systems basically use linux kernels, they are different from each other with their specific features, but we will look at the topic before we go into this topic in depth.
There are multiple installation tools for installing packages & programs on Linux operating systems. Each version has ready-to-install package installation commands.
For example, rpm comes with Red Hat ready. Available in versions like Ubuntu, Mint, apt. Oracle comes with linux, yum.
These bundled installers come ready when the operating system is installed, but we can install another bundled installer and download from it.
Let’s try a small example and try to understand the big picture.
Suppose we want to download mysql-server to our operating system and try to do this via the terminal.
I’m currently using yum (Yellowdog Updater Modified) command because I’m doing my examples on Oracle linux.
This command has more than one parameter and usage, but most basically when we want to make an installation, yum install package_name
yum install mysql-server
Waiting for y or n commands. Let’s download it or not!
Now what matters is how this system works rather than the applications we have downloaded. Because we may not always be able to download what we want to download so quickly.
So this is how mysql-server or filezilla, Chrome etc are dowloading these programs.
The yum package manager installs its configuration file and a repository directory under / etc when the operating system is installed.
The configuration file actually points to the repo directory. What does the repo directory do?
Let’s go from bottom to top, we
yum install mysql-server. package manager first looked at these addresses,
It was then prepared to begin downloading without searching for more repos.
The mysql-server package and the required packages to be installed are in the public_ol6_latest repo.
When we look inside the file, there are various configurations and given parameters.
However, what is important for now is
#PUT YOUR REPOS HERE OR IN separate files named file.repo
If we create our own repos and put them in this file and make the necessary configurations, the programs we will download start to use this repo.
Let’s see what’s in this file.
As you can see in the picture, we do your downloads using Oracle’s repos. If you remember you had just told us the address of the repo when downloading mysql-server.
Let’s copy the URL of this repo and paste it into our web browser.
Oracle has made two different directories according to the operating system version. Let’s look at the x86.
When I come to the letter m alphabetically, we see that there are many packages, programs etc. related to mysql.
You can read following article to learn other GNU/Linux bash command tutorials.
Do you want to learn Linux System Administration for Beginners, then read the following articles.
326 views last month, 3 views today