Mirror repository ubuntu sangat dibutuhkan sekali oleh bangsa kita, dan tidak disadari pula telah banyak yang membuat repository untuk keperluan jaringan lokal. Permasalahan yang muncul adalah kesetaraan isi repository milik kita dengan server repository yang lain. ketidaksesuain ini dapat menyebabkan kesalahan update paket2 yang bersangkutan lho!
Bagaimana caranya agar server repository kita dapat singkron dengan Server mirror lain? jawabanya.. kita dapat menggunakan debmirror, rsync atau apt-mirror. dalam kesempatan kali ini saya akan mengajak kita semua untuk membuat mirror ubuntu di server milik kita sendiri. ada pun kelengkapan yang harus dimiliki adalah:
0. Koneksi Internet
1. Bandwidth yang lumayan
2. Freespace di hardisk yang banyak (usahakan 60GB)
baiklah, berikut adalah step by stepnya:
0. buat direktory mirror, saya menggunakan direktory /home/mirror
$ sudo mkdir /home/mirror && cd /home/mirror
1. Install Debmirror
$ sudo apt-get install debmirror
2. Buat direktory mirror untuk ubuntu
$ sudo mkdir ubuntu
3. silakan kopi dan salin skript di lampiran untuk proses mirroring, dan namakan dengan mirror.ubuntu.sh dan simpan di /home/mirror/mirror.ubuntu.sh
4. ubah permisi untuk berkas tersebut
$ sudo chmod +x mirror.ubuntu.sh
5. silakan tunggu karena mirror anda sedang dibangun
6. Install webserver, anda dapat menggunakan apache2 atau lighttpd
$ sudo apt-get install apache2 # jika anda menggunakan apache
$ sudo apt-get install lighttpd # jika anda menggunakan lighttpd
7. Buat link untuk pengaksesan web agar supaya mirror kita dapat diakses dari luar
$ sudo ln -s /home/mirror/ubuntu /va/www/ubuntu
8. singkronkan selalu dengan server repository, dapat menggunakan anacron untuk melakukanya
$ sudo crontab -e
isikan dengan * 5,22,10,15 * * * cd /home/ftp && /home/mirror/mirror.ubuntu.sh
simpan dan repository akan di cek pada jam 5, 10, 15 dan 22
Selesai, mudah bukan?
Lampiran script:
#!/bin/bash
# created by Mahyuddin Susanto
# please give this file exsecution mode
# sudo chmod +x this_file.sh
# i asumsed you run this file at /home/mirror/
# type $ man debmirror for more information about debmirror
MIR=/usr/bin/debmirror
if test -e $MIR;
then
# this is most important :p
echo “Debian/Ubuntu scanning packages for own repository”
echo “Created by Mahyuddin Susanto aka udienz@ubuntu.com”
echo “Use Your Own Risk”
else
echo “Currently, package dependency is not installed on your system, please install first”
echo “using apt-get install debmirror”
exit 1
fi
# Server, lets declare your target server, you can add your nearest ubuntu mirror like jp.archive.ubuntu.com
SERVER=archive.ubuntu.com
# tellme where root server have ubuntu mirror, you can insert like: ubuntu, pub/ubuntu depends your server
# example: ubuntu mirror at foss-id like http://dl2.foss-id.web.id/ubuntu of course you can type ROOT=ubuntu
ROOT=ubuntu
# What’s your method to use mirroring? you can use http, ftp, hftp, rsync method
METHOD=http
# let’s discuss about release ubuntu, ubuntu have code name release like wathy, breezy, dapper, edgy, feisty, gutsy, hardy, intrepid
# in this case you can mirroring release ubuntu more than one release, or you can mirroring update package, security package, proposed package
# ex: $release-security so you can type hardy,hardy-updates,hardy-security,hardy-backports,hardy-proposed
RELEASE=hardy,hardy-updates,hardy-security,hardy-backports,hardy-proposed,intrepid,intrepid-updates,intrepid-security,intrepid-backports,intrepid-proposed
# section, hm… no more information here
# ubuntu section is main, restricted, universe, multiverse
# but you can add more section like debian-installer on the section
SECTION=main,restricted,universe,multiverse,main/debian-installer,restricted/debian-installer,universe/debian-installer,multiverse/debian-installer
# architecture… hm.. what architecture fo you want to mirroring? i386 (32bit), amd64 (64bit, include IA64), sparc or powerpc?
ARCHITECTURE=i386,amd64 #just it?
# okey next you must save mirror file to your directory, but you must declare on here. i save my mirror at /media/mirror/ubuntu
TARGET=ubuntu
if test -d `pwd`/$TARGET;
then EXISTS=”yes”
else
echo “it seems you don’t have ubuntu directory, create first!”
exit 1
fi
# hmm…. do you cannocted under proxy? if yes you must add –proxy=http://you-name:your_passwd@url:port
#TMPFILE=`mktemp -t mirror.surat`
#exec > “$TMPFILE”
#echo “From: “DebMirror Ubuntu” “root@ubuntu.nad.go.id”"
#echo “To: isikan yang akan menerima”
#echo “Cc: hadinux@gmail.com,udienz@ubuntu.com”
#echo “Subject: Minta perhatian penggunaan benwit”
#echo “”
#echo “Assalamualaikum”
#echo “”
#echo “Mohon perhatian, server sedang melakukan proses mirror repository ubuntu”
#echo “untuk itu mohon kesediaanya untuk memberi benwit pada server agar cepet selesai mirrornya”
#echo “atas perhatian dan kerjasamanya kami ucapkan terimakasih”
#echo “”
#echo `date`
#echo “wassalam”
#echo “”
#echo “Mirror dengan: $METHOD/$SERVER/$ROOT/$DISTRO $SECTION”
#echo “Untuk arsitektur $ARCHITECTURE”
#echo “Versi: $VERSION”
#echo “”
#echo “–++ DebMirror ++–”
#echo “”
#echo “———————————————————”
#cat $CHANGES_FILE
#exec
#/usr/sbin/sendmail -t -i < $TMPFILE
#rm -f $TMPFILE
debmirror -m --passive \
--host=$SERVER \
--root=$ROOT \
--method=$METHOD \
--progress \
--dist=$DISTRO \
--section=$SECTION \
--arch=$ARCHITECTURE \
$TARGET \
--nosource
--getcontents
# if you want to mirroring both of binary package and source you can delete --nosource, i'm not this option because my disk is limiitted.
# and if you don't want to remove previous repositories you can add --nocleanup option
# if you get error messages about gpg files maybe you forget to add gpg ubuntu archive as trusted keys
# gpg --keyring /usr/share/keyrings/ubuntu-archive-keyring.gpg --export | gpg --no-default-keyring --keyring trustedkeys.gpg --import
# note: remember your free space and bandwidth
Bagaimana caranya agar server repository kita dapat singkron dengan Server mirror lain? jawabanya.. kita dapat menggunakan debmirror, rsync atau apt-mirror. dalam kesempatan kali ini saya akan mengajak kita semua untuk membuat mirror ubuntu di server milik kita sendiri. ada pun kelengkapan yang harus dimiliki adalah:
0. Koneksi Internet
1. Bandwidth yang lumayan
2. Freespace di hardisk yang banyak (usahakan 60GB)
baiklah, berikut adalah step by stepnya:
0. buat direktory mirror, saya menggunakan direktory /home/mirror
$ sudo mkdir /home/mirror && cd /home/mirror
1. Install Debmirror
$ sudo apt-get install debmirror
2. Buat direktory mirror untuk ubuntu
$ sudo mkdir ubuntu
3. silakan kopi dan salin skript di lampiran untuk proses mirroring, dan namakan dengan mirror.ubuntu.sh dan simpan di /home/mirror/mirror.ubuntu.sh
4. ubah permisi untuk berkas tersebut
$ sudo chmod +x mirror.ubuntu.sh
5. silakan tunggu karena mirror anda sedang dibangun
6. Install webserver, anda dapat menggunakan apache2 atau lighttpd
$ sudo apt-get install apache2 # jika anda menggunakan apache
$ sudo apt-get install lighttpd # jika anda menggunakan lighttpd
7. Buat link untuk pengaksesan web agar supaya mirror kita dapat diakses dari luar
$ sudo ln -s /home/mirror/ubuntu /va/www/ubuntu
8. singkronkan selalu dengan server repository, dapat menggunakan anacron untuk melakukanya
$ sudo crontab -e
isikan dengan * 5,22,10,15 * * * cd /home/ftp && /home/mirror/mirror.ubuntu.sh
simpan dan repository akan di cek pada jam 5, 10, 15 dan 22
Selesai, mudah bukan?
Lampiran script:
#!/bin/bash
# created by Mahyuddin Susanto
# please give this file exsecution mode
# sudo chmod +x this_file.sh
# i asumsed you run this file at /home/mirror/
# type $ man debmirror for more information about debmirror
MIR=/usr/bin/debmirror
if test -e $MIR;
then
# this is most important :p
echo “Debian/Ubuntu scanning packages for own repository”
echo “Created by Mahyuddin Susanto aka udienz@ubuntu.com”
echo “Use Your Own Risk”
else
echo “Currently, package dependency is not installed on your system, please install first”
echo “using apt-get install debmirror”
exit 1
fi
# Server, lets declare your target server, you can add your nearest ubuntu mirror like jp.archive.ubuntu.com
SERVER=archive.ubuntu.com
# tellme where root server have ubuntu mirror, you can insert like: ubuntu, pub/ubuntu depends your server
# example: ubuntu mirror at foss-id like http://dl2.foss-id.web.id/ubuntu of course you can type ROOT=ubuntu
ROOT=ubuntu
# What’s your method to use mirroring? you can use http, ftp, hftp, rsync method
METHOD=http
# let’s discuss about release ubuntu, ubuntu have code name release like wathy, breezy, dapper, edgy, feisty, gutsy, hardy, intrepid
# in this case you can mirroring release ubuntu more than one release, or you can mirroring update package, security package, proposed package
# ex: $release-security so you can type hardy,hardy-updates,hardy-security,hardy-backports,hardy-proposed
RELEASE=hardy,hardy-updates,hardy-security,hardy-backports,hardy-proposed,intrepid,intrepid-updates,intrepid-security,intrepid-backports,intrepid-proposed
# section, hm… no more information here
# ubuntu section is main, restricted, universe, multiverse
# but you can add more section like debian-installer on the section
SECTION=main,restricted,universe,multiverse,main/debian-installer,restricted/debian-installer,universe/debian-installer,multiverse/debian-installer
# architecture… hm.. what architecture fo you want to mirroring? i386 (32bit), amd64 (64bit, include IA64), sparc or powerpc?
ARCHITECTURE=i386,amd64 #just it?
# okey next you must save mirror file to your directory, but you must declare on here. i save my mirror at /media/mirror/ubuntu
TARGET=ubuntu
if test -d `pwd`/$TARGET;
then EXISTS=”yes”
else
echo “it seems you don’t have ubuntu directory, create first!”
exit 1
fi
# hmm…. do you cannocted under proxy? if yes you must add –proxy=http://you-name:your_passwd@url:port
#TMPFILE=`mktemp -t mirror.surat`
#exec > “$TMPFILE”
#echo “From: “DebMirror Ubuntu” “root@ubuntu.nad.go.id”"
#echo “To: isikan yang akan menerima”
#echo “Cc: hadinux@gmail.com,udienz@ubuntu.com”
#echo “Subject: Minta perhatian penggunaan benwit”
#echo “”
#echo “Assalamualaikum”
#echo “”
#echo “Mohon perhatian, server sedang melakukan proses mirror repository ubuntu”
#echo “untuk itu mohon kesediaanya untuk memberi benwit pada server agar cepet selesai mirrornya”
#echo “atas perhatian dan kerjasamanya kami ucapkan terimakasih”
#echo “”
#echo `date`
#echo “wassalam”
#echo “”
#echo “Mirror dengan: $METHOD/$SERVER/$ROOT/$DISTRO $SECTION”
#echo “Untuk arsitektur $ARCHITECTURE”
#echo “Versi: $VERSION”
#echo “”
#echo “–++ DebMirror ++–”
#echo “”
#echo “———————————————————”
#cat $CHANGES_FILE
#exec
#/usr/sbin/sendmail -t -i < $TMPFILE
#rm -f $TMPFILE
debmirror -m --passive \
--host=$SERVER \
--root=$ROOT \
--method=$METHOD \
--progress \
--dist=$DISTRO \
--section=$SECTION \
--arch=$ARCHITECTURE \
$TARGET \
--nosource
--getcontents
# if you want to mirroring both of binary package and source you can delete --nosource, i'm not this option because my disk is limiitted.
# and if you don't want to remove previous repositories you can add --nocleanup option
# if you get error messages about gpg files maybe you forget to add gpg ubuntu archive as trusted keys
# gpg --keyring /usr/share/keyrings/ubuntu-archive-keyring.gpg --export | gpg --no-default-keyring --keyring trustedkeys.gpg --import
# note: remember your free space and bandwidth
Tue Jan 08, 2013 12:19 pm by kopral
» Cara Install Google Earth 6.0.3.2197 di Ubuntu 12.10
Thu Nov 01, 2012 7:38 pm by kopral
» ISPCONFIG 3 In Debian Etch
Sat Oct 20, 2012 3:07 am by kopral
» www.kolins.org
Wed Oct 17, 2012 4:44 pm by kopral
» Menerima Servis Komputer Kerumah, Sekolah DLL.
Wed Oct 17, 2012 3:35 pm by kopral
» Rom, stok flash boot dan kernel android
Tue Oct 16, 2012 9:00 pm by kopral
» ngoprek - ngoprek
Mon Oct 15, 2012 2:41 pm by kopral
» Menjual Repository Ubuntu 12.04
Mon Oct 15, 2012 2:26 pm by kopral
» Menjual Repository Ubuntu 11.04
Mon Oct 15, 2012 2:23 pm by kopral
» Menjual Repository Ubuntu 10.10
Mon Oct 15, 2012 2:20 pm by kopral
» Menjual Repository Ubuntu 9.10
Mon Oct 15, 2012 2:18 pm by kopral
» Menjual Repository Ubuntu 9.04
Mon Oct 15, 2012 2:15 pm by kopral
» Menjual Repository Ubuntu 8.04
Mon Oct 15, 2012 2:13 pm by kopral
» Menjual Repository Ubuntu 7.10
Mon Oct 15, 2012 2:07 pm by kopral
» Menjual Repository Ubuntu 7.04
Mon Oct 15, 2012 2:04 pm by kopral
» aplikasi android
Mon Oct 15, 2012 12:38 pm by kopral
» update aplikasi september 2012
Sat Oct 13, 2012 6:38 am by kopral
» Daftar Repositori ubuntu 12.04 LTS
Tue Oct 02, 2012 8:40 pm by kopral
» profile Onno W. Purbo
Mon Sep 24, 2012 1:02 pm by kopral
» cara Installing SQUID / LUSCA in UBUNTU
Mon Jul 16, 2012 11:37 pm by rezza
» Pengertian IP Address dan Pembagian Kelas IP Address
Thu Jul 12, 2012 10:21 pm by rezza
» pengertian cloud ( komputasi awan )
Thu Jul 12, 2012 9:55 pm by rezza
» Cara Instal Webserver Apache MySQL PHP PHPMyadmin di Ubuntu
Thu Jul 12, 2012 7:57 pm by rezza
» Membuat DISTRO LINUX sendiri dengan ubuntu builder
Wed Jul 11, 2012 4:22 pm by rezza
» Distro Linux Indonesia
Wed Jul 11, 2012 4:15 pm by rezza
» Konfigurasi VPN di Ubuntu
Sun Jul 01, 2012 11:09 pm by rezza
» mempercepat buffering youtube dengan lusca
Fri Jun 22, 2012 12:55 am by kopral
» Mengembalikan GRUB Ubuntu yang hilang/tertimpa OS Wedus
Wed Jun 13, 2012 4:02 pm by kopral
» menginstall redhat linux 9.0 sebagai server
Mon Jun 11, 2012 7:38 am by rezza
» bahas fungsi LDR dan photodioda
Thu May 31, 2012 10:23 pm by kopral
» Cara install wine untuk menjalankan aplikasi windows dengan tipe .exe
Mon May 28, 2012 2:23 pm by kopral
» Pengenalan GIMP
Mon May 28, 2012 1:43 am by rezza
» Menyingkap Seluk Beluk BTS
Mon May 28, 2012 1:29 am by rezza
» Tips dan Trik Mempercepat Waktu Booting Ubuntu 12.04
Sun May 27, 2012 11:03 pm by kopral
» Mempercepat booting ubuntu
Sun May 27, 2012 10:46 pm by kopral
» X / OS linux
Fri May 25, 2012 11:44 pm by rezza
» fedora 17 beta
Fri May 25, 2012 11:41 pm by rezza
» linux fedora 16
Fri May 25, 2012 11:37 pm by rezza
» Slacko Puppy (Slackware-Compatible Build)
Fri May 25, 2012 11:31 pm by rezza
» Linux Mint 13
Fri May 25, 2012 11:28 pm by rezza
» Lupakan Wifi, Internet Kencang Hanya Dari Cahaya Lampu
Fri May 25, 2012 5:15 pm by kopral
» Membangun WLAN Menggunakan Lampu LED, Sebuah Inovasi Internet Lewat Cahaya Lampu
Fri May 25, 2012 5:02 pm by kopral
» Fiber Optic
Fri May 25, 2012 6:57 am by kopral
» Jenis - jenis Kabel LAN
Tue May 22, 2012 12:15 pm by kopral
» Mengenal Jaringan Komputer Berbasis Serat Optik
Tue May 22, 2012 10:24 am by kopral
» Penjelasan & Pengertian Open Source Software Dan Free Software
Tue May 22, 2012 10:01 am by kopral
» instal ubuntu di laptop HP pavilion g4
Sun May 20, 2012 6:07 am by kopral
» redhat iso
Sat May 19, 2012 5:35 pm by kopral
» mandriva iso
Sat May 19, 2012 5:33 pm by kopral
» debian iso
Sat May 19, 2012 5:31 pm by kopral
» Backtrack 5
Sat May 19, 2012 5:28 pm by kopral
» Ubuntu 12.10 (Quantal Quetzal) Daily Build
Sat May 19, 2012 5:18 pm by kopral
» Ubuntu 12.04 LTS (Precise Pangolin)
Sat May 19, 2012 5:17 pm by kopral
» Ubuntu 11.10 (Oneiric Ocelot)
Sat May 19, 2012 5:15 pm by kopral
» Ubuntu 11.04 (Natty Narwhal)
Sat May 19, 2012 5:14 pm by kopral
» Ubuntu 10.10 (Maverick Meerkat)
Sat May 19, 2012 5:12 pm by kopral
» Memindahkan Launcher Unity ke Bawah
Sat May 19, 2012 5:01 pm by kopral
» Cara Mengembalikan Panel Unity
Sat May 19, 2012 4:58 pm by kopral
» membuat satelite mini berkoneksi internet
Thu May 17, 2012 10:11 pm by kopral
» 5 Keuntungan Sistem Linux bagi para Administrator Windows Server
Fri May 11, 2012 4:14 am by kopral
» Script untuk Membuat Daftar Account Locked/Closed/Maintenance
Fri May 11, 2012 4:03 am by kopral
» Instalasi Multi-Server Zimbra (1)
Fri May 11, 2012 3:55 am by kopral
» Instalasi Multi-Server Zimbra (2)
Fri May 11, 2012 3:47 am by kopral
» Instalasi Multi-Server Zimbra (3)
Fri May 11, 2012 3:45 am by kopral
» Instalasi Multi-Server Zimbra (4)
Fri May 11, 2012 3:43 am by kopral
» FreeNAS NFS & iSCSI Share untuk VMWare vSphere Datastore & Shared Storage
Fri May 11, 2012 3:33 am by kopral
» Summary Proses Instalasi & Konfigurasi Mail Server untuk Production Server (Live)
Fri May 11, 2012 3:31 am by kopral
» High Availability, Disaster Recovery dan Keberlangsungan Bisnis Perusahaan
Fri May 11, 2012 3:29 am by kopral
» Instalasi ATI VGA Driver pada Linux BlankOn 7 “Pattimura” & Ubuntu 11.04 “Natty Narwhal”
Fri May 11, 2012 3:05 am by kopral
» “Drag-and-Drop” Layanan Dropbox Terbaru untuk Saingi SkyDrive, iCloud, Box, dan Google Drive
Thu May 10, 2012 9:57 pm by kopral
» Robot Open Source Qbo dengan Sistem Operasi Linux
Thu May 10, 2012 9:52 pm by kopral
» Aurora Sistem Operasi Linux Untuk Netbook Dulunya Bernama EeeBuntu
Thu May 10, 2012 9:49 pm by kopral
» Linux Ubuntu akan Mendukung MultiTouch
Thu May 10, 2012 9:47 pm by kopral
» Meego 1.1 Telah Dirilis Termasuk Meego untuk Kendaraan seperti Mobil
Thu May 10, 2012 9:44 pm by kopral
» Gnome 3 Terbaru Telah Dirilis Memberi Pengalaman Baru Antarmuka Linux
Thu May 10, 2012 9:40 pm by kopral
» Ping EEE Linux OS Distro Khusus Dirancang Khusus Netbook
Thu May 10, 2012 9:35 pm by kopral
» Centos 6 Linux Terbaru Telah Dirilis
Thu May 10, 2012 9:32 pm by kopral
» Linux bisa Diinstal di Apple iPad berkat Hacker
Thu May 10, 2012 9:30 pm by kopral
» SeaMonkey Versi 2.4 Memiliki Fitur Hampir Sama Dengan Firefox 7
Thu May 10, 2012 9:27 pm by kopral
» Nokia Meltemi Proyek Pengembangan OS Mobile Berbasis Linux Pengganti S40
Thu May 10, 2012 9:21 pm by kopral
» Ubuntu 12.04, OS Linux yang Menawarkan Konsumsi Energi Lebih Efisien
Thu May 10, 2012 9:19 pm by kopral
» Dreamlinux 5.0 Final dengan UI ala Mac OS X
Thu May 10, 2012 9:17 pm by kopral
» Windows Aman bagi anak
Thu May 10, 2012 5:49 am by kopral
» info kesehatan
Thu May 10, 2012 5:45 am by kopral
» BERITA HUKUM
Thu May 10, 2012 5:41 am by kopral
» Demo turunkan harga LISENSI
Thu May 10, 2012 5:35 am by kopral
» nokia OS symbian
Thu May 10, 2012 5:27 am by kopral
» bill gates
Thu May 10, 2012 5:24 am by kopral
» Menurunnya harga produk kecantikan wanita...
Thu May 10, 2012 5:13 am by kopral
» Dosa-dosa TIK oleh Bangsa Indonesia
Thu May 10, 2012 5:01 am by kopral
» Jika Linux hanya Android
Thu May 10, 2012 4:59 am by kopral
» Model Bisnis Open Source
Thu May 10, 2012 4:49 am by kopral
» Memahami Software Komersial dan Non Komersial
Thu May 10, 2012 4:46 am by kopral
» Pro-Kontra Sertifikasi SDM Linux
Thu May 10, 2012 4:45 am by kopral
» Yayasan Penggerak Linux Indonesia (YPLI)
Thu May 10, 2012 4:40 am by kopral
» beda Linux dan Windows
Thu May 10, 2012 4:39 am by kopral
» Mengubah Tampilan Ubuntu 12.04
Thu May 10, 2012 4:38 am by kopral
» Desktop Publishing dengan Open Source
Thu May 10, 2012 4:34 am by kopral
» Sekolah dan Perguruan Tinggi Linux
Thu May 10, 2012 4:32 am by kopral