Repo / Mirror Debian 9 Stretch (CDN + Cloud)

Bagi yang baru instal distro linux debian 9 “Stretch” pasti akan mencari mirror penyedia repository yang handal koneksi internetnya (cepat dan stabil). Itu permasalahan klasik, tapi tahukah kamu kalau teknologi internet sudah sangat berkembang dan sekarang sudah ada yang namanya CDN. Dengan CDN kamu tidak perlu lagi mencari mirror terdekat, CDN ini yang nanti otomatis mencarikannya.

Mirror repository debian 9 “Stretch” berikut memakai teknologi CDN dan Cloud Fastly / Amazon (AWS) sehingga kehandalannya pasti terjamin.

$ sudo vim /etc/apt/sources.list

deb https://deb.debian.org/debian stretch main contrib non-free
deb https://deb.debian.org/debian stretch-updates main contrib non-free
deb https://deb.debian.org/debian-security stretch/updates main contrib non-free

deb https://deb.debian.org/debian stretch-backports main contrib non-free

Contoh hasilnya:

$ sudo apt update && apt list --upgradable
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://packages.microsoft.com/repos/vscode stable InRelease
Hit:3 http://dl.google.com/linux/chrome/deb stable Release
Get:5 https://deb.nodesource.com/node_8.x stretch InRelease [4,647 B]
Hit:7 https://deb.opera.com/opera-stable stable InRelease
Ign:6 https://cdn-aws.deb.debian.org/debian stretch InRelease
Get:8 https://cdn-aws.deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Hit:11 https://download.sublimetext.com apt/stable/ InRelease
Get:9 https://cdn-aws.deb.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Get:10 https://cdn-aws.deb.debian.org/debian stretch-backports InRelease [91.8 kB]
Get:12 https://cdn-aws.deb.debian.org/debian stretch Release [118 kB]
Get:13 https://cdn-aws.deb.debian.org/debian stretch-updates/main amd64 Packages [7,748 B]
Get:14 https://cdn-aws.deb.debian.org/debian stretch-updates/main Translation-en [6,346 B]
Get:15 https://cdn-aws.deb.debian.org/debian-security stretch/updates/main amd64 Packages [475 kB]
Get:16 https://cdn-aws.deb.debian.org/debian-security stretch/updates/main Translation-en [210 kB]
Get:17 https://cdn-aws.deb.debian.org/debian-security stretch/updates/contrib amd64 Packages [1,764 B]
Get:18 https://cdn-aws.deb.debian.org/debian-security stretch/updates/contrib Translation-en [1,759 B]
Get:19 https://cdn-aws.deb.debian.org/debian-security stretch/updates/non-free amd64 Packages [1,600 B]
Get:20 https://cdn-aws.deb.debian.org/debian-security stretch/updates/non-free Translation-en [691 B]
Get:21 https://cdn-aws.deb.debian.org/debian stretch Release.gpg [2,434 B]
Get:22 https://cdn-aws.deb.debian.org/debian stretch/main amd64 Packages [7,090 kB]
Get:23 https://cdn-aws.deb.debian.org/debian stretch/main Translation-en [5,388 kB]
Get:24 https://cdn-aws.deb.debian.org/debian stretch/contrib amd64 Packages [50.9 kB]
Get:25 https://cdn-aws.deb.debian.org/debian stretch/contrib Translation-en [45.9 kB]
Get:26 https://cdn-aws.deb.debian.org/debian stretch/non-free amd64 Packages [78.6 kB]
Get:27 https://cdn-aws.deb.debian.org/debian stretch/non-free Translation-en [80.4 kB]
Fetched 13.8 MB in 37s (378 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Listing... Done

Perlu diketahui, vim diatas adalah nama text editor, kamu bisa menggantinya dengan text editor favoritmu (misal nano, ed, emacs, vscode, dll), akan tetapi bagi yang ingin mendalami linux maka dianjurkan untuk belajar menggunakan vim hal ini dikarenakan disetiap distro linux yang ada dimuka bumi ini hampir dipastikan menyertakan vim, dan disamping itu vim adalah text editor yang sangat powerful dengan berbagai fitur yang sangat lengkap).

Diatas saya juga menyertakan repo backports, repo ini menyertakan beberapa package dengan versi yang lebih baru yang biasanya hanya bisa ditemukan direpo testing / unstable akan tetapi di-compile ulang oleh pengembang debian untuk repo stable. Contoh penggunaannya

$ apt policy lintian
lintian:
  Installed: 2.5.50.4 500
  Candidate: 2.6.0~bpo9+1
  Version table:
     2.6.0~bpo9+1 502
        502 https://deb.debian.org/debian stretch-backports/main amd64 Packages
        100 /var/lib/dpkg/status
 *** 2.5.50.4 500
        500 https://deb.debian.org/debian stretch/main amd64 Packages

$ sudo apt install -t stretch-backports lintian

Atau dengan menjadikan repo backports sebagai prioritas sehingga kita akan mendapatkan beberapa package yang lebih up to date tanpa takut dependency hell.

  1. Buat file preferences

    $ sudo vim /etc/apt/preferences
  2. Isi dengan berikut ini, kemudian simpan

    Package: *
    Pin:  release a=stretch-backports
    Pin-Priority:  502
    
    Package: *
    Pin:  release a=stretch
    Pin-Priority:  500
  3. Jalankan perintah update dan upgrade seperti bisa tanpa perlu opsi -t

    $ sudo apt update && apt list --upgradable
    $ sudo apt upgrade

Semoga artikel ini bermanfaat positif bagi kita semua, mohon maaf bila ada yang kurang / salah kata. Feedback positif nya kita tunggu. Alhamdulillah & Wassalamu’alaikum.

Source: deb.debian.org

Keywords: linux, mirror, repository, CDN, cloud, fastly, aws, debian 9 stretch.

Komentar

Postingan populer dari blog ini

Cara Instal Driver Printer/Scanner Epson L360 di Linux Debian 9 Stretch