Difference between revisions of "Membuat Repository Debian Lokal menggunakan debmirror"

From OnnoWiki
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
Install debian keyring
+
Install debian archive keyring
  
  apt-get install debmirror debian-keyring
+
aptitude search keyring
 
+
  apt-get install debian-archive-keyring
Membuat mirror keyring Debian
 
  
 
Buat folder untuk mirror keyring
 
Buat folder untuk mirror keyring
  
 
  mkdir /var/data/mirrorkeyring
 
  mkdir /var/data/mirrorkeyring
  gpg --no-default-keyring --keyring /var/data/mirrorkeyring/trustedkeys.gpg --import /usr/share/keyrings/debian-keyring.gpg
+
  gpg --no-default-keyring --keyring /var/data/mirrorkeyring/trustedkeys.gpg --import /usr/share/keyrings/debian-archive-keyring.gpg
  
 
Sebelum bisa digunakan dengan baik, kadang kala kita perlu beberapa kali menjalankan perintah
 
Sebelum bisa digunakan dengan baik, kadang kala kita perlu beberapa kali menjalankan perintah
  
  gpg --no-default-keyring --keyring /var/data/mirrorkeyring/trustedkeys.gpg --import /usr/share/keyrings/debian-keyring.gpg
+
  gpg --no-default-keyring --keyring /var/data/mirrorkeyring/trustedkeys.gpg --import /usr/share/keyrings/debian-archive-keyring.gpg
  
 +
Edit script misalnya
  
 +
vi /usr/local/bin/mirrorbuild.squeeze.th.sh
  
* Masukan script berikut
 
  
 
  #### Start script to automate building of Ubuntu mirror #####
 
  #### Start script to automate building of Ubuntu mirror #####
Line 28: Line 28:
 
  # Don't touch the user's keyring, have our own instead
 
  # Don't touch the user's keyring, have our own instead
 
  #
 
  #
  export GNUPGHOME=/home/media/mirrorkeyring
+
  export GNUPGHOME=/var/data/mirrorkeyring
 
   
 
   
 
  # Arch=        -a      # Architecture. For Ubuntu can be i386, powerpc or amd64.
 
  # Arch=        -a      # Architecture. For Ubuntu can be i386, powerpc or amd64.
Line 39: Line 39:
 
  # You can add extra file with $Section/debian-installer. ex: main/debian-installer,universe/debian-installer,multiverse/debian-installer,restricted/debian-installer
 
  # 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
+
  # section=main,restricted,universe,multiverse
   
+
  section=main,contrib,non-free
 +
 
 
  # Release=      -d      # Release of the system (Dapper, Edgy, Feisty, Gutsy, Hardy, Intrepid), and the -updates and -security ( -backports can be  added if desired)
 
  # Release=      -d      # Release of the system (Dapper, Edgy, Feisty, Gutsy, Hardy, Intrepid), and the -updates and -security ( -backports can be  added if desired)
 
  #
 
  #
Line 47: Line 48:
 
  # release=karmic,karmic-security,karmic-updates
 
  # release=karmic,karmic-security,karmic-updates
 
  # release=karmic,karmic-security,karmic-updates,karmic-backports,karmic-proposed
 
  # release=karmic,karmic-security,karmic-updates,karmic-backports,karmic-proposed
  release=lucid,lucid-security,lucid-updates,lucid-backports,lucid-proposed
+
  # release=lucid,lucid-security,lucid-updates,lucid-backports,lucid-proposed
   
+
  release=squeeze,squeeze-proposed-updates,squeeze-updates
 +
 
 +
 
 
  # Server=      -h      # Server name, minus the protocol and the path at the end
 
  # 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.
 
  # CHANGE "*" to equal the mirror you want to create your mirror from. au. in Australia  ca. in Canada.
