Membuat Repository Ubuntu Lokal menggunakan debmirror

From OnnoWiki
Jump to navigation Jump to search

Langkah membuat repository Ubuntu dari server,

  • opensource.telkomspeedy.com:5432/ubuntu
  • dl2.foss-id.web.id atau 125.160.17.22

ke Server lokal di LAN

Langkah Mendownload Repostory Menggunakan debmirror

Mendownload repository dapat dilakukan menggunakan debmirror. Aplkasi debmirror dapat di instalasi menggunakan perintah

apt-get install debmirror

Contoh di bawah adalah untuk repository Ubuntu 32 bit. Bagi anda yang ingin mendownload repository 64 bit, yang perlu di ubah hanya paramter

arch=i386

menjadi arsitektur 64 bit, yaitu:

arch=amd64

Membuat Repository di Web

  • Buat link statik antara download repository ke Web. Misalkan untuk repo-13.04
# mkdir /var/www/ubuntu
# mount --bind /var/data/repository/repo-13.04 /var/www/ubuntu
  • Jika kita mempunyai banyak repository, kita dapat membuat sebagai berikut:
# mkdir /var/www/ubuntu-9.10
# mkdir /var/www/ubuntu-10.04
# mkdir /var/www/ubuntu-10.10
# mkdir /var/www/ubuntu-11.04
# mkdir /var/www/ubuntu-11.10
# mkdir /var/www/ubuntu-12.04
# mkdir /var/www/ubuntu-12.10
# mkdir /var/www/ubuntu-13.04
# mount --bind /var/data/repository/repo-9.10 /var/www/ubuntu-9.10
# mount --bind /var/data/repository/repo-10.04 /var/www/ubuntu-10.04
# mount --bind /var/data/repository/repo-10.10 /var/www/ubuntu-10.10
# mount --bind /var/data/repository/repo-11.04 /var/www/ubuntu-11.04
# mount --bind /var/data/repository/repo-11.10 /var/www/ubuntu-11.10
# mount --bind /var/data/repository/repo-12.04 /var/www/ubuntu-12.04
# mount --bind /var/data/repository/repo-12.10 /var/www/ubuntu-12.10
# mount --bind /var/data/repository/repo-13.04 /var/www/ubuntu-13.04

Konfigurasi / isi file /etc/sources.list harus di ubah jika hal di atas di lakukan.

Cron supaya secara periodik di update

  • Edit Tabel cron
# crontab -e
  • Agar setiap jam 10 malam di update. Isi dengan kata-kata
0 * * * * /usr/local/bin/mirrorbuild.sh


  • Aktifkan cron
# /etc/init.d/cron restart

Setup di sisi Client

  • Edit /etc/apt/sources.list dan isi sebagai berikut

Ubuntu 9.04

deb http://mirrorbox/ubuntu jaunty main restricted universe multiverse
deb http://mirrorbox/ubuntu jaunty-updates main restricted universe multiverse
deb http://mirrorbox/ubuntu jaunty-security main restricted universe multiverse

Ubuntu 9.10

deb http://mirrorbox/ubuntu/ karmic main restricted universe multiverse
deb http://mirrorbox/ubuntu/ karmic-updates main restricted universe multiverse
deb http://mirrorbox/ubuntu/ karmic-security main restricted universe multiverse
deb http://mirrorbox/ubuntu/ karmic-backports main restricted universe multiverse
deb http://mirrorbox/ubuntu/ karmic-proposed main restricted universe multiverse

ubuntu 10.04

deb http://mirrorbox/ubuntu/ lucid main restricted universe multiverse
deb http://mirrorbox/ubuntu/ lucid-updates main restricted universe multiverse
deb http://mirrorbox/ubuntu/ lucid-security main restricted universe multiverse
deb http://mirrorbox/ubuntu/ lucid-backports main restricted universe multiverse
deb http://mirrorbox/ubuntu/ lucid-proposed main restricted universe multiverse

Ubuntu 10.10

deb http://mirrorbox/ubuntu/ maverick main restricted universe multiverse
deb http://mirrorbox/ubuntu/ maverick-updates main restricted universe multiverse
deb http://mirrorbox/ubuntu/ maverick-security main restricted universe multiverse
deb http://mirrorbox/ubuntu/ maverick-backports main restricted universe multiverse
deb http://mirrorbox/ubuntu/ maverick-proposed main restricted universe multiverse

Ubuntu 11.04

deb http://mirrorbox/ubuntu/ natty main restricted universe multiverse
deb http://mirrorbox/ubuntu/ natty-updates main restricted universe multiverse
deb http://mirrorbox/ubuntu/ natty-security main restricted universe multiverse
deb http://mirrorbox/ubuntu/ natty-backports main restricted universe multiverse
deb http://mirrorbox/ubuntu/ natty-proposed main restricted universe multiverse

Ubuntu 11.10

deb http://mirrorbox/ubuntu/ oneiric main restricted universe multiverse
deb http://mirrorbox/ubuntu/ oneiric-updates main restricted universe multiverse
deb http://mirrorbox/ubuntu/ oneiric-security main restricted universe multiverse
deb http://mirrorbox/ubuntu/ oneiric-backports main restricted universe multiverse
deb http://mirrorbox/ubuntu/ oneiric-proposed main restricted universe multiverse

Ubuntu 12.04

deb http://mirrorbox/ubuntu/ precise main restricted universe multiverse
deb http://mirrorbox/ubuntu/ precise-updates main restricted universe multiverse
deb http://mirrorbox/ubuntu/ precise-security main restricted universe multiverse
deb http://mirrorbox/ubuntu/ precise-backports main restricted universe multiverse
deb http://mirrorbox/ubuntu/ precise-proposed main restricted universe multiverse

Ubuntu 12.10

deb http://mirrorbox/ubuntu/ quantal main restricted universe multiverse
deb http://mirrorbox/ubuntu/ quantal-updates main restricted universe multiverse
deb http://mirrorbox/ubuntu/ quantal-security main restricted universe multiverse
deb http://mirrorbox/ubuntu/ quantal-backports main restricted universe multiverse
deb http://mirrorbox/ubuntu/ quantal-proposed main restricted universe multiverse

Ubuntu 13.04

deb http://mirrorbox/ubuntu/ raring main restricted universe multiverse
deb http://mirrorbox/ubuntu/ raring-updates main restricted universe multiverse
deb http://mirrorbox/ubuntu/ raring-security main restricted universe multiverse
deb http://mirrorbox/ubuntu/ raring-backports main restricted universe multiverse
deb http://mirrorbox/ubuntu/ raring-proposed main restricted universe multiverse

Pranala Menarik