tinyproxy 代理服务器

本文详细介绍如何在CentOS上使用TinyProxy搭建代理服务器,并通过具体步骤指导如何配置内网机器使用该代理进行YUM包更新。适用于希望了解TinyProxy基本配置及使用的读者。

CentOS 搭建 TinyProxy 代理

TinyProxy 和 Squid 都是比较优秀的代理软件

TinyProxy比较小众,虽然没有Squid的功能丰富,但是小巧简单,也能满足普通用户的需求。

Squid 是一款优秀的代理软件,有很丰富的ACL管理功能,虽然squid很强大,但配置比较繁琐。

有以下机器节点:
ssy-01 (有公网)

ssy-02(仅内网)

1.安装epel源(ssy-01)

yum -y install epel-release

2.安装TinyProxy

yum -y install tinyproxy

3.配置服务

vim /etc/tinyproxy/tinyproxy.conf
插入一行配置:
Allow 172.16.0.0/16

备注:172.16.0.0/16 为内网网段

4.启动服务

centos 6
service tinyproxy start
--------------------------------------
centos 7
systemctl start tinyproxy.service 
--------------------------------------
更多命令如下:
systemctl restart tinyproxy.service 
systemctl stop tinyproxy.service 
systemctl status tinyproxy.service 
systemctl enable tinyproxy.service 

5.配置ssy-02

在ssy-02的/etc/yum.conf添加配

vim /etc/yum.conf
proxy=http://172.16.100.100:8888

6.验证yum

转载于:https://www.cnblogs.com/gaoguangjun/p/8572784.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值