IPTEKNux: Ubah file /etc/apt/sources.list

From OnnoWiki
Jump to navigation Jump to search

Ubah sources.list

Kadangkala kita perlu mengubah isi sources.list agar menggunakan repository lokal di harddisk & jaringan yang kita managed. Ubah file sources.list dalam lingkungan chroot

cp /etc/apt/sources.list /etc/apt/sources.list.original
vi /etc/apt/sources.list

Isi agar menggunakan repository lokal di hardisk USB & jaringan dari mesin http://dl2.foss-id.web.id, misalnya,

deb http://192.168.0.1/ubuntu/ lucid main multiverse restricted universe
deb http://192.168.0.1/ubuntu/ lucid-updates main multiverse restricted universe
deb http://192.168.0.1/ubuntu/ lucid-security main multiverse restricted universe
deb http://192.168.0.1/ubuntu/ lucid-backports main multiverse restricted universe
deb http://192.168.0.1/ubuntu/ lucid-proposed main multiverse restricted universe

untuk versi 10.10 misalnya

deb http://192.168.0.3/ubuntu-10.10/ maverick main multiverse restricted universe
deb http://192.168.0.3/ubuntu-10.10/ maverick-updates main multiverse restricted universe
deb http://192.168.0.3/ubuntu-10.10/ maverick-security main multiverse restricted universe
deb http://192.168.0.3/ubuntu-10.10/ maverick-backports main multiverse restricted universe
deb http://192.168.0.3/ubuntu-10.10/ maverick-proposed main multiverse restricted universe


Sebaiknya buat beberapa contoh isi file /etc/apt/sources.list untuk memudahkan pengguna distro di kemudian hari

/etc/apt/sources.list.untuk-web-ke-mesin-01

vi /etc/apt/sources.list.untuk-web-ke-mesin-01
deb http://192.168.0.1/ubuntu/ lucid main multiverse restricted universe
deb http://192.168.0.1/ubuntu/ lucid-updates main multiverse restricted universe
deb http://192.168.0.1/ubuntu/ lucid-security main multiverse restricted universe
deb http://192.168.0.1/ubuntu/ lucid-backports main multiverse restricted universe
deb http://192.168.0.1/ubuntu/ lucid-proposed main multiverse restricted universe

deb http://192.168.0.1/ubuntu/ maverick main multiverse restricted universe
deb http://192.168.0.1/ubuntu/ maverick-updates main multiverse restricted universe
deb http://192.168.0.1/ubuntu/ maverick-security main multiverse restricted universe
deb http://192.168.0.1/ubuntu/ maverick-backports main multiverse restricted universe
deb http://192.168.0.1/ubuntu/ maverick-proposed main multiverse restricted universe

/etc/apt/sources.list.untuk-ftp-ke-mesin-01

vi /etc/apt/sources.list.untuk-ftp-ke-mesin-01
deb ftp://192.168.0.1/pub/repo-10.04/ lucid main multiverse restricted universe
deb ftp://192.168.0.1/pub/repo-10.04/ lucid-updates main multiverse restricted universe
deb ftp://192.168.0.1/pub/repo-10.04/ lucid-security main multiverse restricted universe
deb ftp://192.168.0.1/pub/repo-10.04/ lucid-backports main multiverse restricted universe
deb ftp://192.168.0.1/pub/repo-10.04/ lucid-proposed main multiverse restricted universe

deb ftp://192.168.0.1/pub/repo-10.10/ maverick main multiverse restricted universe
deb ftp://192.168.0.1/pub/repo-10.10/ maverick-updates main multiverse restricted universe
deb ftp://192.168.0.1/pub/repo-10.10/ maverick-security main multiverse restricted universe
deb ftp://192.168.0.1/pub/repo-10.10/ maverick-backports main multiverse restricted universe
deb ftp://192.168.0.1/pub/repo-10.10/ maverick-proposed main multiverse restricted universe

/etc/apt/sources.list.untuk-ke-usb-harddisk

vi /etc/apt/sources.list.untuk-ke-usb-harddisk
deb file:///media/usbharddisk/repo-10.04/ lucid main multiverse restricted universe
deb file:///media/usbharddisk/repo-10.04/ lucid-updates main multiverse restricted universe
deb file:///media/usbharddisk/repo-10.04/ lucid-security main multiverse restricted universe
deb file:///media/usbharddisk/repo-10.04/ lucid-backports main multiverse restricted universe
deb file:///media/usbharddisk/repo-10.04/ lucid-proposed main multiverse restricted universe

deb file:///media/usbharddisk/repo-10.10/ maverick main multiverse restricted universe
deb file:///media/usbharddisk/repo-10.10/ maverick-updates main multiverse restricted universe
deb file:///media/usbharddisk/repo-10.10/ maverick-security main multiverse restricted universe
deb file:///media/usbharddisk/repo-10.10/ maverick-backports main multiverse restricted universe
deb file:///media/usbharddisk/repo-10.10/ maverick-proposed main multiverse restricted universe

/etc/apt/sources.list.untuk-var-data-repo

vi /etc/apt/sources.list.untuk-var-data-repo
deb file:///var/data/repo-10.04/ lucid main multiverse restricted universe
deb file:///var/data/repo-10.04/ lucid-updates main multiverse restricted universe
deb file:///var/data/repo-10.04/ lucid-security main multiverse restricted universe
deb file:///var/data/repo-10.04/ lucid-backports main multiverse restricted universe
deb file:///var/data/repo-10.04/ lucid-proposed main multiverse restricted universe

deb file:///var/data/repo-10.10/ maverick main multiverse restricted universe
deb file:///var/data/repo-10.10/ maverick-updates main multiverse restricted universe
deb file:///var/data/repo-10.10/ maverick-security main multiverse restricted universe
deb file:///var/data/repo-10.10/ maverick-backports main multiverse restricted universe
deb file:///var/data/repo-10.10/ maverick-proposed main multiverse restricted universe

Update repository

# apt-get update


Pranala Menarik