Difference between revisions of "Membuat Repository Ubuntu Lokal menggunakan NAS"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
Line 108: | Line 108: | ||
gpg --no-default-keyring --keyring /var/data/mirrorkeyring/trustedkeys.gpg --import /usr/share/keyrings/ubuntu-archive-keyring.gpg | 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 | Buat file mirrorbuild.sh untuk masing-masing versi repository |
Revision as of 08:07, 21 February 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
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
mkdir /mnt/nas/repository mkdir /var/data mkdir /var/data/repository mount --bind /mnt/nas/repository/ /var/data/repository/
Mengubah /etc/apt/sources.list
vi /etc/apt/sources.list.untuk-var-data-repo
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
Mensharing Repo Lokal ke Komputer Lain Menggunakan Web
Install Apache
sudo apt-get install lamp-server^
Mount Repo 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 /etc/apt/sources.list perlu di ubah sesuai contoh,
Mengupdate Isi Repository
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
crontab -e
0 19 * * * /usr/local/bin/mirrorbuildall.sh
Pranala Menarik
- Linux Howto
- Contoh isi file /etc/sources.list di Ubuntu
- Repository: Contoh sources.list ke 10.150.9.87
- 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