Wednesday, August 1, 2012

Create you own repo server CentOS/RedHat/Fedora


The reposync command provides a few major advantages over an rsync based approach:
reposync uses HTTP by default, so it is easier on firewalls you probably already have outbound ports 80/443 open  reposync can use multiple mirrors, as specified in the ‘mirrorlist’ directive. So there is no longer a dependency on a single server on the remote end to be up and running Lastly, and not technically an advantage of reposync itself, but there are significantly more HTTP mirrors than rsync ones, so my reposync scripts can play nicely and distribute the load over a larger number of servers.


On your local server, install reposync


yum install yum-utils -y


For CentOS /Redhat 


# reposync --gpgcheck -l --repoid=rhel-x86_64-server-5 --download_path=/repo-rpms


# cd /repo-rpms


createrepo


Then configure the repository on the client system want to update.


For Feodra



Next, tell reposync to pull down the content


# reposync -r f16-x86-64-release -p /repo-rpms/


Lastly, recreate the yum metadata.


# createrepo /repo-rpm/f16-x86_64-release/

Post a Comment