Creating Offline Repositories for CentOS / RHEL – Part 1

I’ve started doing more and more with linux, I wanted a way to store updates and packages offline – in the same way we do for Windows using WSUS and SCCM etc… This is how to host offline repositories, it may not be the most secure method – but is aimed at LAN hosting where you trust the LAN members!

  • Set up a server to host the RPM content, I used CentOS 7.
  • Install a web server service, I used nginx – my base path is /var/www/html
  • Create a folder for the repo you want to host – in this example I’m going to use “base”
  • Use reposync to download the RPM’s
    • reposync -p /var/www/html -r base -l
  • Create a repo
    • createrepo /var/www/html/base
  • Update the repo after a reposync
    • createrepo –update /var/www/html/base

You can now amend your yum config files on clients to use this repo, I will post another entry sometime with more information on how to automatically update the repo.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s