LoginSignup
23
30

More than 5 years have passed since last update.

CentOS7 PROXY設定いろいろ(逐次追加)

Last updated at Posted at 2015-06-17

Proxyに阻まれる都度メモしていきます。
proxyのアドレスはhttp://proxy.yourhost:8080としています。ユーザー名、パスワードが必要なときはhttp://username:password@proxy.yourhost:8080としてください。

yum

/etc/yum.conf
proxy=http://proxy.yourhost:8080
proxy_username=user
proxy_password=pass

apt-get

updateのときに、キャッシュ使わないようにNo-Cache設定したほうが良いらしい。

/etc/apt/apt.conf
Acquire::http::proxy "http://proxy.yourhost:8080/";
Acquire::https::proxy "http://proxy.yourhost:8080/";
Acquire::http::No-Cache "true";
Acquire::https::No-Cache "true";

curl

curl -x http://proxy.yourhost:8080 -L http://targeturl

設定ファイルを作成する場合

.curlrc
proxy = http://proxy.yourhost.8080/

npm

npm config set proxy http://proxy.yourhost:8080
npm config set https-http://proxy proxy.yourhost:8080

sudo npm install -g hogehogeをするときは-g でproxyを設定する

npm config -g proxy http://proxy.yourhost:8080
npm config -g https-proxy http://proxy proxy.yourhost:8080

cf

export HTTP_PROXY=http://proxy.yourhost:8080

git

git config --global http.proxy http://proxy.yourhost:8080

ruby gem

環境変数を使う

export HTTP_PROXY=http://proxy.yourhost:8080

またはパラメータ-pを使用する

gem install pkgs -p http://proxy.yourhost:8080

python pip

パラメータ--proxyを使用する。

pip --proxy=http://proxy.yourhost:8080
23
30
0

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
23
30