Ci-dessous, les différences entre deux révisions de la page.
serveur_install_party:squirm [2009/09/29 19:49] Fanch |
serveur_install_party:squirm [2023/07/18 23:11] |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | Nous utiliserons squid qui permet de réecrire certaines url (celles correspondant aux dépots) grace à un script python. | ||
- | |||
- | Exemple : | ||
- | - on demande http:// | ||
- | - Squid transmet l'url au script python | ||
- | - le script retranscris en adresse locale : http:// | ||
- | - Si le fichier local existe, le script renvoi l'url locale, sinon renvoi l'url non modifiée | ||
- | |||
- | Voici le script en question / | ||
- | |||
- | |||
- | ?? | ||
- | |||
- | |||
- | Modifiez la config de squid de la façon suivante : | ||
- | url_rewrite_program / | ||
- | |||
- | Le mirroir ubuntu peut se télécharger grace à debmirror avec la configuration suviante : | ||
- | #!/bin/bash | ||
- | | ||
- | ## Setting variables with explanations. | ||
- | | ||
- | # | ||
- | # Don't touch the user's keyring, have our own instead | ||
- | # | ||
- | export GNUPGHOME=/ | ||
- | | ||
- | # Arch= | ||
- | # sparc, only starts in dapper, it is only the later models of sparc. | ||
- | # | ||
- | arch=i386, | ||
- | | ||
- | # Minimum Ubuntu system requires main, restricted | ||
- | # Section= | ||
- | # You can add extra file with $Section/ | ||
- | # | ||
- | section=main, | ||
- | | ||
- | # Release= | ||
- | # | ||
- | release=jaunty, | ||
- | | ||
- | # Server= | ||
- | # CHANGE " | ||
- | # This can be found in your own / | ||
- | # | ||
- | server=archive.ubuntu.com | ||
- | | ||
- | # Dir= -r # Path from the main server, so http:// | ||
- | # | ||
- | inPath=/ | ||
- | | ||
- | # Proto= | ||
- | # Choose one - http is most usual the service, and the service must be avaialbe on the server you point at. | ||
- | # | ||
- | proto=http | ||
- | | ||
- | # Outpath= | ||
- | # Make this a full path to where you want to mirror the material. | ||
- | # | ||
- | outPath=/ | ||
- | | ||
- | # The --nosource option only downloads debs and not deb-src' | ||
- | # The --progress option shows files as they are downloaded | ||
- | # --source \ in the place of --no-source \ if you want sources also. | ||
- | # --nocleanup | ||
- | # Start script | ||
- | # | ||
- | | ||
- | | ||
- | CMD=" | ||
- | | ||
- | echo " | ||
- | echo $CMD | ||
- | | ||
- | ${CMD} | ||
- | | ||
- | | ||
- | #### End script to automate building of Ubuntu mirror #### | ||