wget でプロキシを使用する場合の設定

プロキシ経由でwgetを使用する場合には、そのための設定をする必要があります。
yumの場合と同じ要領です。
ファイル /etc/wgetrc に、http_proxy, ftp_proxy, proxy_user, proxy_passwd を追加するなどの設定を行います。ただし、パスワードが裸の状態ですので、しかるべきパーミッション設定も実施することをお奨めします。

[root ~]# vim /etc/wgetrc
(略)
# You can set the default proxies for Wget to use for http and ftp.
# They will override the value in the environment.
http_proxy = http://プロキシサーバ:ポート ←追加
ftp_proxy = http://プロキシサーバ:ポート ←追加
proxy_user=プロキシユーザ ←追加
proxy_passwd=プロキシユーザ・パスワード ←追加

# If you do not want to use proxy at all, set this to off.
use_proxy = on ←有効にする(アンコメント)
(略)

Comments are closed.