1
3

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.

CentOSのプロキシ経由接続の設定 (コピペ用)

Last updated at Posted at 2016-11-07

自分のメモ用
いちいち設定するのが面倒くさい人用

cat <<__EOT__ | sudo tee -a /etc/profile.d/proxy.sh
PROXY_IP=proxy_ip
PROXY_PORT=proxy_port

export PROXY=\$PROXY_IP:\$PROXY_PORT
export http_proxy=\$PROXY
export HTTP_PROXY=\$PROXY
export https_proxy=\$PROXY
export HTTPS_PROXY=\$PROXY
__EOT__

#上のやつながしてリログして↓のやつ流す

echo "proxy=http://$PROXY" | sudo tee -a /etc/yum.conf
echo "https_proxy=http://$PROXY" | sudo tee -a /etc/wgetrc
echo "http_proxy=http://$PROXY" | sudo tee -a /etc/wgetrc
echo "ftp_proxy=http://$PROXY" | sudo tee -a /etc/wgetrc

全部コピペでyumとwgetのproxy設定完了

1
3
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
1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?