Difference between revisions of "Backtrack: Mirror Repository Backtrack 4.0"

From OnnoWiki
Jump to navigation Jump to search
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==PROBLEM==
 
 
Kita ada masalah sedikit dengan debmirror karena -r atau --root harus ada isinya. Padahal repo backtrack tidak ada -r atau --root, langsung ke archive.offensive-security.com .. akibatnya teknik debmirror tidak bisa digunakan ..
 
 
 
 
==Asumsi==
 
==Asumsi==
  
  folder repo : /home/media/bt-4.0
+
  folder repo : /home/media/bt-4.0/sun.backtrack-linux.org
  server      : archive.offensive-security.com atau 94.23.3.208
+
  server      : archive.offensive-security.com atau 94.23.3.208 atau moon.backtrack-linux.org atau sun.backtrack-linux.org
 
  GNUPGHOME  : /home/media/mirrorkeyring
 
  GNUPGHOME  : /home/media/mirrorkeyring
  
 
Ubah informasi tersebut di sesuaikan dengan kondisi [[komputer]] anda
 
Ubah informasi tersebut di sesuaikan dengan kondisi [[komputer]] anda
 
 
 
  
 
==Mengkonfigurasi debmirror==
 
==Mengkonfigurasi debmirror==
Line 24: Line 16:
  
 
  # mkdir /home/media/bt-4.0
 
  # mkdir /home/media/bt-4.0
 +
# mkdir /home/media/bt-4.0/sun.backtrack-linux.org
  
 
* Buatlah script mirror
 
* Buatlah script mirror
Line 29: Line 22:
 
  # vi /usr/local/bin/mirrorbuild.bt-4.0.sh
 
  # vi /usr/local/bin/mirrorbuild.bt-4.0.sh
  
* Masukan script berikut
+
* Dalam satu kalimat (terima kasih Kosha™ <kosha@idsecconf.org>)
 +
 
 +
$ debmirror --progress -m --host=sun.backtrack-linux.org --root=. \
 +
--method=http --dist=pwnsauce \
 +
--section=main,microverse,macroverse,restricted,universe,multiverse \
 +
--arch=i386 --nosource --ignore-release-gpg --ignore-missing-release \
 +
--nocleanup --skippackages -v /home/media/bt-4.0/sun.backtrack-linux.org
 +
 
 +
atau
 +
 
 +
$ debmirror --progress -m --host=moon.backtrack-linux.org --root=. \
 +
--method=http --dist=pwnsauce \
 +
--section=main,microverse,macroverse,restricted,universe,multiverse \
 +
--arch=i386 --nosource --ignore-release-gpg --ignore-missing-release \
 +
--nocleanup --skippackages -v /home/media/bt-4.0/sun.backtrack-linux.org
 +
 
 +
 
 +
 
 +
 
 +
* Atau masukan script berikut
  
 
  #### Start script to automate building of Ubuntu mirror #####
 
  #### Start script to automate building of Ubuntu mirror #####
Line 62: Line 74:
 
  # 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=main,microverse,macroverse,restricted,universe,multiverse
+
  release=pwnsauce
 
   
 
   
 
  # 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
Line 76: Line 88:
 
  #
 
  #
 
  # inPath=ubuntu
 
  # inPath=ubuntu
  inPath=
+
  inPath=.
 
   
 
   
 
  # Proto=        -e      # Protocol to use for transfer (http, ftp, hftp, rsync)
 
  # Proto=        -e      # Protocol to use for transfer (http, ftp, hftp, rsync)
Line 86: Line 98:
 
  # 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/bt-4.0
+
  outPath=/home/media/bt-4.0/sun.backtrack-linux.org
 
   
 
   
 
  # The --nosource option only downloads debs and not deb-src's
 
  # The --nosource option only downloads debs and not deb-src's
Line 116: Line 128:
 
* Ubah ijin dari folder mirror
 
* Ubah ijin dari folder mirror
  
  # chown -Rf root.root /home/media/bt-4.0
+
  # chown -Rf root:root /home/media/bt-4.0/sun.backtrack-linux.org
  # chmod -Rf 571 /home/media/bt-4.0
+
  # chmod -Rf 571 /home/media/bt-4.0/sun.backtrack-linux.org
  
 
* Buat folder untuk mirror keyring
 
* Buat folder untuk mirror keyring

Latest revision as of 21:07, 17 March 2011

Asumsi

folder repo : /home/media/bt-4.0/sun.backtrack-linux.org
server      : archive.offensive-security.com atau 94.23.3.208 atau moon.backtrack-linux.org atau sun.backtrack-linux.org
GNUPGHOME   : /home/media/mirrorkeyring

Ubah informasi tersebut di sesuaikan dengan kondisi komputer anda

Mengkonfigurasi debmirror

  • Install debmirror
# apt-get install debmirror
  • Buatlah folder untuk menempatkan repository, misalnya /home/media/repo-9.10
# mkdir /home/media/bt-4.0
# mkdir /home/media/bt-4.0/sun.backtrack-linux.org
  • Buatlah script mirror
# vi /usr/local/bin/mirrorbuild.bt-4.0.sh
  • Dalam satu kalimat (terima kasih Kosha™ <kosha@idsecconf.org>)
$ debmirror --progress -m --host=sun.backtrack-linux.org --root=. \
--method=http --dist=pwnsauce \
--section=main,microverse,macroverse,restricted,universe,multiverse \
--arch=i386 --nosource --ignore-release-gpg --ignore-missing-release \
--nocleanup --skippackages -v /home/media/bt-4.0/sun.backtrack-linux.org

atau

$ debmirror --progress -m --host=moon.backtrack-linux.org --root=. \
--method=http --dist=pwnsauce \
--section=main,microverse,macroverse,restricted,universe,multiverse \
--arch=i386 --nosource --ignore-release-gpg --ignore-missing-release \
--nocleanup --skippackages -v /home/media/bt-4.0/sun.backtrack-linux.org



  • Atau 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
section=main,microverse,macroverse,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
# 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=pwnsauce

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

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

# 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/bt-4.0/sun.backtrack-linux.org

# 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.bt-4.0.sh 
  • Ubah ijin dari folder mirror
# chown -Rf root:root /home/media/bt-4.0/sun.backtrack-linux.org
# chmod -Rf 571 /home/media/bt-4.0/sun.backtrack-linux.org
  • Buat folder untuk mirror keyring
# mkdir /home/media/mirrorkeyring
# gpg --no-default-keyring --keyring /home/media/mirrorkeyring/trustedkeys.gpg --import /usr/share/keyrings/ubuntu-archive-keyring.gpg
  • Jalankan mirrorbuild.sh
# mirrorbuild.bt-4.0.sh
  • Sebelum bisa digunakan dengan baik, kadang kala kita perlu beberapa kali menjalankan perintah
# gpg --no-default-keyring --keyring /home/media/mirrorkeyring/trustedkeys.gpg --import /usr/share/keyrings/ubuntu-archive-keyring.gpg
# mirrorbuild.bt-4.0.sh

Referensi

Pranala Menarik