YUM installer tool
More sooner than later you’ll find yourself using “yum” when installing software on your Linux CentOS 7, and that’s because yum has become the most useful tool to manage packages its dependencies and repositories.
What YUM does is to connect to a software repository to download and install the software for you, taking care at the same time of any possible dependency needed.
RPM is still an option when it comes to install software but it requires a lot more work on your part to download the software first, download all the dependencies and run the rpm command to install the software.
For what YUM stands for?
YUM stands for Yellowdog Updater, Modified, it is a command-line package management utility for RPM-based Linux systems.
RPMRed-hat Package Manager
Yum is useful for RPMs which have dependencies, what yum will do is to search for all dependencies of any RPM in all available repositories.
Commonly used YUM repositories
We need repositories to keep our systems up to date with the latest packages, because these repositories have all the RPMs required for our servers, the following list shows the most commonly used repositories.
These repositories are created, maintained, and managed by Linux’s professional programmers, just as an example, the following GitHub link belongs to the creator or REMI repository:
How to check repositories
You can check all the available repositories for your system, both Enabled and Disabled using the following CLI command.
yum repolist all
How to install YUM utils
yum install yum-utils
One of the main and most useful programs provided by yum-utils is yum-config-manager, which you can use to enable Remi repository as the default repository for installing different PHP versions.
Another usefull tool included between the “yum-utils” is “repoquery” that can be used to “query” a given “YUM Package” to get a list of all the files that have been installed by that particular package.
YUM Utils installation log
[root@centos7 ~]# yum install yum-utils Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.itsbrasil.net * extras: mirror.ci.ifes.edu.br * updates: linorg.usp.br Resolving Dependencies --> Running transaction check ---> Package yum-utils.noarch 0:1.1.31-52.el7 will be installed --> Processing Dependency: python-kitchen for package: yum-utils-1.1.31-52.el7.noarch --> Processing Dependency: libxml2-python for package: yum-utils-1.1.31-52.el7.noarch --> Running transaction check ---> Package libxml2-python.x86_64 0:2.9.1-6.el7_2.3 will be installed ---> Package python-kitchen.noarch 0:1.1.1-5.el7 will be installed --> Processing Dependency: python-chardet for package: python-kitchen-1.1.1-5.el7.noarch --> Running transaction check ---> Package python-chardet.noarch 0:2.2.1-3.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================================ Package Arch Version Repository Size ================================================================================================ Installing: yum-utils noarch 1.1.31-52.el7 base 121 k Installing for dependencies: libxml2-python x86_64 2.9.1-6.el7_2.3 base 247 k python-chardet noarch 2.2.1-3.el7 base 227 k python-kitchen noarch 1.1.1-5.el7 base 267 k Transaction Summary ================================================================================================ Install 1 Package (+3 Dependent packages) Total download size: 862 k Installed size: 4.3 M Is this ok [y/d/N]: y Downloading packages: (1/4): python-chardet-2.2.1-3.el7.noarch.rpm | 227 kB 00:00:15 (2/4): libxml2-python-2.9.1-6.el7_2.3.x86_64.rpm | 247 kB 00:00:15 (3/4): yum-utils-1.1.31-52.el7.noarch.rpm | 121 kB 00:00:00 (4/4): python-kitchen-1.1.1-5.el7.noarch.rpm | 267 kB 00:00:00 ------------------------------------------------------------------------------------------------ Total 53 kB/s | 862 kB 00:00:16 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : python-chardet-2.2.1-3.el7.noarch 1/4 Installing : python-kitchen-1.1.1-5.el7.noarch 2/4 Installing : libxml2-python-2.9.1-6.el7_2.3.x86_64 3/4 Installing : yum-utils-1.1.31-52.el7.noarch 4/4 Verifying : python-kitchen-1.1.1-5.el7.noarch 1/4 Verifying : yum-utils-1.1.31-52.el7.noarch 2/4 Verifying : libxml2-python-2.9.1-6.el7_2.3.x86_64 3/4 Verifying : python-chardet-2.2.1-3.el7.noarch 4/4 Installed: yum-utils.noarch 0:1.1.31-52.el7 Dependency Installed: libxml2-python.x86_64 0:2.9.1-6.el7_2.3 python-chardet.noarch 0:2.2.1-3.el7 python-kitchen.noarch 0:1.1.1-5.el7 Complete!
How to use Yum-config-manager
We already saw with the command “find” that our system has several PHP versions inside the REMI folder, we can then choose one of them and enable it using the yum-config-manager, as shown below:
- yum-config-manager –enable remi-php73
Basically, whatever is inside REMI can be enabled using the above command.