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...

2 Responses

  1. virgilhsu says:

    Thanks for your share, I have do it by your solution step by step, but when I run the following command.

    # createrepo -g comps.xml /usr/share/nginx/html/repos/centosplus/
    Error: groupfile /usr/share/nginx/html/repos/centosplus/comps.xml cannot be found.
    

    In my Nginx root directory /usr/share/nginx/html, I run the following command.

    # createrepo  /usr/share/nginx/html/repos/centosplus/
    

    It`s done by no problem,finally, I run this command in a client centos7 pc:

    # yum repolist
    http://172.16.1.91/repos/base/repodata/repomd.xml: [Errno 12] Timeout 
    on http://172.16.1.91/repos/base/repodata/repomd.xml: 
    (28, 'Connection timed out after 30001 milliseconds')
    Trying other mirror.
    

    The 172.16.1.91 is the repos server,how to fix this problem?

    • Aaron Kili says:

      @virgilhsu

      Did you add the local repo config on the client machine as shown? If yes, did you use the correct URL for all the repos? Is your client able to connect to the server, you can check using ping command.

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.