Concept of yum in RHEL

I have a confusion that even though yum is not configured on my RHEL server but yum list is showing. Yum install <package_name> fails.

I hope, my question is clear of how yum list is working even though yum is not configured on the server.

Please revert with the reply to my query.

Regards

Hello,
exec this command, "yum repolist", to show how many repositories are configured on your system.

1 Like

But,can you please explain with an example. Thanks.

Run the following command as root and report the results:

yum repolist

That is what Mauregato asked you to do.

Please find output of yum repolist:-

Loaded plugins: katello, product-id, security, subscription-manager
Updating certificate-based repositories.
repo id repo name status
Packages server1 3,290
repolist: 3,290

Request you to please explain the output.

Regards

In your output there is no repo's configured. What are the output your getting through yum, all are installed packages.
if yum is configured it will show the repo name (your repo name)

Thanks for your reply. When I do

yum list,

Of the 3 column output, some are coming as installed and some as packages.

I hope, I could explain clearly.

Yes, that is correct output. From the yum nanpage:

       yum list [all | glob_exp1] [glob_exp2] [...]
              List all available and installed packages.

       yum list available [glob_exp1] [...]
              List all packages  in  the  yum  repositories  available  to  be
              installed.

       yum list updates [glob_exp1] [...]
              List   all   packages   with   updates   available  in  the  yum
              repositories.

       yum list installed [glob_exp1] [...]
              List the packages specified by args.  If an  argument  does  not
              match  the  name  of an available package, it is assumed to be a
              shell-style glob and any matches are printed.

       yum list extras [glob_exp1] [...]
              List the packages installed on the system that are not available
              in any yum repository listed in the config file.

       yum list obsoletes [glob_exp1] [...]
              List  the packages installed on the system that are obsoleted by
              packages in any yum repository listed in the config file.

       yum list recent
              List packages recently added  into  the  repositories.  This  is
              often  not  helpful, but what you may really want to use is "yum
              list-updateinfo new" from the security yum plugin.

Yum allows you to install and update software packages from multiple repositories, without having to know which package comes from which repository - Yum tracks and manages all of that for you.

How are you patching and updating your system, if not through yum?

yum check-update
yum update

Those are the two commands I use to check for any available updates, and then to install those updates.

You can do the same thing manually with RPM, but why? It's a whole lot faster and easier using Yum.