View previous topic :: View next topic |
Author |
Message |
will_in_wi Tux's lil' helper
Joined: 04 Feb 2004 Posts: 117
|
Posted: Thu Jun 24, 2004 6:09 pm Post subject: [HOW-TO] Set up a gentoo rsync mirror using FC2. |
|
|
First, read the gentoo rsync mirror howto. Now, create a script in /usr/bin:
Code: | nano -w /usr/bin/rsync-gentoo-portage |
That says: Code: | #!/bin/bash
RSYNC="/usr/bin/rsync"
OPTS="--quiet --recursive --links --perms --times --devices --delete --timeout=$#Uncomment the following line only if you have been granted access to rsync1.us$#SRC="rsync://rsync1.us.gentoo.org/gentoo-portage"
#If you are waiting for access to our master mirror, select one of our mirrors $SRC="rsync://rsync.gentoo.org/gentoo-portage"
DST="/usr/portage"
echo "Started update at" `date` >> $0.log 2>&1
logger -t rsync "re-rsyncing the gentoo-portage tree"
${RSYNC} ${OPTS} ${SRC} ${DST} >> $0.log 2>&1
echo "End: "`date` >> $0.log 2>&1 | Then make the script executable: Code: | chmod a+rx /usr/bin/rsync-gentoo-portage | Now create a script in /etc/init.d/: Code: | nano -w /etc/init.d/Rsyncd |
Code: | #!/bin/sh
# description: Gentoo RSYNC mirror
# chkconfig: 2345 99 00
case "$1" in
'start')
/usr/bin/rsync --daemon --safe-links --timeout=300
touch /var/lock/subsys/Rsyncd
;;
'stop')
killall rsync
rm -f /var/lock/subsys/Rsyncd
;;
*)
echo "Usage: $0 { start | stop }"
;;
esac
exit 0
| Again, make the script executable: Code: | chmod a+rx /etc/init.d/Rsyncd | Now, run the rsync script: Code: | rsync-gentoo-portage | and wait until it is done. Once it is done, you should have a portage tree in /usr/portage on the server. Now you should create a cron job, so that the tree is synced every night.
The server is now set up as a gentoo rsync server.
To set up the client, edit /etc/make.conf and find the line that says: Code: | SYNC="rsync://whatever/gentoo-portage | and change it to: Code: | SYNC="rsync://therserversipaddress/gentoo-portage" |
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|