Hier eine Anleitung, wie man einen Software Update Server (SUS) ohne Mac OS X Server aufsetzen kann. Da das SU-System auf offenen Standards basiert, kann diese Methode plattformunabhängig eingesetzt werden; es läuft also u.a. auch auf OSX Client und Linux. Die Anleitung ist leider nur für Anwender geeignet, die Erfahrung auf der Terminal-Ebene haben.
Was man braucht:
- einen Webserver (bei OSX ist Apache enthalten)
- ein Script von Andrew Wellington, das die Dateien herunterlädt und den Software-Katalog für das lokale Netz umschreibt
- für das Script: die Korn-Shell ksh (diese ist in OSX enthalten, sollte sich aber auch in den gängigen Linux-Distributionen nachinstallieren lassen)
- den Software Update Enabler, ebenfalls von Andrew Wellington
- ca. 4 GB freien Speicher für die Update-Dateien
- die Unix-Tools grep, sed, tr, wget und xargs. Unter OSX fehlt davon wget, ich habe es als Universal Binary angehängt.
Anleitung:
- Folgende Ordnerstrukrur anlegen (steht so auch im Script):
Den "content"-Ordner kann man im Script umbenennen, siehe Schritt 2.Code:sumirror/ |-- content | |-- files `-- sumirror
- Das Original-Script anpassen
Ich habe die Stellen markiert, die man anpassen sollte.
Dieses Script muss man in den oberen "sumirror"-Ordner speichern und ausführbar machen.Code:#!/usr/local/bin/ksh // <-- Unter OSX und den meisten Linux-Distributionen liegt das ksh-Binary in /bin/ksh. # # LICENCE: # Copyright (C) 2005 Andrew Wellington. # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # README: # A script to download and mirror the Apple Software Updates # available for Mac OS X (10.4 "Tiger"), in conjunction with # Andrew Wellington's SUEnabler application, which allows an # administrator to set a different download location for the # update catalog and update packages. # # This script requires GNU wget, and requires the following # directory structure to operate (feel free to rename the # LOCALDIR and /sumirror/files/ paths below according to # your requirements: # # sumirror/ # |-- content # | |-- files # | | |-- [ All the various updater ] # | | `-- [ files supplied by Apple ] # | |-- index.sucatalog # | |-- sumirror.curlist # | |-- sumirror.newlist # | |-- sumirror.sucatalog # | `-- sumirror.urllist # `-- sumirror # # If you have wget and have simply untarred this directory, you # should be able to run this software by typing ./sumirror # # It is assumed you'll be running a webserver (eg Apache) on the # server you're running this on. Simply make a symlink to the # content directory as follows: # # cd /path/to/webroot/ # ln -s /path/to/sumirror/content sumirror # # Then, open up your copy of Software Update Enabler and enter # your the following into it: # # http://www.your-web-server/sumirror/ # # You should then run the sumirror script periodically using # cron or launchd. If you've read this far, I'll assume you # already know how to use these utilities and don't need help # from me. # # OBLIGATORY PLUG: # Software Update Enabler can be downloaded here: # # http://www.wiretapped.net/~proton/suenabler/index.html SUMASTER="http://swscan.apple.com/content/catalogs/index-1.sucatalog" SUMASTERHOST="swcdn.apple.com" LOCALDIR="./content" //<-- wenn man das Download-Verzeichnis ändern will GREP="`which grep`" SED="`which sed`" TR="`which tr`" WGET="`which wget`" XARGS="`which xargs`" # Download Apple's catalog file to our working directory echo "*** Downloading Software Updates Catalog..." $WGET -N -q -O $LOCALDIR/sumirror.sucatalog $SUMASTER # Strip it back to just the URLs of the files we need to mirror $GREP $SUMASTERHOST $LOCALDIR/sumirror.sucatalog | tr -d "\t" | $SED 's/\<string\>//g;s/\<\/string\>//g' > $LOCALDIR/sumirror.urllist // <-- Mit der Hilfe eines Freundes habe ich herausgefunden, dass man diese Backslashes unter Linux entfernen muss. # Jump into the directory we want the files actually stored and download them using wget echo "*** Mirroring Software Update Packages..." cd $LOCALDIR/files $WGET -N -q -i ../sumirror.urllist cd ../.. # Now, prepare an index.sucatalog file for the Software Update.app to download and refer to, # but now, instead of URLs at Apple's download site, replace them with our own (modify this # to suit your requirements). echo "*** Running Post-Mirroring Scripts..." $SED 's|<string>http://swcdn.*/\(.*\)</string>|<string>http://www.wiretapped.net/sumirror/files/\1</string>|g' < $LOCALDIR/sumirror.sucatalog > $LOCALDIR/index.sucatalog <-- Hier die URL zum "files"-Ordner auf dem lokalen Server eintragen. # Apple may pull some updates if problems with them are discovered. We therefore need to check # that no old files are present in the main download directory. Prepare a sorted list of the # filenames Apple is telling us we should have, then prepare a list of what's actually there. # Compare them, then delete any that aren't on the new list. echo "*** Optimising Content Directories..." $SED 's|http://swcdn.*/\(.*\)|\1|g' < $LOCALDIR/sumirror.urllist | sort > $LOCALDIR/sumirror.newlist ls $LOCALDIR/files | xargs -n1 | sort > $LOCALDIR/sumirror.curlist cd $LOCALDIR/files $GREP -F -v -f ../sumirror.newlist ../sumirror.curlist | $XARGS -n 1 rm -f echo "*** Done!"
Code:chmod a+x sus.ksh- Das Script starten.
Jetzt werden alle Dateien geladen und der Katalog für den lokalen Server angepasst. Der Download kann, abhängig von euerer Verbindung, etwas dauern. Es empfhielt sich daher, das Script in einer "screen"-Session auszuführen.
- Den Webserver so einrichten, dass der "content"-Ordner freigegeben wird.
In Apache geht das z.B. mit einem Alias:
Unter OSX bietet es sich an, den Ordner direkt im "Web-Sites"-Ordner im Benutzerverzeichnis anzulegen.Code:Alias /sumirror "/usr/sumirror/content"
Code:~/Sites/sumirror/ |-- content | |-- files `-- sumirror- Den Webserver starten bzw. neu laden.
Unter OSX in Systemeinstellungen -> Sharing -> Personal Web Sharing
- Auf dem Client den neuen Update Server mit dem Software Update Enabler einstellen.
Angenommen wir haben den Server auf OSX aufgesetzt, unser Domain-Name lautet "iMac" und unser Benutzername "user", dann müsste die URL lauten: "http://iMac/~user/sumirror/content"
- Das Software-Update starten.
Nun steht in der Titelleiste "Software-Aktualisierung (iMac)", es benutzt also den lokalen Update Server.
- Das Script in einen Autostart-Dienst eintragen (bei Linux etwa die cronttab), damit neue Updates regelmäßig abgeholt werden.
+ Antworten
Ergebnis 1 bis 1 von 1
-
05.08.2007, 17:59 #1
Software Update Server ohne Mac OS X Server
Geändert von prolinesurfer (08.08.2007 um 23:30 Uhr)
Häufig gestellte Fragen zum Thema iPhone-Kauf im europäischen Ausland
Ein Gemeinschaftsprojekt der AT-Community.
Ähnliche Themen
-
OS X Server, ohne OS X Server
Von stk im Forum OS X ServerAntworten: 20Letzter Beitrag: 18.04.2009, 20:26 -
VPN einrichten ohne Mac os X Server
Von MACRASSI im Forum OS XAntworten: 3Letzter Beitrag: 15.12.2005, 16:27 -
WebObjects-Server ohne OS X Server?
Von MatzeLoCal im Forum Mac OS X DeveloperAntworten: 3Letzter Beitrag: 12.11.2005, 12:51





Zitieren