OS/Linux

Centos Proxy 설정

아르비스 2017. 4. 12. 14:09

CentOS 에서 proxy 설정하기

1. shell 에 proxy 설정

#vi /etc/profile

proxy=http://[IP]:[PORT]


HTTP_PROXY=$proxy

HTTPS_PROXY=$proxy

FTP_PROXY=$proxy

http_proxy=$proxy

https_proxy=$proxy

ftp_proxy=$proxy

export HTTP_PROXY HTTPS_PROXY FTP_PROXY http_proxy https_proxy ftp_proxy

 



2. yum 에 proxy 설정

#vi /etc/yum.conf


proxy=http://your.proxy.server:8080


$ yum clean all


3. for wget

# vi /etc/wgetrc

# add to the end

http_proxy = http://your.proxy.server:8080

https_proxy = http://your.proxy.server:8080

ftp_proxy = http://your.proxy.server:8080



위의 경우도 진행이 안된다면.

#vi /etc/enviroment

export http_proxy=http://your.proxy.server:8080

export https_proxy=http://your.proxy.server:8080

export ftp_proxy=http://your.proxy.server:8080


#source /etc/enviroment

계정에서도 ~/.bashrc 에 같은 내용을 추가해줘서 확인해본다.