To setup a yum repository on Cent OS
Hi all,
I am new to Linux and this is my first post in the forum. I have practiced the yum commands like install, update, etc. Now I am trying to set up a yum repository on my CentOS 6.3 x86_64. I am following the link: http://www.harker.com/virtual/yumrepo.html I created /var/www/html/centos/6/os/x86_64 and /var/www/html/centos/6/update/x86_64/ Copied the rpms to /var/www/html/centos/6/os/x86_64 Ran createrepo /var/www/html/centos/6/os/x86_64 and got the gz files created inside /var/www/html/centos/6/os/x86_64 The next step I am supposed to do is rsync. Different sites give different url for this command: eg: /usr/bin/rsync -iavrt rsync://mirrors.kernel.org/centos/5.2/updates/i386/ /var/www/html/centos/5.2/updates/i386/ /usr/bin/rsync -avrt rsync://ftp.riken.jp/centos/4/updates/i386 --exclude=debug/ /var/www/html/centos/4/updates/ What URL should I use for rsync? Also, How to make sure that I am now using the local repository or Cent OS repository. I typed #yum repolist but couldn't make out much from that. Please pardon me if I had asked silly questions, but please do reply. |
Just follow that link, but use the correct versions ie 6.3 instead of 5.2 and x86_64 instead of i386.
You check the remote repo path etc here https://www.centos.org/modules/tinyc...ndex.php?id=32. Pick the nearest one ideally. Here's a way to do it from your install media https://code.google.com/p/iredmail/w...Yum_Repository |
Also be aware that 6.3 is not supported any longer
6.4 is the only 6 series that is supported time to upgrade Code:
su - |
Thanks a lot chrism01 and John VV.
It worked!!!!! yum reposlist gave me below list and I have a new entry for the local repository and the components in repolist is also more. * base: mirror.nbrc.ac.in * extras: mirror.nbrc.ac.in * updates: mirror.nbrc.ac.in repo id repo name status MailRepo MyownMailRepo 3,887 base CentOS-6 - Base 6,381 extras CentOS-6 - Extras 12 updates CentOS-6 - Updates 467 repolist: 10,747 After that i did yum installed a component it got installed saying ================================================================================ Package Arch Version Repository Size ================================================================================ Updating: zlib x86_64 1.2.3-29.el6 base 73 k Does this mean it is still using the same base repository? I have copied every package to my local repository. I have a very fundamental doubt also.. Even if I was NOT connected to internet, and while NOT having a local repository, I could still run the yum commands like reposlist, list etc (listed everything otherthan my local repository details which was setup later). How could that be possible ?? Thanking you againg for your valuable comments in last psots.. :-) |
The cmd attempts to list all the repos you got configured in /etc/yum.repos.d/. Whether or not you can reach those distros is a different qn ;)
|
Oh.. Is it.. Later I installed components using yum install and it got installed.
But my double is how can make sure that it got installed from my new repository and not from the previous public repository. Please help me out. |
Does it matter ? If both local and remote repos are for the correct version of the current system (and you should get errors if not) it likely doesn't.
You can check the exact version installed by Code:
rpm -qa|grep -i <pkgname> Your local one will not unless you update it manually & frequently.. ;) Local repos are usually only used by systems that cannot see the internet ; this leads to solns like Spacewalk/Satellite. http://spacewalk.redhat.com/ |
Quote:
Code:
# yum clean all |
All times are GMT -5. The time now is 01:09 AM. |