Line 55: Line 58:
 
  # server=opensource.telkomspeedy.com:5432
 
  # server=opensource.telkomspeedy.com:5432
 
  # server=dl2.foss-id.web.id
 
  # server=dl2.foss-id.web.id
  server=125.160.17.22
+
  # server=125.160.17.22
 +
server=www.mirror.in.th
 
   
 
   
 
  # Dir=          -r      # Path from the main server, so http://my.web.server/$dir, Server dependant
 
  # Dir=          -r      # Path from the main server, so http://my.web.server/$dir, Server dependant
 
  #
 
  #
  inPath=ubuntu
+
  # inPath=ubuntu
 +
inPath=osarchive/debian
 
   
 
   
 
  # Proto=        -e      # Protocol to use for transfer (http, ftp, hftp, rsync)
 
  # Proto=        -e      # Protocol to use for transfer (http, ftp, hftp, rsync)
Line 69: Line 74:
 
  # Make this a full path to where you want to mirror the material.
 
  # Make this a full path to where you want to mirror the material.
 
  #
 
  #
  outPath=/home/media/repo-10.4
+
  outPath=/var/data/repository/debian-squeeze
 
   
 
   
 
  # The --nosource option only downloads debs and not deb-src's
 
  # The --nosource option only downloads debs and not deb-src's
Line 95: Line 100:
 
* Ubah ijin agar file mirrorbuild.sh dapat di jalankan
 
* Ubah ijin agar file mirrorbuild.sh dapat di jalankan
  
  # chmod -Rf 777 /usr/local/bin/mirrorbuild.sh  
+
  # chmod -Rf 777 /usr/local/bin/mirrorbuild.squeeze.th.sh  
  
  
Line 104: Line 109:
 
* [[Membuat Repository Ubuntu Lokal menggunakan debmirror]]
 
* [[Membuat Repository Ubuntu Lokal menggunakan debmirror]]
 
* [[Membuat Mirrorkeyring untuk debmirror]]
 
* [[Membuat Mirrorkeyring untuk debmirror]]
 +
* [[Membuat Mirrorkeyring untuk debmirror Debian]]
 
* [[Linux Howto]]
 
* [[Linux Howto]]
  
 
[[Category: Linux]]
 
[[Category: Linux]]

Latest revision as of 10:08, 22 February 2011

Install debian archive keyring

aptitude search keyring
apt-get install debian-archive-keyring

Buat folder untuk mirror keyring

mkdir /var/data/mirrorkeyring
gpg --no-default-keyring --keyring /var/data/mirrorkeyring/trustedkeys.gpg --import /usr/share/keyrings/debian-archive-keyring.gpg

Sebelum bisa digunakan dengan baik, kadang kala kita perlu beberapa kali menjalankan perintah

gpg --no-default-keyring --keyring /var/data/mirrorkeyring/trustedkeys.gpg --import /usr/share/keyrings/debian-archive-keyring.gpg

Edit script misalnya

vi /usr/local/bin/mirrorbuild.squeeze.th.sh


#### 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=/var/data/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
section=main,contrib,non-free
 
# 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
# release=karmic
# release=karmic,karmic-security,karmic-updates
# release=karmic,karmic-security,karmic-updates,karmic-backports,karmic-proposed
# release=lucid,lucid-security,lucid-updates,lucid-backports,lucid-proposed
release=squeeze,squeeze-proposed-updates,squeeze-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:5432
# server=dl2.foss-id.web.id
# server=125.160.17.22
server=www.mirror.in.th

# Dir=          -r      # Path from the main server, so http://my.web.server/$dir, Server dependant
#
# inPath=ubuntu
inPath=osarchive/debian

# 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=/var/data/repository/debian-squeeze

# 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 ####                                                                                    


Simpan script jika sudah selesai di edit semua-nya.


  • Ubah ijin agar file mirrorbuild.sh dapat di jalankan
# chmod -Rf 777 /usr/local/bin/mirrorbuild.squeeze.th.sh 



Pranala Menarik