UNIX/유닉스 공통

프록시 설정하기

99iberty 2013. 10. 22. 13:18

 

http://forums.fedoraforum.org/showthread.php?t=742

 

~/.bashrc 나 /etc/profile 파일에 다음과 같이 입력.

 

 

export http_proxy="http://프록시서버:포트"
export ftp_proxy="http://프록시서버:포트"

 

하고 쉘 재시작 (재접속)

 

혹은 wget에서만 쓸거면

/etc/wgetrc 파일 수정

 

# Many sites are behind firewalls that do not allow initiation of
# connections from the outside. on these sites you have to use the
# `passive' feature of FTP. If you are behind such a firewall, you
# can turn this on to make Wget use passive FTP by default.
passive_ftp = on

# 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://host:port/
ftp_proxy = http://host:port/

 

 

아래와 같이 여러 프록시 설정 가능.

#proxy.sh
export http_proxy=http://host.com:port/
export ftp_proxy=http://host.com:port/
export no_proxy=.domain.com
export HTTP_PROXY=http://host.com:port/
export FTP_PROXY=http://host.com:port/

#proxy.csh
setenv http_proxy http://host.com:port/
setenv ftp_proxy http://host.com:port/
setenv no_proxy .domain.com
setenv HTTP_PROXY http://host.com:port/
setenv FTP_PROXY http://host.com:port/

 

 

sh 파일 만드는 건 다음 참조

http://blog.acsystem.sk/linux/redhat-rhel-6-system-wide-proxy-settings