Difference between revisions of "Membuat Repository Ubuntu Lokal menggunakan NAS"
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
Line 17: | Line 17: | ||
Siapkan samba & smbfs | Siapkan samba & smbfs | ||
− | sudo apt-get install samba smbfs | + | sudo apt-get install samba smbfs debmirror |
Mount share folder [[NAS]] ke folder /mnt/nas di [[PC]] / [[laptop]] | Mount share folder [[NAS]] ke folder /mnt/nas di [[PC]] / [[laptop]] | ||
Line 113: | Line 113: | ||
==Mengupdate Isi Repository & Cron malam hari== | ==Mengupdate Isi Repository & Cron malam hari== | ||
+ | |||
+ | Install debmirror | ||
+ | |||
+ | apt-get install debmirror | ||
Buat folder untuk mirror keyring | Buat folder untuk mirror keyring |
Latest revision as of 07:58, 22 June 2012
Asumsi kita akan menempelkan sebuah NAS
- IP Address NAS : 10.150.5.240
- Folder Share : share
- username : usernamenas
- password ; passwordnas
- Folder Repo : share/repository/
- Repo 9.10 : share/repository/repo-9.10
- Repo 10.04 : share/repository/repo-10.4
- Repo 10.10 : share/repository/repo-10.10
- Repo 11.04 : share/repository/repo-11.04
- Repo 11.10 : share/repository/repo-11.10
- Repo 12.04 : share/repository/repo-12.04
Mount Folder NAS ke PC / laptop
Siapkan samba & smbfs
sudo apt-get install samba smbfs debmirror
Mount share folder NAS ke folder /mnt/nas di PC / laptop
mkdir /mnt/nas mount -t cifs //10.150.5.240/share /mnt/nas/ -o password=passwordnas -o username=usernamenas
Jika tidak ada username & password gunakan
mkdir /mnt/nas mount -t cifs //10.150.5.240/share /mnt/nas/ -o password=
Mount Repo NAS ke /var/data/repository
Tempelkan Tempat Repository di NAS ke /var/data/repository
mkdir /mnt/nas/repository mkdir /var/data mkdir /var/data/repository mount --bind /mnt/nas/repository/ /var/data/repository/
Mengubah /etc/apt/sources.list
Edit
vi /etc/apt/sources.list
Isi dengan
deb file:///var/data/repository/repo-9.10/ karmic main multiverse restricted universe deb file:///var/data/repository/repo-9.10/ karmic-updates main multiverse restricted universe deb file:///var/data/repository/repo-9.10/ karmic-security main multiverse restricted universe deb file:///var/data/repository/repo-9.10/ karmic-backports main multiverse restricted universe deb file:///var/data/repository/repo-9.10/ karmic-proposed main multiverse restricted universe deb file:///var/data/repository/repo-10.4/ lucid main multiverse restricted universe deb file:///var/data/repository/repo-10.4/ lucid-updates main multiverse restricted universe deb file:///var/data/repository/repo-10.4/ lucid-security main multiverse restricted universe deb file:///var/data/repository/repo-10.4/ lucid-backports main multiverse restricted universe deb file:///var/data/repository/repo-10.4/ lucid-proposed main multiverse restricted universe deb file:///var/data/repository/repo-10.10/ maverick main multiverse restricted universe deb file:///var/data/repository/repo-10.10/ maverick-updates main multiverse restricted universe deb file:///var/data/repository/repo-10.10/ maverick-security main multiverse restricted universe deb file:///var/data/repository/repo-10.10/ maverick-backports main multiverse restricted universe deb file:///var/data/repository/repo-10.10/ maverick-proposed main multiverse restricted universe deb file:///var/data/repository/repo-11.04/ natty main multiverse restricted universe deb file:///var/data/repository/repo-11.04/ natty-backports main multiverse restricted universe deb file:///var/data/repository/repo-11.04/ natty-proposed main multiverse restricted universe deb file:///var/data/repository/repo-11.04/ natty-security main multiverse restricted universe deb file:///var/data/repository/repo-11.04/ natty-updates main multiverse restricted universe deb file:///var/data/repository/repo-11.10/ oneiric main multiverse restricted universe deb file:///var/data/repository/repo-11.10/ oneiric-backports main multiverse restricted universe deb file:///var/data/repository/repo-11.10/ oneiric-proposed main multiverse restricted universe deb file:///var/data/repository/repo-11.10/ oneiric-security main multiverse restricted universe deb file:///var/data/repository/repo-11.10/ oneiric-updates main multiverse restricted universe deb file:///var/data/repository/repo-12.04/ precise main multiverse restricted universe deb file:///var/data/repository/repo-12.04/ precise-backports main multiverse restricted universe deb file:///var/data/repository/repo-12.04/ precise-proposed main multiverse restricted universe deb file:///var/data/repository/repo-12.04/ precise-security main multiverse restricted universe deb file:///var/data/repository/repo-12.04/ precise-updates main multiverse restricted universe
Jangan lupa setelah mengubah /etc/apt/sources.list lakukan
apt-get update
Mensharing Repo Lokal ke Komputer Lain Menggunakan Web
Install Apache
sudo apt-get install lamp-server^
Mount Repository ke Folder Web
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 mount --bind /mnt/nas/repository/repo-9.10 /var/www/ubuntu-9.10 mount --bind /mnt/nas/repository/repo-10.4 /var/www/ubuntu-10.04 mount --bind /mnt/nas/repository/repo-10.10 /var/www/ubuntu-10.10 mount --bind /mnt/nas/repository/repo-11.04 /var/www/ubuntu-11.04 mount --bind /mnt/nas/repository/repo-11.10 /var/www/ubuntu-11.10 mount --bind /mnt/nas/repository/repo-12.04 /var/www/ubuntu-12.04
Di komputer client di jaringan, file /etc/apt/sources.list perlu di ubah sesuai contoh berikut,
Mengupdate Isi Repository & Cron malam hari
Install debmirror
apt-get install debmirror
Buat folder untuk mirror keyring
mkdir /var/data/mirrorkeyring gpg --no-default-keyring --keyring /var/data/mirrorkeyring/trustedkeys.gpg --import /usr/share/keyrings/ubuntu-archive-keyring.gpg
Sebelum bisa digunakan dengan baik, kadang kala kita perlu beberapa kali menjalankan perintah
gpg --no-default-keyring --keyring /var/data/mirrorkeyring/trustedkeys.gpg --import /usr/share/keyrings/ubuntu-archive-keyring.gpg
Buat file mirrorbuild.sh untuk masing-masing versi repository
- Mirror Repository Ubuntu 9.10
- Mirror Repository Ubuntu 10.04
- Mirror Repository Ubuntu 10.10
- Mirror Repository Ubuntu 11.04
- Mirror Repository Ubuntu 11.10
- Mirror Repository Ubuntu 12.04
Pastikan agar mirrorbuild* bisa di execute
chmod -Rf 777 /usr/local/bin/mirrorbuild* chown -Rf nobody.nogroup /usr/local/bin/mirrorbuild*
Jika kita ingin mengupdate sekaligus misalnya setiap jam 7 malam maka kita perlu,
- buat file misalnya
touch /usr/local/bin/mirrorbuildall.sh chmod +x /usr/local/bin/mirrorbuildall.sh vi /usr/local/bin/mirrorbuildall.sh
isi dengan
/usr/local/bin/mirrorbuild.9.10.sh /usr/local/bin/mirrorbuild.10.04.sh /usr/local/bin/mirrorbuild.10.10.sh /usr/local/bin/mirrorbuild.11.04.sh /usr/local/bin/mirrorbuild.11.10.sh /usr/local/bin/mirrorbuild.12.04.sh
Masukan ke crontab & matikan setiap jam 7 pagi
crontab -e
0 19 * * * /usr/local/bin/mirrorbuildall.sh 0 7 * * * killall debmirror 2 7 * * * killall debmirror 4 7 * * * killall debmirror 8 7 * * * killall debmirror 10 7 * * * killall debmirror 12 7 * * * killall debmirror 14 7 * * * killall debmirror
Pranala Menarik
- Linux Howto
- Contoh isi file /etc/sources.list di Ubuntu
- Repository: Contoh sources.list ke 10.150.9.87
- Repository: Contoh sources.list ke 10.150.5.244
- Repository: Contoh sources.list ke 192.168.0.2
- Membuat Repository Ubuntu Lokal menggunakan NAS
- Membuat Mirrorkeyring untuk debmirror
- Membuat Repository Ubuntu Lokal menggunakan debmirror
- Mirror Repository Ubuntu 9.10
- Mirror Repository Ubuntu 10.04
- Mirror Repository Ubuntu 10.10
- Mirror Repository Ubuntu 11.04
- Mirror Repository Ubuntu 11.10
- Mirror Repository Ubuntu 12.04