Wednesday, February 10, 2016

How to Manage Software Repositories in RedHat Enterprise Linux

Software management is performed using the 'yum' utility in RedHat Enterprise Linux. Software sources or software repositories could be a media (cd), nfs or a ftp location.

  • Add a new repository:

    To add a new repository, first create a file under /etc/yum.repos.d/example.repo. Remember that the extension has to be .repo. Then run the following command to validate the repository.

    ]# yum repolist

    If the information provided in the .repo file is verified, the repository will be contacted and the file_list gets downloaded. Software hosted by that repository can then be installed onto the system.

  • Enable/Disable a repository:

    To enable an already added repository, run the following command.

    ]# yum-config-manager --enable repo_name

    To disable a repository, run the following command.

    ]# yum-config-manager --disbale repo_name

  • Delete a yum repository:

    To delete a yum repository, first delete the .repo file created at /etc/yum.repos.d/ and then run the following command. This would update the list of repositories.

    ]# yum repolist

  • List all available repositories with details:

    To list all available repositories with full details, run the following command.

    ]# yum-config-manager

0 comments:

Post a Comment