Proxy APT-GET

Untuk memasang aplikasi di Ubuntu saya biasanya menggunakan perintah apt-get install. Dengan perintah ini Ubuntu akan mengambil berkas sumber aplikasi dari repositori online. Sering kali saat berada di kantor saya tidak bisa menggunakan perintah tadi, misalnya seperti contoh tampilan di bawah ini :

ttirtawi@ubuntu1404:~$ sudo apt-get install meld
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following extra packages will be installed:
  libgtksourceview2.0-0 libgtksourceview2.0-common python-glade2 python-gtksourceview2
Suggested packages:
  python-gtk2-doc libgtksourceview2.0-dev
The following NEW packages will be installed:
  libgtksourceview2.0-0 libgtksourceview2.0-common meld python-glade2 python-gtksourceview2
0 upgraded, 5 newly installed, 0 to remove and 320 not upgraded.
Need to get 1.017 kB of archives.
After this operation, 7.572 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
0% [Connecting to id.archive.ubuntu.com (2001:67c:1360:8c01::18)]
^C
ttirtawi@ubuntu1404:~$

Perintah apt-get install tadi berhenti begitu saja karena apt-get tidak bisa mengakses repositori id.archive.ubuntu.com. Hal tersebut terjadi karena di kantor tempat saya bekerja, akses Internet harus melalui proxy server. Solusi yang saya temukan dari Google adalah dengan mengatur apt-get supaya menggunakan proxy juga. Pengaturan proxy untuk apt-get dilakukan dengan membuat berkas konfigurasi seperti berikut ini :

ttirtawi@ubuntu1404:~$ sudo vi /etc/apt/apt.conf.d/10proxy
Acquire::http::Proxy "http://proxy.contoh.com";

ttirtawi@ubuntu1404:~$

Nama proxy server pada contoh di atas hanya sekadar contoh, aslinya saya menggunakan alamat proxy server kantor saya. Setelah menambahkan berkas tadi saya langsung bisa menjalankan perintah apt-get untuk menginstal paket dari repositori online.

ttirtawi@ubuntu1404:~$ sudo apt-get install meld
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following extra packages will be installed:
  libgtksourceview2.0-0 libgtksourceview2.0-common python-glade2 python-gtksourceview2
Suggested packages:
  python-gtk2-doc libgtksourceview2.0-dev
The following NEW packages will be installed:
  libgtksourceview2.0-0 libgtksourceview2.0-common meld python-glade2 python-gtksourceview2
0 upgraded, 5 newly installed, 0 to remove and 320 not upgraded.
Need to get 1.017 kB of archives.
After this operation, 7.572 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://id.archive.ubuntu.com/ubuntu/ trusty/universe libgtksourceview2.0-common all 2.10.5-1ubuntu2 [434 kB]
Get:2 http://id.archive.ubuntu.com/ubuntu/ trusty/universe libgtksourceview2.0-0 i386 2.10.5-1ubuntu2 [142 kB]                                                                                                                               
Get:3 http://id.archive.ubuntu.com/ubuntu/ trusty/main python-glade2 i386 2.24.0-3ubuntu3 [8.328 B]                                                                                                                                          
Get:4 http://id.archive.ubuntu.com/ubuntu/ trusty/universe meld all 1.8.4-1 [342 kB]                                                                                                                                                         
Get:5 http://id.archive.ubuntu.com/ubuntu/ trusty/universe python-gtksourceview2 i386 2.10.1-2build1 [90,2 kB]                                                                                                                               
Fetched 1.017 kB in 18s (55,7 kB/s)                                                                                                                                                                                                          
Selecting previously unselected package libgtksourceview2.0-common.
(Reading database ... 174967 files and directories currently installed.)
Preparing to unpack .../libgtksourceview2.0-common_2.10.5-1ubuntu2_all.deb ...
Unpacking libgtksourceview2.0-common (2.10.5-1ubuntu2) ...
Selecting previously unselected package libgtksourceview2.0-0.
Preparing to unpack .../libgtksourceview2.0-0_2.10.5-1ubuntu2_i386.deb ...
Unpacking libgtksourceview2.0-0 (2.10.5-1ubuntu2) ...
Selecting previously unselected package python-glade2.
Preparing to unpack .../python-glade2_2.24.0-3ubuntu3_i386.deb ...
Unpacking python-glade2 (2.24.0-3ubuntu3) ...
Selecting previously unselected package meld.
Preparing to unpack .../archives/meld_1.8.4-1_all.deb ...
Unpacking meld (1.8.4-1) ...
Selecting previously unselected package python-gtksourceview2.
Preparing to unpack .../python-gtksourceview2_2.10.1-2build1_i386.deb ...
Unpacking python-gtksourceview2 (2.10.1-2build1) ...
Processing triggers for man-db (2.6.7.1-1) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for shared-mime-info (1.2-0ubuntu3) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.54ubuntu1) ...
Setting up libgtksourceview2.0-common (2.10.5-1ubuntu2) ...
Setting up libgtksourceview2.0-0 (2.10.5-1ubuntu2) ...
Setting up python-glade2 (2.24.0-3ubuntu3) ...
Setting up meld (1.8.4-1) ...
Setting up python-gtksourceview2 (2.10.1-2build1) ...
Processing triggers for libc-bin (2.19-0ubuntu6) ...
ttirtawi@ubuntu1404:~$ 

Contoh di atas saya sedang perlu memasang aplikasi “Meld”, aplikasi ini berguna untuk membandingkan 2 buah teks dalam format berdampingan. Ini tampilan Meld saat sedang digunakan :

meld-diff-viewer

Leave a Reply