1. 检 查squid 软件包安装其情况
rpm -qa|grep squid
2. 如果未安装,则使用 yum 方式安装
yum -y install squid
3. 设置服务开机自启动
chkconfig --level 35 squid on
4. 编辑 squid 的主配置文件 /etc/squid/squid.conf
http_port 3128
cache_mem 64 MB
maximum_object_size 4 MB
cache_dir ufs /var/spool/squid 100 16 256
access_log /var/log/squid/access.log
acl localnet src 10.0.0.0/8
http_access allow localnet
http_access deny all
visible_hostname squid.taotie.dev
cache_mgr admin@test.com
5. 初始化 squid
squid –z
6. 启动 Squid
/etc/init.d/squid start
7.在不能上网的设备上添加代理配置:
vi /etc/profile,添加:
http_proxy=http://1.1.1.1:1080
https_proxy=https://1.1.1.1:1080
重启环境变量:
source /etc/profile