Membuat Repository Ubuntu Lokal menggunakan debmirror

From OnnoWiki
Revision as of 20:43, 8 June 2009 by Onnowpurbo (talk | contribs) (New page: Langkah membuat repository Ubuntu dari server opensource.telkomspeedy.com/ubuntu ke Server lokal di LAN * Buatlah folder untuk menempatkan repository, misalnya /home/media/repo-9.04-updat...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Langkah membuat repository Ubuntu dari server opensource.telkomspeedy.com/ubuntu ke Server lokal di LAN

  • Buatlah folder untuk menempatkan repository, misalnya /home/media/repo-9.04-update
$ sudo mkdir /home/media/repo-9.04-update


  • Buatlah script mirror
$ sudo vi /usr/local/bin/mirrorbuild.sh


  • Masukan script berikut


#### Start script to automate building of Ubuntu mirror #####
## THE NEXT LINE IS NEEDED THE REST OF THE LINES STARTING WITH A # CAN BE DELETED
#!/bin/bash
## Setting variables with explanations.
#
# Don't touch the user's keyring, have our own instead
#
export GNUPGHOME=/home/media/mirrorkeyring
# Arch=         -a      # Architecture. For Ubuntu can be i386, powerpc or amd64.
# sparc, only starts in dapper, it is only the later models of sparc.
#
arch=i386
# Minimum Ubuntu system requires main, restricted
# Section=      -s      # Section (One of the following - main/restricted/universe/multiverse).
# You can add extra file with $Section/debian-installer. ex: main/debian-installer,universe/debian installer,multiverse/debian-installer,restricted/debian-installer
#
section=main,restricted,universe,multiverse
# Release=      -d      # Release of the system (Dapper, Edgy, Feisty, Gutsy, Hardy, Intrepid), and the -updates and -security ( -backports can be added if desired) 
#
release=jaunty,jaunty-security,jaunty-updates
# Server=       -h      # Server name, minus the protocol and the path at the end
# CHANGE "*" to equal the mirror you want to create your mirror from. au. in Australia  ca. in Canada.
# This can be found in your own /etc/apt/sources.list file, assuming you have Ubuntu installed.
#
server=opensource.telkomspeedy.com
# Dir=          -r      # Path from the main server, so http://my.web.server/$dir, Server dependant
#
inPath=/ubuntu
# Proto=        -e      # Protocol to use for transfer (http, ftp, hftp, rsync)
# Choose one - http is most usual the service, and the service must be avaialbe on the server you point at.
#
proto=http
# Outpath=              # Directory to store the mirror in
# Make this a full path to where you want to mirror the material.
#
outPath=/home/media/repo-9.04-update
# The --nosource option only downloads debs and not deb-src's
# The --progress option shows files as they are downloaded
# --source \ in the place of --no-source \ if you want sources also.
# --nocleanup  Do not clean up the local mirror after mirroring is complete. Use this option to keep older repository
# Start script
#
debmirror       -a $arch \
                --no-source \
                -s $section \
                -h $server \
                -d $release \
                -r $inPath \
                --progress \
                -e $proto \
                $outPath


#### End script to automate building of Ubuntu mirror ####




Pranala Menarik