1、安装squid
2、备份配置文件
cp /etc/squid/squid.conf /etc/squid/squid.conf.bak
3、编辑配置文件
4、允许所有用户使用代理
修改:http_accessdeny all为:http_access allow all
5、设置squid代理IP和端口
修改:http_port3128为:http_port xxx.xxx.xxx.xxx:3128
注:xxx.xxx.xxx.xxx为本机ip地址
6、检查配置参数是否有错
7、初始化缓存
8、启动服务
9、查看端口是否打开
netstat –ntpl|grep squid
10、安装htpassword
yum -y install httpd-tools
11、利用htpassword命令添加用户
htpasswd -bc htpasswd.user admin 123456
