Skip to main content
  1. Posts/

Configuring Perl CPAN Mirror List

·2 mins·
perl perl

CPAN mirrors adalah repositori online yang menyediakan distribusi modul Perl dari CPAN. Secara dafault, mirror yang digunakan adalah http://www.cpan.org/. Anda dapat mengubah atau menambah mirror CPAN menggunakan mirror lokal jika ada, atau bisa juga menggunakan contoh dari mirror list berikut ini.

cpan> o conf urllist
    urllist
        0 [http://208.100.0.204/pub/CPAN/]
        1 [http://203.174.85.202/pub/CPAN/]
        2 [http://208.74.123.61/pub/CPAN/]
        3 [http://102.22.80.80/pub/CPAN/]
        4 [http://138.118.173.126/pub/CPAN/]
        5 [http://184.94.196.97/pub/CPAN/]
        6 [http://103.120.66.133/pub/CPAN/]
        7 [http://184.94.196.93/pub/CPAN/]
        8 [http://103.48.119.120/pub/CPAN/]
        9 [http://201.159.169.169/pub/CPAN/]
        10 [http://103.15.48.49/pub/CPAN/]
        11 [http://103.17.8.8/pub/CPAN/]
        12 [http://27.50.85.8/pub/CPAN/]
        13 [http://184.94.196.92/pub/CPAN/]
        14 [http://103.66.86.68/pub/CPAN/]
        15 [http://103.148.15.50/pub/CPAN/]
        16 [http://103.72.162.35/pub/CPAN/]
        17 [http://184.94.196.94/pub/CPAN/]
        18 [http://185.15.22.168/pub/CPAN/]
        19 [http://103.163.139.122/pub/CPAN/]
        20 [http://178.18.193.52/pub/CPAN/]
        21 [http://208.74.123.62/pub/CPAN/]
        22 [http://103.101.161.235/pub/CPAN/]
        23 [http://103.252.152.1/pub/CPAN/]

Start the CPAN shell

Untuk mengubah atau menambahkan mirror CPAN, Anda perlu masuk ke shell menggunakan perintah berikut.

cpan

Atau bisa juga menggunakan perintah perl.

perl -MCPAN -eshell

View the local CPAN mirror list

Untuk melihat list mirror di CPAN.

cpan[1]> o conf urllist
    urllist
        0 [http://www.cpan.org/]
Type 'o conf' to view all configuration items

Add a CPAN mirror

Untuk menambahkan mirror CPAN gunakan fungsi unshift atau push. Pastikan URL mirror menyertakan skema (http,ftp).

o conf urllist push http://103.252.152.1/pub/CPAN/

Anda juga dapat menimpa list mirror yang ada dengan yang baru. Contohnya seperti berikut.

o conf urllist push http://103.252.152.1/pub/CPAN/ http://208.74.123.62/pub/CPAN/

Remove a CPAN mirror

Untuk menghapus mirror CPAN gunakan fungsi shift atau pop.

o conf urllist pop

Saving changes

Untuk menyimpan perubahan pada mirror CPAN.

o conf commit

Edit the CPAN configuration file directly

Anda dapat mengubah mirror CPAN secara langsung dengan mengadit file MyConfig.pm yang berada di folder .cpan.

nano /home/user/.cpan/CPAN/MyConfig.pm
  'urllist' => [
     q[http://103.101.161.235/pub/CPAN/],
     q[http://www.cpan.org/],
     q[http://203.174.85.202/pub/CPAN/]
   ],

Reset to the default CPAN configuration

Untuk mengembalikan konfigurasi ke dafault, jalankan perinah berikut di shell CPAN.

o conf init

Referensi:

Related

Blocking URI paths using ModSecurity
·2 mins
modsec modsec apache
Cara Mengedit DNS Zone di cPanel
·2 mins
cpanel cpanel
Implementing Firewall for VMs with IPtables
·3 mins
iptables linux iptables kvm libvirt
Configuring Networks on CentOS
·1 min
centos centos
How to Create Custom Hooks in cPanel
·3 mins
cpanel cpanel
Custom Log Format in Apache
·1 min
apache apache linux