SSブログ

Linux/Windows Proxy 越えまとめ [開発環境]

Linuxの場合

bash

  ~/.profile

    export http_proxy=http://proxy.example.com:PORT/

    export https_proxy=http://proxy.example.com:PORT/

apt-get

  /etc/apt/apt.conf

    Acquire::ftp::proxy "ftp://proxy.example.com:PORT/";
    Acquire::http::proxy "http://proxy.example.com:PORT/";
    Acquire::https::proxy "https://proxy.example.com:PORT/";

yum

  /etc/yum.conf/.    proxy=http://proxy.example.com:PORT

wget

  /etc/wgetrc

    http_proxy=http://proxy.example.com:PORT

gem

  コマンド

    gem install rails --http-proxy http://proxy.example.com:PORT

git

  ① Corkscrewのインストール

  ② 設定ファイル(git-proxy)の作成

#!/bin/bash

CORKSCREW=`which corkscrew`
$CORKSCREW 192.168.111.15 8080 $1 $2

  ③ 設定ファイルの属性変更とインストール

# chmod 755 git-proxy
# mv git-proxy /usr/local/bin/

  ④ 起動設定

# vi /etc/profile
—————————————-
//最終行に以下を追加

# git-proxy
export GIT_PROXY_COMMAND=/usr/local/bin/git-proxy

参考 http://nowsky.dip.jp/digiloog/2010/07/article_188/

 

Windowsの場合

  コマンド

    > C:\Windows\system32>netsh winhttp set proxy proxy-server="http=proxy.example.com:PORT"

    または

    > set HTTP_PROXY=proxy.example.com:PORT


この広告は前回の更新から一定期間経過したブログに表示されています。更新すると自動で解除されます。