正向代理服务器 squid

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

 

转载于:https://www.cnblogs.com/xiatian09/p/10120928.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值