服务器
1. 安装squid
yum install -y squid
2. 修改配置文件
vim /etc/squid/squid.conf
acl localnet src 10.xx.xx.xx/8 # 限定网络
acl server_01 10.1.2.10 # 限定客户端主机
http_port 10.1.2.3:3128 # 限定监听内网地址
客户端
1. yum代理:
vim /etc/yum.conf,加入:
proxy=http://10.1.2.3:3128/
2. wget代理:
vim /etc/wgetrc,加入:
http_proxy=http://10.1.2.3:3128/
ftp_proxy=http://10.1.2.3:3128/
3. 环境变量
vim /etc/profile,加入:
http_proxy=http://10.1.2.3:3128/
ftp_proxy=http://10.1.2.3:3128/
export http_proxy
export ftp_proxy
export ftp_proxy