(一)squid
安装
# yum -y install epel-release
# yum -y install squid
设置
# cp /etc/squid/squid.conf /etc/squid/squid.conf.bak
-Allow IP Address
# vi /etc/squid/squid.conf
acl localnet src 192.168.21.0/24
-Changing Squid Port(Default 3128)
# vi /etc/squid/squid.conf
http_port 5000
-Allow a Specific Port
# vi /etc/squid/squid.conf
acl Safe_ports port 5432
-Blocking Websites
# vi /etc/squid/blocked_sites
baidu.com
# vi /etc/squid/squid.conf
acl blocked_sites dstdomain "/etc/squid/blocked_sites"
http_access deny blocked_sites
-Using Basic Authentication
# yum -y install httpd-tools
# touch /etc/squid/passwd && chown squid /etc/squid/passwd
# htpasswd /etc/squid/passwd pxuser
# vi /etc/squid/squid.conf
auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/passwd
auth_param basic children 5
auth_param basic realm Squid Basic Authentication
auth_param basic credentialsttl 2 hours
acl auth_users proxy_auth REQUIRED
http_access allow auth_users
-Hide proxy
# vi /etc/squid/squid.conf
forwarded_for off
request_header_access Referer deny all
request_header_access X-Forwarded-For deny all
request_header_access Via deny all
request_header_access Cache-Control deny all
启动服务
# /etc/init.d/squid start
# squid -v
Squid Cache: Version 3.5.20
Service Name: squid
# tail -f /var/log/squid/access.log
(二)Varnish
安装
# rpm --nosignature -i https://repo.varnish-cache.org/redhat/varnish-4.0.el6.rpm
# yum install -y varnish
# varnishd -V
设置
# vi /etc/sysconfig/varnish
VARNISH_LISTEN_PORT=6081
# vi /etc/varnish/default.vcl
backend default {
.host = "127.0.0.1";
.port = "81";
}
# varnishd -C -f /etc/varnish/default.vcl
启动服务
# service varnish start
# service varnishncsa start
# service varnishlog start
确认
# varnishadm backend.list
分享到:
相关推荐
163的镜像文件CentOS6-Base-163.repo。CentOS6-Base-163.repo
Centos-6-Vault-Aliyun.repo
CentOS-7.2-x86_64-DVD-1511 CentOS-7.3-x86_64-DVD-1611 CentOS-7.4-x86_64-DVD-1708 CentOS-7.5-x86_64-DVD-1804 CentOS-7.6-aarch64-Everything-1810 CentOS-7.6-x86_64-DVD-1810 CentOS-7.7-x86_64-DVD-1908 ...
【标题】"(CentOS7镜像)CentOS-7-x86-64-Minimal-2009.rar" 提供的是一个基于Linux发行版的CentOS 7的最小化安装镜像,适用于创建虚拟机环境。这个版本特别针对系统管理员和开发者设计,包含了运行操作系统最基本...
Txt文件中包含 CentOS-6.3-i386-bin-DVD1.iso 和 CentOS-6.3-i386-bin-DVD2.iso 的官网下载地址 和百度网盘下载地址
压缩包含centos-release-scl-rh-2-3.el7.centos.noarch.rpm和centos-release-scl-2-3.el7.centos.noarch.rpm,主要用于centos7的gcc安装
centos7下centos-release-openstack-pike
# CentOS-7-x86_64-DVD-1810.iso CentOS 7.6 DVD 版 4G http://mirrors.163.com/centos/7.6.1810/isos/x86_64/CentOS-7-x86_64-DVD-1810.iso # CentOS-7-x86_64-Everything-1810.iso CentOS 7.6 Everything版 10G ...
pgdg-centos96-9.6-3.noarch postgresql的依赖包postgresql的依赖包
CentOS-6.6-x86_64-bin-DVD1.iso和CentOS-6.6-x86_64-bin-DVD2镜像文件百度云下载
内容: 1、centos 6 安装 mantisbt-1.2.8 ; 2、 centos 7 安装 mantisbt-2.12.0.zip 3、mantisbt-2.12.0.tar.gz包; 4、MySQL-5.5.59-1.el7.x86_64.rpm-bundle.tar包
标题中提到的“Centos7.6镜像文件:CentOS-7-x86_64-DVD-1810.iso”,首先需要明确几个关键词。CentOS 是一个企业级 Linux 发行版,它是基于 Red Hat Enterprise Linux (RHEL) 源代码编译而成的。CentOS 7.6 指的是 ...
centos7.6.1810---镜像包dockercentos7.6.1810---镜像包dockercentos7.6.1810---镜像包docker
CentOS-7-x86-64-DVD-2207-02.iso
CentOS-6.1-x86_64-bin-DVD1.iso CentOS-7-x86_64-bin-DVD2.iso CentOS-8.2-x86_64-bin-DVD1.iso 除DVD版还有各个minimal等版本提供高速下载 下载地址,提供了迅雷的高速下载通道,实测速度为31M/S,
CentOS-7-x86_64-Minimal-2009.iso是一个针对x86_64架构系统的CentOS 7版本的ISO镜像文件。它包含了运行CentOS操作系统所需的最基本组件和软件包,相较于完整版或桌面版,它没有预装许多额外的应用程序和图形界面,...
CentOS-6.1-x86_64-bin-DVD1.iso CentOS-7-x86_64-bin-DVD2.iso CentOS-8.2-x86_64-bin-DVD1.iso 除DVD版还有各个minimal等版本提供高速下载 下载地址,提供了迅雷的高速下载通道,实测速度为31M/S,
CentOS-7-x86-64-DVD-2009.iso
CentOS6-Mysql-5.7.28-离线安装包(含依赖安装包)CentOS6-Mysql-5.7.28-离线安装包(含依赖安装包)CentOS6-Mysql-5.7.28-离线安装包(含依赖安装包)
标题中的"CentOS-7-x86_64-Minimal-1810.iso"指的是CentOS操作系统的一个特定版本,这是一个Linux发行版,主要用于服务器和高级用户。"x86_64"表示该版本是为64位架构设计的,而"Minimal"则意味着这个安装镜像是精简...