현재 사용자에게만 적용하려면 ~/.bash_profile 또는 ~/.bashrc, 모든 사용자에게 적용하려면 /etc/profile 을 연다.
vi ~/.bash_profile
sudo vi /etc/profile
파일 끝에 아래를 넣는다.
export http_proxy=http://111.112.113.114
export https_proxy=https://111.112.113.114:8443
export no_proxy=".haedong.net,localhost,127.0.0.1/8,192.168.0.0/16,.local"
[haedong@haedong:~]$ sudo yum install libproxy
Loaded plugins: fastestmirror
--- Package libproxy.x86_64 0:0.4.11-11.el7 will be installed
Dependencies Resolved
===============================================================================================================
Package Arch Version Repository Size
===============================================================================================================
Installing:
libproxy x86_64 0.4.11-11.el7 centos 64 k
Installing for dependencies:
libmodman x86_64 2.0.1-8.el7 centos 28 k
Transaction Summary
===============================================================================================================
Install 1 Package (+1 Dependent package)
...중략...
Transaction test succeeded
Running transaction
Installing : libmodman-2.0.1-8.el7.x86_64 1/2
Installing : libproxy-0.4.11-11.el7.x86_64 2/2
Verifying : libmodman-2.0.1-8.el7.x86_64 1/2
Verifying : libproxy-0.4.11-11.el7.x86_64 2/2
Installed:
libproxy.x86_64 0:0.4.11-11.el7
Dependency Installed:
libmodman.x86_64 0:2.0.1-8.el7
Complete!