View previous topic :: View next topic |
Author |
Message |
jakeh n00b
Joined: 25 Aug 2003 Posts: 37 Location: United States
|
Posted: Tue Sep 30, 2003 6:10 pm Post subject: Setting up a Sync Server |
|
|
Hello Gentoo Gents and Madams,
I currently have 10 gentoo servers (4 more since I last posted). I have written a simple cron script for each server to do an emerge sync, run fixpackages, and do an emerge -uDp world which is posted to a log file every night at 12:00am. Feel free to use it for yourself because it works great. Code:
Code: |
CRONTAB ENTRY
0 0 * * * /usr/local/bin/DaySync.sh
SCRIPT ITSELF
#!/bin/bash
# DaySync.sh Script
# Update Portage Tree, Fix Packages, & Check for Latest Updates
# Author: jakeh
# Last Revision: 9/20/03
sync_log=/var/log/ESyncFxWUp.log
#------------------------------------------------------------------------------#
echo "Emerge Sync started: `date`" > $sync_log
/usr/bin/chmod 600 $sync_log
/usr/bin/emerge sync >> $sync_log
echo "Emerge Sync finished: `date`" >> $sync_log
echo "" >> $sync_log
#------------------------------------------------------------------------------#
#------------------------------------------------------------------------------#
echo "Fixpackages started: `date`" >> $sync_log
/usr/sbin/fixpackages >> $sync_log
echo "Fixpackages finished: `date`" >> $sync_log
echo "" >> $sync_log
#------------------------------------------------------------------------------#
#------------------------------------------------------------------------------#
echo "Checking Available Updates on the Web: `date`" >> $sync_log
/usr/bin/emerge -uDvp world >> $sync_log
echo "Nightly Emerge Sync Fix World Updates finished: `date`"
#------------------------------------------------------------------------------#
#------------------------------------------------------------------------------#
echo "Nightly Emerge Sync Fix World Updates finished." >> $sync_log
echo "***Note: This log file is overwritten every night at 12:00AM" >> $sync_log
#------------------------------------------------------------------------------#
|
The question I have for everyone now is how I would setup a server to do an emerge sync from the gentoo mirrors (Internet) using the script above, and have our other servers do an emerge sync off of our main server (Using the script above). Is there just a file (like /etc/make.conf) that I can edit to change where the other servers look for their updated portage tree?
Here's a basic topology:
[Sync Server Syncs off of Gentoo Mirrors]<--->Internet (Sync Mirrors)
^
|
V
[ Other Servers ]
[Sync off of Server Above...]
Thanks for any help.
Best regards,
Jake _________________ Computers are like air conditioners, they stop working properly if you open Windows |
|
Back to top |
|
|
think4urs11 Bodhisattva
Joined: 25 Jun 2003 Posts: 6659 Location: above the cloud
|
Posted: Tue Sep 30, 2003 6:26 pm Post subject: |
|
|
Hi!
You want to read this one
https://forums.gentoo.org/viewtopic.php?t=59134
HTH
T. _________________ Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself |
|
Back to top |
|
|
jakeh n00b
Joined: 25 Aug 2003 Posts: 37 Location: United States
|
Posted: Tue Sep 30, 2003 6:50 pm Post subject: |
|
|
WOW THANKYOU!!! _________________ Computers are like air conditioners, they stop working properly if you open Windows |
|
Back to top |
|
|
|