惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Security @ Cisco Blogs
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Tenable Blog
C
CERT Recently Published Vulnerability Notes
T
Threatpost
C
Cisco Blogs
Know Your Adversary
Know Your Adversary
T
Tor Project blog
博客园 - 司徒正美
有赞技术团队
有赞技术团队
T
Tailwind CSS Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
宝玉的分享
宝玉的分享
博客园 - 三生石上(FineUI控件)
L
LangChain Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Stack Overflow Blog
Stack Overflow Blog
Microsoft Security Blog
Microsoft Security Blog
AWS News Blog
AWS News Blog
人人都是产品经理
人人都是产品经理
P
Proofpoint News Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
A
Arctic Wolf
L
LINUX DO - 热门话题
C
Cyber Attacks, Cyber Crime and Cyber Security
爱范儿
爱范儿
美团技术团队
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Privacy International News Feed
PCI Perspectives
PCI Perspectives
H
Heimdal Security Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
F
Full Disclosure
SecWiki News
SecWiki News
T
The Blog of Author Tim Ferriss
Help Net Security
Help Net Security
Google DeepMind News
Google DeepMind News
P
Palo Alto Networks Blog
博客园 - 叶小钗
C
Check Point Blog
Scott Helme
Scott Helme
V
Visual Studio Blog
博客园 - 聂微东
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Google Online Security Blog
Google Online Security Blog
大猫的无限游戏
大猫的无限游戏
The Register - Security
The Register - Security

博客园 - linwinfan

ZABBIX新功能系列2-通过Webhook调用虚拟化API重启故障主机 ZABBIX新功能系列1-使用Webhook将告警主动推送至第三方系统 xenserver添加静态路由 redmine常见问题 Opennms 问题整理 OpenERP 使用与开发笔记(一) KEEPALIVED 双机自动切换部署备忘 使用flume-ng聚合双活Nginx日志 迁移 VMware 虚拟机到 KVM iscsiadm基本用法 第4章.计算节点 第三章.可扩展性 第二章 云控制器设计 OpenStack实施管理手册-第一章 部署准备 VMware workstation to exsi openQRM在CENTOS64上的安装部署 在服务器上排除问题的头五分钟(转) u960s指令 某程序反向工程记录
安装设置squid3代理更新
linwinfan · 2013-05-07 · via 博客园 - linwinfan

经常安装Openstack , 避免不了多次安装系统,多次apt-get update 更新软件,有条件的用户会自己创建一个ubuntu的源,以免每次连处网更新耗费时间。

因为一些原因,我们的测试机房的机器无法直接上网,于是我就想到用自己可以上网的机器搭个代理,供服务器们上网更新软件。

同时基于 squid强大的cache功能,可以把软件缓存在磁盘上,其它机器或者本机下次更新相同软件时,就免去了再下载之苦。

开始干活:

apt-get install squid3

mv /etc/squid3/squid.conf /etc/squid3/squid.conf_bak
 
vi /etc/squid3/squid.conf

  http_port 3128

  http_access allow all

cache_mem 256 MB
maximum_object_size_in_memory 2 MB
memory_replacement_policy lru
cache_dir ufs /usr/local/squid/var/cache 5120 16 256
max_open_disk_fds 0
minimum_object_size 0 KB
maximum_object_size 100 MB
cache_effective_user squid

创建squid用户(关键):

useradd squid
chown -R /usr/local/squid
chown -R /var/log/squid3

创建cache 目录

squid3 -z

service squid3 restart

然后在要更新的服务器上设置代理服务器地址即可。

vi /etc/apt/apt.conf

Acquire::http::Proxy "http://user:password@192.168.10.88:3128/";

这样,即可以在本地源更新软件,又不必镜像ubuntu源,占用几十G 空间. 还可以随时保持源的更新。