Wednesday, December 22, 2010

Setting Repository Offline Ubuntu 10.04 Menggunakan File ISO

Sebenarnya setting repository menggunakan repo ISO sama saja dengan setting repo secara offline hanya kita harus me-mount dahulu ISO-nya. Karena saya sering ditanya mengenai repo ISO saya mencoba menulisanya kembali. Pastinya Anda harus punya terlebih dahulu repo ISOnya 8 DVD. Apabila masih berupa DVD buatlah ISOnya terlebih dahulu, bagaimana cara membuat ISO dari DVD googling aja ya? :D
Berikut caranya

 
Pertama
Coba lihat directori /mnt apakan sudah digunakan atau belum tapi bisanya direktori ini jarang digunakan, jadi kita buat direktori repo1 sampai repo8 didirektori ini yang nantinya digunakan untuk me-mount repo ISOnya.
sudo mkdir /mnt/repo1
sudo mkdir /mnt/repo2
sudo mkdir /mnt/repo3
sudo mkdir /mnt/repo4
sudo mkdir /mnt/repo5
sudo mkdir /mnt/repo6
sudo mkdir /mnt/repo7
sudo mkdir /mnt/repo8
Kedua
Nah sekarang waktunya di mount jadi perintahnya sudo mount -o loop <lokasi repo ISO> <lokasi direktori tujuan> disini saya mencontohkan lokasi ISO-nya berada di Hard Drive External /media/Binaries/repo-lucid/ubuntu-10.04-repository-i386-1_contrib.iso Contoh lengkapnya seperti dibawah ini:
sudo mount -o loop /media/Binaries/repo-lucid/ubuntu-10.04-repository-i386-1_contrib.iso /mnt/repo1
sudo mount -o loop /media/Binaries/repo-lucid/ubuntu-10.04-repository-i386-2_contrib.iso /mnt/repo2
sudo mount -o loop /media/Binaries/repo-lucid/ubuntu-10.04-repository-i386-3_contrib.iso /mnt/repo3
sudo mount -o loop /media/Binaries/repo-lucid/ubuntu-10.04-repository-i386-4_contrib.iso /mnt/repo4
sudo mount -o loop /media/Binaries/repo-lucid/ubuntu-10.04-repository-i386-5_contrib.iso /mnt/repo5
sudo mount -o loop /media/Binaries/repo-lucid/ubuntu-10.04-repository-i386-6_contrib.iso /mnt/repo6
sudo mount -o loop /media/Binaries/repo-lucid/ubuntu-10.04-repository-i386-7_contrib.iso /mnt/repo7
sudo mount -o loop /media/Binaries/repo-lucid/ubuntu-10.04-repository-i386-8_contrib.iso /mnt/repo8
Ketiga
Edit bagian sources.list menggunakan perintah
sudo gedit /etc/apt/sources.list
Tambahkan alamat repo seperti dibawah ini
deb file:/mnt/repo1 lucid main restricted
deb file:/mnt/repo2 lucid main restricted
deb file:/mnt/repo3 lucid multiverse universe
deb file:/mnt/repo4 lucid universe
deb file:/mnt/repo5 lucid universe
deb file:/mnt/repo6 lucid universe
deb file:/mnt/repo7 lucid universe
deb file:/mnt/repo8 lucid universe
Kemudian Save/Simpan

Keempat
Update menggunakan perintah
sudo apt-get update
Nah repo ISO siap digunakan

