Yum install command

So I tried to install firefox from the provided rpm file . The filename of the Firefox rpm package was lengthy . But in the exercise hint

yum install firefox

was given as the solution . How is that lengthy rpm file name mapped to this Firefox command …

please elaborate ideally it should have been like below

yum install firefox.-68.6.centos.x64.rpm

Hello,

Here is a nice cheat sheet on yum - https://cheatography.com/misterrabinhalder/cheat-sheets/yum/pdf/

yum install packagename - will always install the latest package applicable for the host where we are installing.

yum install packagename:versionrelease.architecture - To install exact version and architecture of a package

After installing the latest version of a package using yum install package, in case we need to downgrade to a specific version we use
yum downgrade packagename:versionrelease.architecture

In case the RPM is already avaialble locally - we can use
yum install /path/to/file

Hope that helps.

Thanks,
Mashiur Rahman

1 Like

Hi … now it’s a bit clear but how do I know the right package name to install Firefox . Is it in the repo file which the video mentioned about or do I need to simply Google the package name of Firefox and find it … for example I might need to install chrome and it’s package name may be chromebrowser (hypothetical ly) and when I give yum install chrome it won’t work …here if I want to find the right package name of chrome should I query or search the repo file ?

1 Like

Hi @shhl.basha333,

You can check the packages installed and available for installation using the command:-
$ yum list all
The list will be presented based on your repository configuration.

I have checked if a particular package is available in my repository or not using grep

In case a package is not available in your repository configuration - I will have to include the same in your repository. Steps to do so is provided in the following link.
https://www.cyberciti.biz/faq/howto-install-google-chrome-on-redhat-rhel-fedora-centos-linux/
Find for the section - A note about Google chrome repo file in the above link.

Also, please note - you might have to perform some google searches to arrive at the base-url of the repository.

:+1:,
Mashiur Rahman

Hello @mashiurrahman

So basically have to make do some guess work (meaningful) with the name of the program that I want to install to see if the package is already available or do google search correct?

I did encounter this while installing cron. One of the task for KodeKloud Engineer had to install cronie but that was CENTOS. I tried similar thing in the Linux Basic Lab (apt install cronie). That did not work since Linux Basic labs are ubuntu distribution. Finally i found in google i can install Cron i.e. apt install cron.