106
120

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

プロキシ設定まとめ

Last updated at Posted at 2015-01-05

###yum

設定ファイルに追記

vi /etc/yum.conf
+ proxy=http://proxy_ip:port_num/ # 追記

###apt-get
設定ファイルを作成する。

vi /etc/apt/apt.conf
+ Acquire::http::Proxy "http://proxy_ip:port_num/";
+ Acquire::https::Proxy "http://proxy_ip:port_num/";
+ Acquire::ftp::Proxy "http://proxy_ip:port_num/";

###wget

設定ファイルに追記

vi /etc/wgetrc
+ https_proxy=http://proxy_ip:port_num/ # 追記
+ http_proxy=http://proxy_ip:port_num/ # 追記
+ ftp_proxy=http://proxy_ip:port_num/ # 追記

###curl

curl -x http://proxy_ip:port_num ftp://ftp.aa.bbb

または

vi ~/.curlrc
+ proxy = "http://proxy_ip:port_num"

###rpm

rpmコマンド実行時にコマンドオプションでhttpproxyとhttpportを指定する。

rpm --httpproxy proxy_ip --httpport port_num

###git

git config --global http.proxy http://proxy_ip:port_num/

または下記の内容を.gitconfigに追加する。

+ [http]
+   proxy=http://proxy_ip:port_num/

###npm

npm -g config set proxy http://proxy_ip:port_num
npm -g config set https-proxy http://proxy_ip:port_num

###bundle

set HTTP_PROXY=http://proxy_ip:port_num

###gem

gem install aaa --http-proxy http://proxy_ip:port_num

###pear,pecl

pear config-set http_proxy http://proxy_ip:port_num

###docker

ubuntuの場合

vi /etc/default/docker
+ export http_proxy=http://proxy_ip:port_num

CentOSはココとか。

106
120
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
106
120

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?