How to Setup Local HTTP Yum Repository on CentOS 7

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Aaron Kili

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

29 Responses

  1. Bobby says:

    Thanks for the article. Works good but how do you create a epel offline repo? I used the steps to add epel download and it works but the client errors out as the epel repo folder does not have repodata folder even though I have the switch --download-metadata.

  2. Jack Ka says:

    Hi,

    I can’t yum anything from client when i was config follow this article.

    [[email protected] ~]# yum repolist all
    Loaded plugins: fastestmirror, langpacks
    http://nginx.htp.local/base/repodata/repomd.xml: [Errno 14] HTTP Error 403 - Forbidden
    Trying other mirror.
    http://nginx.htp.local/base/repodata/repomd.xml: [Errno 14] HTTP Error 403 - Forbidden
    Trying other mirror.
    http://nginx.htp.local/centosplus/repodata/repomd.xml: [Errno 14] HTTP Error 403 - Forbidden
    Trying other mirror.
    http://nginx.htp.local/extras/repodata/repomd.xml: [Errno 14] HTTP Error 403 - Forbidden
    Trying other mirror.
    http://nginx.htp.local/updates/repodata/repomd.xml: [Errno 14] HTTP Error 403 - Forbidden
    Trying other mirror.
    repo id                                                 repo name                                                 status
    local-base                                              CentOS Base                                               enabled: 0
    local-centosplus                                        CentOS CentOSPlus                                         enabled: 0
    local-extras                                            CentOS Extras                                             enabled: 0
    local-updates                                           CentOS Updates                                            enabled: 0
    

    But when I yum update is failed:

    failure: repodata/repomd.xml from local-base: [Errno 256] No more mirrors to try.
    http://nginx.htp.local/base/repodata/repomd.xml: [Errno 14] HTTP Error 403 - Forbidden
    
  3. Ziad says:

    Hi

    I’m try to execute this command

    # createrepo -g comps.xml /var/www/html/repos/centosplus/	
    # createrepo -g comps.xml /var/www/html/repos/extras/  
    # createrepo -g comps.xml /var/www/html/repos/updates/  
    

    but it show me error like this:

    Error: groupfile /var/www/html/repos/centosplus/comps.xml cannot be found.
    Error: groupfile /var/www/html/repos/extras/comps.xml cannot be found.
    Error: groupfile /var/www/html/repos/updates/comps.xml cannot be found.
    
  4. Chris Pesoa says:

    Hi,

    How much resources should we allocate for the repo server?

    RAM/HDD/Swap, etc.

    Thanks.

Got something to say? Join the discussion.

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.