Skip to content

Setting proxy di Linux

August 21, 2008

Karena koneksi internet di kantor membutuhkan proxy, ya jelas…buat download paket atau update-nya harus disesuaikan…yang jadi masalah, setting proxy di folder /etc/apt tidak ada.
Untuk menyelesaikan masalah ini, ada beberapa hal yang harus kita lakukan :

1. copy file “/usr/share/doc/apt/examples/apt.conf” ke folder “/etc/apt/”

command-nya :

cp /usr/share/doc/apt/examples/apt.conf /etc/apt/apt.conf

2. Rubah isi file /etc/apt/apt.conf menjadi sbb:

#########################################################

// $Id: apt.conf,v 1.43 1999/12/06 02:19:38 jgg Exp $
/* This file is a sample configuration file with a few harmless sample
options.
*/

APT
{
// Options for apt-get
Get
{
Download-Only “false”;
};

};

// Options for the downloading routines
Acquire
{
Retries “0”;
http::Proxy “http://put your proxy name or ip here:port”;;
};

// Things that effect the APT dselect method
DSelect
{
Clean “auto”; // always|auto|prompt|never
};

DPkg
{
// Probably don’t want to use force-downgrade..
Options {“–force-overwrite”;}
}

#######################################################

setelah itu, semua program yang membutuhkan proxy untuk koneksi internet-nya bisa digunakan.

CMIIW

From → Linux

One Comment
  1. vade permalink

    tambahan, tutorial diatas untuk repo keluarga debian, untuk centos :

    [main]
    cachedir=/var/cache/yum
    keepcache=1
    debuglevel=2
    logfile=/var/log/yum.log
    pkgpolicy=newest
    distroverpkg=redhat-release
    tolerant=1
    exactarch=1
    obsoletes=1
    gpgcheck=1
    plugins=1
    metadata_expire=1800
    proxy=”http://192.168.3.1:8080″ <<<<< ditambahkan ini<<<<<
    #export http_proxy
    # PUT YOUR REPOS HERE OR IN separate files named file.repo
    # in /etc/yum.repos.d

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: