Jika anda seorang pengguna linux yang sudah mahir , pastilah anda tidak akan bingung dengan apa yang dinamakan "Repositori" , tetapi bagi orang yang awam di dunia linux , saya lihat memang beberapa orang yang ada disekitar saya belum mengerti apa itu repositori ,
Oke saya jelas kan singkat nya aja , "Repository adalah istilah dalam Linux yang kira-kira berarti tempat
penyimpanan aplikasi Linux. Berbeda dengan Windows atau sistem operasi
pada umumnya, di Linux sebagian besar aplikasi telah tertata rapih di
repository dan kita dapat dengan mudah menggunakannya jika kita dapat
mengakses repository tersebut.
"
Disini saya akan menjelaskan bagaimana cara membuat repo lokal Ubuntu 14.04 LTS , singkat saja ya
- Siapkan PC/Server yang akan dibuat menjadi repo lokal
- DVD repo Ubuntu 14.04 LTS jumlah nya ada 15 keping DVD dengan kapasitas 1 DVD itu 4 GB atau anda bisa menggunakan bandwidth yang cukup memadai untuk trafic pengiriman data antara server kita dengan server acuan kita .
- Pilih lah repo atau server acuan yang terdekat dan terpercaya , yang saya contoh kan disini adalah server kambing.ui.ac.id dengan alamat IP 152.118.24.30 .
- Berdoa dan berusaha
- Login lah ke Server anda
- Pastikan server anda terkoneksi dengan internet
- Ketikan perintah berikut
apt-get install apache2 - Lalu buat lah sebuah direktori dengan menuliskan perintah berikut
mkdir /var/data && mkdir /var/data/mirrorkeyring - Jalan kan perintah berikut
gpg --no-default-keyring --keyring /var/data/mirrorkeyring/trustedkeys.gpg --import /usr/share/keyrings/ubuntu-archive-keyring.gpg - Buatlah sebuah folder dan menginstall aplikasi debmirror , dengan menggunakan script berikut
apt-get install debmirror && mkdir /var/data/repository && mkdir /var/data/repository/repo-14.04-32 - Sekarang , waktu nya kita membuat skrip agar server kita dapat bersikronisasi dengan server acuan
touch /usr/local/bin/mirrorbuild.14.04.sh && chmod -Rf 777 /usr/local/bin/mirrorbuild* && chown -Rf nobody.nogroup /usr/local/bin/mirrorbuild* - Mengkonfigurasi file mirrorbuild.14.04.sh dengan menggunakan perintah
nano /usr/local/bin/mirrorbuild.14.04.sh
lalu isikan scritp sesuai dengan apa yang ada di file berikut atau kopas script dibawah 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=
/var/data/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
# 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=maverick,maverick-security,maverick-updates,maverick-backports,maverick-proposed
# release=oneiric,oneiric-backports,oneiric-proposed,oneiric-security,oneiric-updates
# release=precise,precise-backports,precise-proposed,precise-security,precise-updates
release=quantal,quantal-backports,quantal-proposed,quantal-security,quantal-updates
# 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=ns1.fahmi.my.id:5432
# server=ns1.fahmi.my.id
server=152.118.24.30
# Dir= -r # Path from the main server, so http://my.web.server/$dir, Server dependant
#
inPath=ubuntu
# 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=
/var/data/repository/repo-12
.10-32
# 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 ####
Kalau misal susah anda bisa mendownload nya di file server saya dan tersedia dalam 2 bentuk .odt dan .pdf .
lalu kita buat file mirrorbuild.14.04.sh agar dapat dieksekusi dan merubah ijin nya ketik perintah berikut
chmod -Rf 777 /usr/local/bin/mirrorbuild.14.04.sh && chown -Rf root.root /var/data/repository/repo-14.04-32 && chmod -Rf 571 /var/data/repository/repo-14.04
Agar file tersebut bisa jalan anda cukup menuliskan perintah
ln -s /usr/local/bin/mirrorbuild.14.04.sh /bin/mirrorbuild.14.04.sh && mirrorbuild.14.04.sh
Note:
Perlu diperhatikan , bahwa ketika anda tidak berhasil bersikronisasi dengan server kambing, coba lah untuk bertanya ke admin kambing dan minta ijin agar server anda dapat bersikronisasi dengan server tersebut .
Agar file tersebut dapat dieksekusi setiap waktu , anda dapat menggunakan aplikasi cron , lebih lengkap nya bisa dilihat di halam berikut , klik disini
Sumber .
0 komentar:
Posting Komentar