前言
Varnish是一个高效的代理服务器,可以进行网站缓存,CDN中常使用它来进行网站加速。
概要
安装
下载并安装 varnish 的 repo
代码语言:javascript复制[root@h101 varnish]# wget https://repo.varnish-cache.org/redhat/varnish-4.0.el6.rpm
--2015-08-19 22:11:24-- https://repo.varnish-cache.org/redhat/varnish-4.0.el6.rpm
Resolving repo.varnish-cache.org... 194.31.39.155
Connecting to repo.varnish-cache.org|194.31.39.155|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7132 (7.0K) [application/x-redhat-package-manager]
Saving to: “varnish-4.0.el6.rpm”
100%[==========================================================================================>] 7,132 --.-K/s in 0s
2015-08-19 22:11:28 (242 MB/s) - “varnish-4.0.el6.rpm” saved [7132/7132]
[root@h101 varnish]# ls
varnish-4.0.el6.rpm
[root@h101 varnish]# rpm -ivh varnish-4.0.el6.rpm
warning: varnish-4.0.el6.rpm: Header V4 RSA/SHA1 Signature, key ID 8f2d409f: NOKEY
Preparing... ########################################### [100%]
1:varnish-release ########################################### [100%]
[root@h101 varnish]# rpm -qa | grep varnish
varnish-release-4.0-3.el6.noarch
[root@h101 varnish]# rpm -ql varnish-release-4.0-3.el6.noarch
/etc/pki/rpm-gpg/RPM-GPG-KEY-VARNISH
/etc/pki/rpm-gpg/RPM-GPG-KEY-VARNISH-SOFTWARE
/etc/yum.repos.d/varnish.repo
[root@h101 varnish]# yum list all | grep varnish
Repository base is listed more than once in the configuration
http://mirror01.idc.hinet.net/EPEL/6/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel
Trying other mirror.
varnish-release.noarch 4.0-3.el6 installed
varnish.x86_64 4.0.3-1.el6 varnish-4.0
varnish-agent.x86_64 4.0.1-1.el6 varnish-4.0
varnish-agent-debuginfo.x86_64 4.0.1-1.el6 varnish-4.0
varnish-debuginfo.x86_64 4.0.3-1.el6 varnish-4.0
varnish-docs.x86_64 4.0.3-1.el6 varnish-4.0
varnish-libs.i686 2.1.5-5.el6 epel
varnish-libs.x86_64 4.0.3-1.el6 varnish-4.0
varnish-libs-devel.i686 2.1.5-5.el6 epel
varnish-libs-devel.x86_64 4.0.3-1.el6 varnish-4.0
[root@h101 varnish]#