varnish 最新稳定版是3.0系列,本文讲述rpm和yum的安装方法。
CentOS5
# rpm -ivh http://repo.varnish-cache.org/redhat/varnish-3.0/el5/noarch/varnish-release-3.0-1.noarch.rpm
# yum install varnish --enablerepo=epel
CentOS6
# yum install gcc jemalloc--enablerepo=epel
# wget http://users.linpro.no/ingvar/varnish/3.0.2/3.0.2-1/el6/x86_64/varnish-3.0.2-1.el6.x86_64.rpm
# wget http://users.linpro.no/ingvar/varnish/3.0.2/3.0.2-1/el6/x86_64/varnish-libs-3.0.2-1.el6.x86_64.rpm
# rpm -Uvh varnish-3.0.2-1.el6.x86_64.rpm varnish-libs-3.0.2-1.el6.x86_64.rpm
epel源里也有varnish,但是是2.x版本的。
rpm安装就是好,方便快速,安装后的默认清单如下
服务端口 6081
管理端口 127.0.0.1:6082
日志 /var/log/varnish/
缓存大小 1G
缓存路径 /var/lib/varnish/varnish_storage.bin
配置文件和启动脚本路径
/etc/sysconfig/varnish
/etc/logrotate.d/varnish
/etc/varnish/default.vcl
/etc/rc.d/init.d/varnishncsa
/etc/rc.d/init.d/varnishlog
/etc/rc.d/init.d/varnish
声明: 此文观点不代表本站立场;转载须要保留原文链接;版权疑问请联系我们。