Kelima
Bagian ini hanya tambahan, ketika Anda restart Anda harus me-mount kembali Repo ISOnya sebenarnya ada cara agar ISOnya otomatis ter-mounting tapi entah kenapa saya tidak pernah berhasil. Tapi kalau rekan-rekan ada yang berhasil silakan share disini. Untuk caranya seperti ini:
Edit bagian fstab
sudo gedit /etc/fstab
Dan tambahkan baris berikut ini
# Repository
/home/username/Repository/ubuntu-10.04-repository-i386-1_contrib.iso /mnt/repo1 iso9660 loop,defaults 0 0
/home/username/Repository/ubuntu-10.04-repository-i386-2_contrib.iso /mnt/repo2 iso9660 loop,defaults 0 0
/home/username/Repository/ubuntu-10.04-repository-i386-3_contrib.iso /mnt/repo3 iso9660 loop,defaults 0 0
/home/username/Repository/ubuntu-10.04-repository-i386-4_contrib.iso /mnt/repo4 iso9660 loop,defaults 0 0
/home/username/Repository/ubuntu-10.04-repository-i386-5_contrib.iso /mnt/repo5 iso9660 loop,defaults 0 0
/home/username/Repository/ubuntu-10.04-repository-i386-6_contrib.iso /mnt/repo6 iso9660 loop,defaults 0 0
/home/username/Repository/ubuntu-10.04-repository-i386-7_contrib.iso /mnt/repo7 iso9660 loop,defaults 0 0
/home/username/Repository/ubuntu-10.04-repository-i386-8_contrib.iso /mnt/repo8 iso9660 loop,defaults 0 0
Kemudian Save/Simpan dan cobalah restart
Untuk mounting otomatis lebih baik copy-kan repo ISOnya di direktori home Anda

Selamat Mencoba

2 comments:

  1. Permisi Pak boleh sharing nih, q dah coba cara d atas tp mlah muncul gini sdh bnr lum trus pas mau nginstall jg ada masalah :

    Tokusukei@pinguin:~$ sudo apt-get update
    Ign file:/mnt/repo1/ lucid/main Translation-id
    Ign file:/mnt/repo1/ lucid/restricted Translation-id
    Ign file: lucid Release.gpg
    Ign file:/mnt/repo2/ lucid/main Translation-id
    Ign file:/mnt/repo2/ lucid/restricted Translation-id
    Ign file: lucid Release.gpg
    Ign file:/mnt/repo3/ lucid/multiverse Translation-id
    Ign file:/mnt/repo3/ lucid/universe Translation-id
    Ign file: lucid Release.gpg
    Ign file:/mnt/repo4/ lucid/universe Translation-id
    Ign file: lucid Release.gpg
    Ign file:/mnt/repo5/ lucid/universe Translation-id
    Ign file: lucid Release.gpg
    Ign file:/mnt/repo6/ lucid/universe Translation-id
    Ign file: lucid Release.gpg
    Ign file:/mnt/repo7/ lucid/universe Translation-id
    Ign file: lucid Release.gpg
    Ign file:/mnt/repo8/ lucid/universe Translation-id
    Ign file: lucid Release
    Ign file: lucid Release
    Ign file: lucid Release
    Ign file: lucid Release
    Ign file: lucid Release
    Ign file: lucid Release
    Ign file: lucid Release
    Ign file: lucid/main Packages
    Ign file: lucid/restricted Packages
    Ign file: lucid/multiverse Packages
    Ign file: lucid/universe Packages
    Get:1 file: lucid Release.gpg [189B]
    Ign file: lucid/universe Packages
    Ign file: lucid/universe Packages
    Ign file: lucid/universe Packages
    Ign file: lucid/universe Packages
    Ign file: lucid/universe Packages
    Ign file: lucid/main Packages
    Ign file: lucid/restricted Packages
    Ign file: lucid/multiverse Packages
    Ign file: lucid/universe Packages
    Get:2 file: lucid Release [3.005B]
    Ign file: lucid/universe Packages
    Ign file: lucid/universe Packages
    Ign file: lucid/universe Packages
    Ign file: lucid/universe Packages
    Ign file: lucid/universe Packages
    Ign file: lucid/main Packages
    Ign file: lucid/restricted Packages
    Ign file: lucid/main Packages
    Ign file: lucid/restricted Packages
    Reading package lists... Done
    Tokusukei@pinguin:

    pas coba tak install munculnya gini

    Tokusukei@pinguin:~$ sudo apt-get install samba
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    samba: Depends: samba-common (= 2:3.4.7~dfsg-1ubuntu3) but 2:3.4.7~dfsg-1ubuntu3.3 is to be installed
    Depends: libwbclient0 (= 2:3.4.7~dfsg-1ubuntu3) but 2:3.4.7~dfsg-1ubuntu3.3 is to be installed
    E: Broken packages
    Tokusukei@pinguin:~$

    kira-kira salahnya d mana y dan gimana cara ngatasinya ?
    thanks before

    ReplyDelete
  2. Anda menggunakan Ubuntu versi brapa? Dan Reponya juga versi brapa? Dari masalah diatas dia butuh repository terbaru......

    ReplyDelete