Setting Up the Repo Location
- Make a directory in which you will store the RPMs from the CentOS disc
- Copy the disk contents to that directory
- Ensure your destination directory is writable
mkdir -p /rpm-packages
rsync -avHx /rpm-packages-source /rpm-packages-destination
chmod 666 /rpm-packages-destination
Configuring the CentOS Client
Creating the Repo Files
- Install createrepo in order to create repo data
- Mount the rpm packages from the CentOS disc so we can create some repo files
- Create the repo files using the installed createrepo command
- Copy the repo data you created to the /repo-pacakages-destination
yum -y install createrepo
mount /rpm-packages /mnt/rpm-local-mount
createrepo -v /mnt/rpm-local-mount --outputdir /home/
rsync -avHx /home/repodata root@repo-server:/rpm-packages-destination
Creating the repo file and verifying
- Create the local repo file
- Verify you can connect the repo
vi /etc/yum.repos.d/local.repo [centos-disc] name=CentOS repository in Sandvine Waterloo LAB baseurl=ftp://repo-server/rpm-packages-destination enabled=1 protect=0 gpgcheck=0
yum repolist
http://linuxchallenges.blogspot.ca/2012/03/local-yum-repository-on-red-hat-6centos.html
http://www.bestdesigns.co.in/blog/create-yum-repository-local-machine
http://howtoinstallit.wordpress.com/2013/04/26/how-to-create-local-yum-repository-in-centos-6-4/
http://www.planet-heisel.de/joomla/index.php/software-tools/87-software/codeschnipsel/93-repo-centos63
http://boxgrinder.org/tutorials/how-to-use-local-repository/
No comments:
Post a Comment