Membuat server repositori Debian 8.1 dari iso DVD
Untuk mengatasi masalah-masalah tersebut kita dapat membuat sebuah server repository lokal yg dapat kita gunakan untuk seluruh jaringan lokal yang kita miliki. langkah-langkahnya adalah sebagai berikut :
1. Pastikan ruang di hardisk server cukup untuk menyimpan file iso DVD Debian 8.1
root@ns1:/data1/sistem-operasi/debian/debian-8.1.0-i386# ls -l
total 17412268
-rw-r--r-- 1 root root 3992977408 Jul 7 17:19 debian-8.1.0-i386-DVD-1.iso
-rw-r--r-- 1 root root 4653152256 Jul 7 21:22 debian-8.1.0-i386-DVD-2.iso
-rw-r--r-- 1 root root 4692109312 Jul 7 22:08 debian-8.1.0-i386-DVD-3.iso
-rw-r--r-- 1 root root 4474478592 Jul 7 23:11 debian-update-8.1.0-i386-DVD-1.iso
2. Install paket debian
root@ns1:~# pico /etc/apt/sources.list
#KAMBING-UI
deb http://kambing.ui.ac.id/debian/ jessie main contrib non-free
deb http://kambing.ui.ac.id/debian/ jessie-updates main contrib non-free
deb http://kambing.ui.ac.id/debian-security/ jessie/updates main contrib non-free
deb http://kambing.ui.ac.id/debian/ jessie main contrib non-free
deb http://kambing.ui.ac.id/debian/ jessie-updates main contrib non-free
deb http://kambing.ui.ac.id/debian-security/ jessie/updates main contrib non-free
root@ns1:~# apt-get update
root@ns1:~# apt-get install apache2 rsync dpkg-dev
root@ns1:~# apt-get install apache2 rsync dpkg-dev
3. Setelah semua paket terintall buat beberapa folder untuk tempat / wadah repo dan wadah untuk mount file iso tersebut.
root@ns1:~# mkdir /repo
root@ns1:~# mkdir /media/debian-8.1.0-i386-dvd1
root@ns1:~# mkdir /media/debian-8.1.0-i386-dvd2
root@ns1:~# mkdir /media/debian-8.1.0-i386-dvd3
root@ns1:~# mkdir -p /repo/pool/
root@ns1:~# mkdir -p /repo/dists/jessie/main/binary-i386
root@ns1:~# mkdir -p /repo/dists/jessie/main/source
4. Mount DVD ke folder
root@ns1:/data1/sistem-operasi/debian/debian-8.1.0-i386# ls -l
total 17412268
-rw-r--r-- 1 root root 3992977408 Jul 7 17:19 debian-8.1.0-i386-DVD-1.iso
-rw-r--r-- 1 root root 4653152256 Jul 7 21:22 debian-8.1.0-i386-DVD-2.iso
-rw-r--r-- 1 root root 4692109312 Jul 7 22:08 debian-8.1.0-i386-DVD-3.iso
-rw-r--r-- 1 root root 4474478592 Jul 7 23:11 debian-update-8.1.0-i386-DVD-1.iso
# mount -o loop debian-8.1.0-i386-DVD-1.iso /media/debian-8.1.0-i386-dvd1
# mount -o loop debian-8.1.0-i386-DVD-2.iso /media/debian-8.1.0-i386-dvd2
# mount -o loop debian-8.1.0-i386-DVD-3.iso /media/debian-8.1.0-i386-dvd3
total 17412268
-rw-r--r-- 1 root root 3992977408 Jul 7 17:19 debian-8.1.0-i386-DVD-1.iso
-rw-r--r-- 1 root root 4653152256 Jul 7 21:22 debian-8.1.0-i386-DVD-2.iso
-rw-r--r-- 1 root root 4692109312 Jul 7 22:08 debian-8.1.0-i386-DVD-3.iso
-rw-r--r-- 1 root root 4474478592 Jul 7 23:11 debian-update-8.1.0-i386-DVD-1.iso
# mount -o loop debian-8.1.0-i386-DVD-1.iso /media/debian-8.1.0-i386-dvd1
# mount -o loop debian-8.1.0-i386-DVD-2.iso /media/debian-8.1.0-i386-dvd2
# mount -o loop debian-8.1.0-i386-DVD-3.iso /media/debian-8.1.0-i386-dvd3
5. Selanjutnya "rsyn" semua DVD
root@ns1:~# rsync -avH /media/debian-8.1.0-i386-dvd1/pool /repo/pool
.....
.....
pool/main/z/zvbi/libzvbi0_0.2.35-3_i386.deb
pool/main/z/zziplib/
pool/main/z/zziplib/libzzip-0-13_0.13.62-3_i386.deb
sent 3,855,189,480 bytes received 97,425 bytes 72,061,437.48 bytes/sec
total size is 3,853,855,792 speedup is 1.00
.....
pool/main/z/zvbi/libzvbi0_0.2.35-3_i386.deb
pool/main/z/zziplib/
pool/main/z/zziplib/libzzip-0-13_0.13.62-3_i386.deb
sent 3,855,189,480 bytes received 97,425 bytes 72,061,437.48 bytes/sec
total size is 3,853,855,792 speedup is 1.00
root@ns1:~# rsync -avH /media/debian-8.1.0-i386-dvd2/pool /repo/pool
.....
.....
pool/main/z/zoo/zoo_2.10-27+b1_i386.deb
pool/main/z/zthreads/
pool/main/z/zthreads/libzthread-2.3-2_2.3.2-7.2_i386.deb
sent 4,635,041,021 bytes received 85,467 bytes 74,162,023.81 bytes/sec
total size is 4,633,556,492 speedup is 1.00
.....
pool/main/z/zoo/zoo_2.10-27+b1_i386.deb
pool/main/z/zthreads/
pool/main/z/zthreads/libzthread-2.3-2_2.3.2-7.2_i386.deb
sent 4,635,041,021 bytes received 85,467 bytes 74,162,023.81 bytes/sec
total size is 4,633,556,492 speedup is 1.00
root@ns1:~# rsync -avH /media/debian-8.1.0-i386-dvd3/pool /repo/pool
.....
.....
pool/main/z/zsnes/zsnes_1.510+bz2-8_i386.deb
pool/main/z/zziplib/
pool/main/z/zziplib/libzzip-dev_0.13.62-3_i386.deb
sent 4,676,962,527 bytes received 71,322 bytes 76,049,330.88 bytes/sec
total size is 4,675,525,984 speedup is 1.00
.....
pool/main/z/zsnes/zsnes_1.510+bz2-8_i386.deb
pool/main/z/zziplib/
pool/main/z/zziplib/libzzip-dev_0.13.62-3_i386.deb
sent 4,676,962,527 bytes received 71,322 bytes 76,049,330.88 bytes/sec
total size is 4,675,525,984 speedup is 1.00
6. Selanjutkan daftarkan seluruh paket yang ada dengan perintah
root@ns1:~# cd /repo
root@ns1:/repo#
root@ns1:/repo# dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
root@ns1:/repo#
root@ns1:/repo# dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
....
....
penchrome
xserver-xorg-video-qxl xserver-xorg-video-r128
xserver-xorg-video-radeon xserver-xorg-video-savage
xserver-xorg-video-siliconmotion xserver-xorg-video-sisusb
xserver-xorg-video-tdfx xserver-xorg-video-trident
xserver-xorg-video-vesa xserver-xorg-video-vmware xsltproc xterm
xtightvncviewer xtrans-dev xul-ext-adblock-plus xul-ext-firebug
xul-ext-flashblock xul-ext-https-everywhere xul-ext-mozvoikko
xul-ext-noscript xutils xutils-dev xvfb xvnc4viewer xwayland xxdiff xxkb
xz-utils xzgv yakuake yasm yelp yelp-xsl youtube-dl yum zabbix-agent
zabbix-frontend-php zabbix-server-mysql zathura zathura-djvu zathura-ps
zeitgeist zeitgeist-core zeitgeist-datahub zendframework zenity
zenity-common zenmap zerofree zh-autoconvert zhcon zim zip zlib1g
zlib1g-dev zlibc zoo zsh zsh-common zsh-doc zsnes
dpkg-scanpackages: info: Wrote 10470 entries to output Packages file.
dpkg-scanpackages: info: Wrote 10470 entries to output Packages file.
root@ns1:/repo#
Selanjutnya jika sudah selesai masukan perintah berikut
root@ns1:/repo# dpkg-scansources . /dev/null | gzip -9c > Sources.gz
kemudian lihat hasil dari 2 perintah diatas, sekarang anda cukup memindah kan kedua hasil tersebut ke foldernya masing-masing dengan perintah
root@ns1:/repo# ls
dists Packages.gz pool Sources.gz
root@ns1:/repo# mv Packages.gz /repo/dists/jessie/main/binary-i386/
root@ns1:/repo# mv Sources.gz /repo/dists/jessie/main/source/
dists Packages.gz pool Sources.gz
root@ns1:/repo# mv Packages.gz /repo/dists/jessie/main/binary-i386/
root@ns1:/repo# mv Sources.gz /repo/dists/jessie/main/source/
7. Selanjutnya untuk membuatnya dapat diakses dari client maupun server-server lain anda cukup membuat link simbolik dari repo ke /var/www/html dengan nama debian
root@ns1:/repo# ln -s /repo /var/www/html/debian
8. Untuk menggunakannya Anda dapat mengedit file /etc/apt/sources.list pada client atau pada server dan tuliskan alamat repo seperti dibawah ini
root@ns1:/repo# pico /etc/apt/sources.list
deb http://10.109.22.2/debian jessie main
deb-src http://10.109.22.2/debian jessie main
deb-src http://10.109.22.2/debian jessie main
simpan dengan menekan ctrl+x tekan y lalu enter.
root@ns1:/repo# apt-get update
Ign http://10.109.22.2 jessie InRelease
Ign http://10.109.22.2 jessie Release.gpg
Ign http://10.109.22.2 jessie Release
Ign http://10.109.22.2 jessie/main Sources/DiffIndex
Ign http://10.109.22.2 jessie/main i386 Packages/DiffIndex
Hit http://10.109.22.2 jessie/main Sources
Hit http://10.109.22.2 jessie/main i386 Packages
Ign http://10.109.22.2 jessie/main Translation-en_US
Ign http://10.109.22.2 jessie/main Translation-en
Reading package lists... Done
9. sampai pada tahap ini server repository lokal siap untuk di gunakan.Ign http://10.109.22.2 jessie Release.gpg
Ign http://10.109.22.2 jessie Release
Ign http://10.109.22.2 jessie/main Sources/DiffIndex
Ign http://10.109.22.2 jessie/main i386 Packages/DiffIndex
Hit http://10.109.22.2 jessie/main Sources
Hit http://10.109.22.2 jessie/main i386 Packages
Ign http://10.109.22.2 jessie/main Translation-en_US
Ign http://10.109.22.2 jessie/main Translation-en
Reading package lists... Done
No comments: