Vault9 Modding Vault9 Graphics Vault9 Code Vault9 Net Vault9 OS Vault9 Gaming Vault9 ChillZone Vault9 Tech Vault9 Archives       Vault9 Global9       Vault9 Fusion     Vault9 Blog     Vault9 Network          
 

Please Note!

This is a read-only board, no new topics or registrations are allowed. The OS Vault has moved to http://forums.vault9.net - Be sure to find more information there!


 
Reply to this topicStart new topic
> Gentoo Mirror
post Jun 6 2005, 06:55 PM
Post #1


"ok I am root NOW what?"
Group Icon

Group: Regular Member
Posts: 620
Joined: 4-May 02
From: Kimberley
Member No.: 178

Sex: Male



There has been countless suggestions on more effective and mainly faster mirroring of your packages that you need. If you have two or more boxes that have gentoo installed then you will be extremely pleased at how this little tip can speed up your maintanance!
How does this sound:
emerge --sync in less than a minute!
emerge -f package in less than a minute!

Got your attention? GOOD!

What we need to do is create a local Gentoo mirror for all our other Gentoo boxes.
Choose the box that has the most stuff installed on it, then we will be certain that most of what the other boxes need is allready available!

RSYNC MIRROR

Edit the following file on the server (the one we discussed above):
CODE

nano /etc/rsyncd.conf

# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-admin/gentoo-rsync-mirror/files/rsyncd.conf,v 1.6 2004/07/14 21:12:47 agriffis Exp $

uid = nobody
gid = nobody
use chroot = yes
max connections = 2
pid file = /var/run/rsyncd.pid
motd file = /etc/rsync/rsyncd.motd
# transfer logging = no
log format = %t %a %m %f %b
syslog facility = local3
timeout = 300

hosts allow = 192.168.0.0/255.255.255.0
hosts deny = *

[distfiles]
path = /usr/portage/distfiles
comment = Gentoo Linux Distfiles
exclude = cvs-src

[gentoo-portage]
path = /usr/portage
comment = Gentoo Linux Portage tree mirror
exclude = distfiles/ packages/

And now run:
CODE

/etc/init.d/rsyncd start
# And if you want this service to always be available
rc-update add rsyncd default


CLIENTS

Now we edit the clients:
CODE

nano -w /etc/make.conf

# Remove comments form the following:
PORTDIR=/usr/portage
DISTDIR=${PORTDIR}/distfiles

# Comment out:
# Gentoo_mirrors="......"
# Add this
FETCHCOMMAND=“rsync rsync://<your Portage gateway’s IP or DNS>/distfiles/\${FILE} ${DISTDIR}”

SYNC="rsync://<your server ip here>/gentoo-portage"

As easy as that, now emerge --sync the server once a day and after that you can sync the clients and watch speed at work!

To explain:

FETCHCOMMAND=“rsync rsync://<your Portage gateway’s IP or DNS>/gentoo-packages/\${FILE} ${DISTDIR}”
Quote from another source:
QUOTE
Missing even one character in the line above would result in failed emerge process so let’s review:

-- The FETCHCOMMAND feature of Portage allows you to specify a wide variety of methods to retrieve Gentoo packages from your Portage gateway. Kudos to the Gentoo folks the flexibility is great!
-- rsync -v is telling Portage to use the rsync program to get the file. The “-v” is optional as are many other settings you could apply. Check the man pages (#man rsync) for more choices.
-- rsync:// This is telling rsync that you need to reach across the network using the rsync protocol
-- <your gateway address> If you have DNS working than put in the name of your server otherwise use its IP. Do NOT include the greater or less than signs (<>).
-- /distfiles Recall that this is the name of the module you specified in the rsyncd.conf file on your Portage gateway. The module contains a path that points to the gateway’s local Gentoo package directory.
-- /\${FILE} This variable contains the file name emerge is trying to obtain. Note the forward slash and backslash combination this is important.
-- ${DISTDIR} This variable tells rsync were to put the files on the local (client) machine. There should be a space between it and the ${FILE} variable
-- Note the quotes around everything after the equals sign.


Output using this method? Here's a snip:
CODE

>>> Downloading http://distfiles.gentoo.org/distfiles/libmad-0.15.1b.tar.gz
-=HAhahahaha=-
You got hax0red by my server!!!
myworld( at )haxed.net

And so with one service we kill two birds! Syncing and getting distfiles!

Enjoy!

This post has been edited by My_World: Jun 6 2005, 08:08 PM


--------------------
I'm a fool for God, who's fool are you?
User is offlineProfile CardPM
+Quote PostGo to the top of the page
post Jun 6 2005, 06:55 PM
Post #


Member


Group: Administration

Joined: Today, 02:28 PM





Quote PostGo to the top of the page

Reply to this topicStart new topic

Collapse

> Similar Topics

Topic Title Replies Topic Starter Views Last Action
Gentoo News->Council Meeting Summary 0 Vault9 2 Mar 15 2010, 06:48 AM
Last post by: Vault9
Gentoo News->Chemnitz Linux Days 2010 0 Vault9 13 Mar 9 2010, 12:33 PM
Last post by: Vault9
Gentoo News->Gentoo at SCALE 8x 0 Vault9 23 Feb 14 2010, 02:24 AM
Last post by: Vault9
Gentoo News->Gentoo on the Misa Digital Guitar 0 Vault9 41 Jan 26 2010, 08:08 AM
Last post by: Vault9
Gentoo News->German Gentoo Book 0 Vault9 39 Jan 20 2010, 08:16 AM
Last post by: Vault9


 



- Lo-Fi Version Time is now: 19th March 2010 - 02:28 PM
Privacy Policy
South Africa's Top Sites Kinetiq