How do I add a new RPM/yum repo in Fedora?

To enable a new yum repository, you can add a .repo file for yum under /etc/yum.repos.d/.

For example, to add a repository to install google’s Chrome browser add a file (e.g. chrome.repo) in the /etc/yum.repos.d directory and copy the following to it:

name=google-chrome - 64-bit

You may also append the new repositories info to the /etc/yum.conf file but the above is a cleaner method. It’s recommended.

Another method, if you know the URL of an RPM file but it is not a part of any repository you can just do:

rpm -ivh

Replace the http above by ftp if the file is provided via ftp.

Leave a comment

Your email address will not be published. Required fields are marked *