Hi
I'm thinking about setting up a local / LAN respository for my CentOS, and probably other (Fedora Core) disto's, but have never done it before, so here's some questions:
If I setup a repository, can it hold different distro's / architectures & versions? Say for example, CentOS 4 (i386 & x64), CentOS 5.0 & 5.1 (i386 & x64) - will each one have it's own folder? Will it also be possible to only download the packages that are needed, instead of the whole 4GB repository from the upstream provider? I have some of the CD's or DVD's for all of the distro's, so really only need a few packages now and then, and instead of getting them from the net everytime, get them from the LAN repository?
Then, how would I do this?
On Mon, Mar 3, 2008 at 12:05 PM, Rudi Ahlers Rudi@softdux.com wrote:
Hi
I'm thinking about setting up a local / LAN respository for my CentOS, and probably other (Fedora Core) disto's, but have never done it before, so here's some questions:
If I setup a repository, can it hold different distro's / architectures & versions? Say for example, CentOS 4 (i386 & x64), CentOS 5.0 & 5.1 (i386 & x64) - will each one have it's own folder? Will it also be possible to only download the packages that are needed, instead of the whole 4GB repository from the upstream provider? I have some of the CD's or DVD's for all of the distro's, so really only need a few packages now and then, and instead of getting them from the net everytime, get them from the LAN repository?
Then, how would I do this?
Easy way to do this would be to set up mrepo from rpmforge. It does nearly all the dirty work for you.
Jim Perrin wrote:
On Mon, Mar 3, 2008 at 12:05 PM, Rudi Ahlers Rudi@softdux.com wrote:
Hi
I'm thinking about setting up a local / LAN respository for my CentOS, and probably other (Fedora Core) disto's, but have never done it before, so here's some questions:
If I setup a repository, can it hold different distro's / architectures & versions? Say for example, CentOS 4 (i386 & x64), CentOS 5.0 & 5.1 (i386 & x64) - will each one have it's own folder? Will it also be possible to only download the packages that are needed, instead of the whole 4GB repository from the upstream provider? I have some of the CD's or DVD's for all of the distro's, so really only need a few packages now and then, and instead of getting them from the net everytime, get them from the LAN repository?
Then, how would I do this?
Easy way to do this would be to set up mrepo from rpmforge. It does nearly all the dirty work for you.
Wow, this looks like a great script. I'm still trying to figure it out though, but does it have to download the whole repo from the remote server, or can it dynamically download only the files that I need right now?
I have downloaded & installed mrepo on my SME 7.3 (CentOS 4.6) server, which is our main file & email server, and internet gateway.
I have got CentOS 5.0 i386 & x86_64 DVD's, and CentOS 5.1 i386 & x86_64 CD1, where do I copy these? I have setup /etc/mrepo.conf.d/centos5.conf with both i386 & x86_64 arch, but how will mrepo know that CentOS 5.0 & CentOS 5.1 are different?
This is the folder structure I have:
[root@intranet ~]# ll /home/e-smith/files/ibays/linux/files/repos/centos5-i386/ total 28 drwxr-sr-x 2 root softdux 4096 Mar 4 09:06 addons drwxr-sr-x 2 root softdux 4096 Mar 4 09:07 centosplus drwxr-sr-x 2 root softdux 4096 Mar 4 09:06 custom drwxr-sr-x 2 root softdux 4096 Mar 4 09:06 extras drwxr-sr-x 2 root softdux 4096 Mar 4 09:06 fasttrack drwxr-sr-x 2 root softdux 4096 Mar 4 09:06 rpmforge drwxr-sr-x 2 root softdux 4096 Mar 4 09:06 updates [root@intranet ~]# ll /home/e-smith/files/ibays/linux/files/repos/centos5-x86_64/ total 28 drwxr-sr-x 2 root softdux 4096 Mar 4 09:06 addons drwxr-sr-x 2 root softdux 4096 Mar 4 09:06 centosplus drwxr-sr-x 2 root softdux 4096 Mar 4 09:06 custom drwxr-sr-x 2 root softdux 4096 Mar 4 09:06 extras drwxr-sr-x 2 root softdux 4096 Mar 4 09:06 fasttrack drwxr-sr-x 2 root softdux 4096 Mar 4 09:06 rpmforge drwxr-sr-x 2 root softdux 4096 Mar 4 09:06 updates
I have run mrepo -vv -u to see what it does, but it seems like it's going to download every file from the CentOS repositories. Where do I copy the rpm's that I have already downloaded to? For example, all the rpm's in /var/cache/*/packages folders?
on 3-3-2008 11:40 PM Rudi Ahlers spake the following:
I have downloaded & installed mrepo on my SME 7.3 (CentOS 4.6) server, which is our main file & email server, and internet gateway.
I have got CentOS 5.0 i386 & x86_64 DVD's, and CentOS 5.1 i386 & x86_64 CD1, where do I copy these? I have setup /etc/mrepo.conf.d/centos5.conf with both i386 & x86_64 arch, but how will mrepo know that CentOS 5.0 & CentOS 5.1 are different?
That is the first real misconception you need to overcome. 5.0 and 5.1 aren't really "different". They are the same software at different patch levels. Similar to Windows XP with service pack 1 and Windows XP with service pack 2. There are very few reasons to stay with an older release of the software, and if you don't know what those reasons are, you don't need to use the older releases.
Scott Silva wrote:
on 3-3-2008 11:40 PM Rudi Ahlers spake the following:
I have downloaded & installed mrepo on my SME 7.3 (CentOS 4.6) server, which is our main file & email server, and internet gateway.
I have got CentOS 5.0 i386 & x86_64 DVD's, and CentOS 5.1 i386 & x86_64 CD1, where do I copy these? I have setup /etc/mrepo.conf.d/centos5.conf with both i386 & x86_64 arch, but how will mrepo know that CentOS 5.0 & CentOS 5.1 are different?
That is the first real misconception you need to overcome. 5.0 and 5.1 aren't really "different". They are the same software at different patch levels. Similar to Windows XP with service pack 1 and Windows XP with service pack 2. There are very few reasons to stay with an older release of the software, and if you don't know what those reasons are, you don't need to use the older releases.
I understand the different versions fully :) The only reason I have both, is cause of some servers still running on CentOS 5.0, and we're only starting to move to 5.1. But, I do have some DVD's with 5.0 (both i386 & x86_64), so I'm not going to bother with 5.0 on the local repository. I'll only rsync the 5.1 (i386 & x86_64) files from the remote servers. We still have a lot of i386 CPU's, and some 64bit CPU's as well, so it will help a lot to have the 32bit files / rpm's as well
On Tue, 4 Mar 2008, Rudi Ahlers wrote:
I have got CentOS 5.0 i386 & x86_64 DVD's, and CentOS 5.1 i386 & x86_64 CD1, where do I copy these? I have setup /etc/mrepo.conf.d/centos5.conf with both i386 & x86_64 arch, but how will mrepo know that CentOS 5.0 & CentOS 5.1 are different?
Wrong mailinglist, please move this to tools@lists.rpmforge.net.
Answer:
If you want support for both CentOS 5.0 and CentOS 5.1, you need to create 2 config files, one for each. (You could also put them in the same)
centos-5.0.conf and centos-5.1.conf
If you also want the extra repositories on both, you can work with internal links, or download it twice.
I have run mrepo -vv -u to see what it does, but it seems like it's going to download every file from the CentOS repositories. Where do I copy the rpm's that I have already downloaded to? For example, all the rpm's in /var/cache/*/packages folders?
The location is in /etc/mrepo.conf defined as "srcdir = /var/mrepo". You can opt to change this to wherever you want, or make a symlink from /var/mrepo to wherever you want. There is a strict structure underneath that directory.
Another way to find the answer to this question is to run mrepo with more -v's like mrepo -vvvvv, so that you can exactly see what it is doing.
Or you could opt to read the documentation that ships with mrepo that explains all of this as well.
Dag Wieers wrote:
On Tue, 4 Mar 2008, Rudi Ahlers wrote:
I have got CentOS 5.0 i386 & x86_64 DVD's, and CentOS 5.1 i386 & x86_64 CD1, where do I copy these? I have setup /etc/mrepo.conf.d/centos5.conf with both i386 & x86_64 arch, but how will mrepo know that CentOS 5.0 & CentOS 5.1 are different?
Wrong mailinglist, please move this to tools@lists.rpmforge.net.
Answer:
If you want support for both CentOS 5.0 and CentOS 5.1, you need to create 2 config files, one for each. (You could also put them in the same) centos-5.0.conf and centos-5.1.conf If you also want the extra repositories on both, you can work with internal links, or download it twice.
Thanx, I figured as much, seeing that each version has it's own repo on the mirrors.
I have run mrepo -vv -u to see what it does, but it seems like it's going to download every file from the CentOS repositories. Where do I copy the rpm's that I have already downloaded to? For example, all the rpm's in /var/cache/*/packages folders?
The location is in /etc/mrepo.conf defined as "srcdir = /var/mrepo". You can opt to change this to wherever you want, or make a symlink from /var/mrepo to wherever you want. There is a strict structure underneath that directory.
I have already changed that to my network shared folders, and I'm busy downloading the scripts now. Am I on the right track if I copy files from existing servers / machines' /var/cache/yum/*/packages to the corresponding folders on in the mrepo source folders?
Another way to find the answer to this question is to run mrepo with more -v's like mrepo -vvvvv, so that you can exactly see what it is doing.
Or you could opt to read the documentation that ships with mrepo that explains all of this as well.
Gents, I figured this would be a nice thread to add my question to.
Mrepo is installed, and functioning... somewhat. The problem is that repodata/ directories are not being pulled from the mirrors. Here is my mrepo configuration.
[main] hardlink = yes srcdir = /mnt/kickstart wwwdir = /mnt/kickstart confdir = /etc/mrepo.conf.d arch = x86_64 mailto = root@localhost smtp-server = localhost
[centos5] name = CentOS $release ($arch) release = 5.1 arch = x86_64 metadata = repomd yum repoview
### Additional repositories updates = http://mirror.centos.org/centos/5.1/updates/$arch/ fasttrack = http://mirror.centos.org/centos/5.1/fasttrack/$arch/ centosplus = http://mirror.centos.org/centos/5.1/centosplus/$arch/ extras = http://mirror.centos.org/centos/5.1/extras/$arch/ addons = http://mirror.centos.org/centos/5.1/addons/$arch/
### RPMforge repository rpmforge = http://rh-mirror.linux.iastate.edu/pub/dag/redhat/el5/en/$arch/dag/
Thanks, Vasiliy
On Tue, Mar 4, 2008 at 2:46 PM, Rudi Ahlers Rudi@softdux.com wrote:
Dag Wieers wrote:
On Tue, 4 Mar 2008, Rudi Ahlers wrote:
I have got CentOS 5.0 i386 & x86_64 DVD's, and CentOS 5.1 i386 & x86_64 CD1, where do I copy these? I have setup /etc/mrepo.conf.d/centos5.conf with both i386 & x86_64 arch, but how will mrepo know that CentOS 5.0 & CentOS 5.1 are different?
Wrong mailinglist, please move this to tools@lists.rpmforge.net.
Answer:
If you want support for both CentOS 5.0 and CentOS 5.1, you need to create 2 config files, one for each. (You could also put them in the same) centos-5.0.conf and centos-5.1.conf If you also want the extra repositories on both, you can work with internal links, or download it twice.
Thanx, I figured as much, seeing that each version has it's own repo on the mirrors.
I have run mrepo -vv -u to see what it does, but it seems like it's going to download every file from the CentOS repositories. Where do I copy the rpm's that I have already downloaded to? For example, all the rpm's in /var/cache/*/packages folders?
The location is in /etc/mrepo.conf defined as "srcdir = /var/mrepo". You can opt to change this to wherever you want, or make a symlink from /var/mrepo to wherever you want. There is a strict structure underneath that directory.
I have already changed that to my network shared folders, and I'm busy downloading the scripts now. Am I on the right track if I copy files from existing servers / machines' /var/cache/yum/*/packages to the corresponding folders on in the mrepo source folders?
Another way to find the answer to this question is to run mrepo with more -v's like mrepo -vvvvv, so that you can exactly see what it is doing.
Or you could opt to read the documentation that ships with mrepo that explains all of this as well.
--
Kind Regards Rudi Ahlers CEO, SoftDux
Web: http://www.SoftDux.com Check out my technical blog, http://blog.softdux.com for Linux or other technical stuff, or visit http://www.WebHostingTalk.co.za for Web Hosting stugg
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Rudi Ahlers wrote:
Hi
I'm thinking about setting up a local / LAN respository for my CentOS, and probably other (Fedora Core) disto's, but have never done it before, so here's some questions:
If I setup a repository, can it hold different distro's / architectures & versions? Say for example, CentOS 4 (i386 & x64), CentOS 5.0 & 5.1 (i386 & x64) - will each one have it's own folder? Will it also be possible to only download the packages that are needed, instead of the whole 4GB repository from the upstream provider? I have some of the CD's or DVD's for all of the distro's, so really only need a few packages now and then, and instead of getting them from the net everytime, get them from the LAN repository?
If the distros are from the same family, ie RHEL/CentOS/Fedora, then it is pretty safe to use 1 repo for the family.
You will need to separate the different architectures though i386/x86_64.
Then, how would I do this?
My repo directories are setup like such:
<Repo Name> +- SRPMS | +- i386 | +- RPMS | +- x86_64 +- RPMS
Then in i386 I run 'createrepo' (of course install createrepo first!), and in x86_64 I run 'createrepo'.
Then I just create a simple <Repo Name>.repo file /etc/yum.repos.d like such:
[Repo Name] name=Repo Name Packages for Linux baseurl=http://software/Software/Repo Name/Linux/$basearch enabled=1 priority=0 gpgcheck=0
I leave setting up Apache as an exercise in well, setting up Apache.
Hint: Setup mime type .rpm as text/plain otherwise rpm chokes.
Afterwards you could get fancy and create an RPM with the .repo file in it, and/or setup gpg keys for signing your RPMS.
-Ross
______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof.