安装pcre
varnish 依赖pcre进行url正则匹配。

cd pcre-8.12
./configure --prefix=/usr/local/
make&&make install

编译
解压缩varnish源码包

wget http://repo.varnish-cache.org/source/varnish-3.0.4.tar.gz
cd /root
tar -zxvf varnish-3.0.4.tar.gz
cd varnish-3.0.4
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
./configure --prefix=/usr/local/varnish
make && make install

配置文件路径vim /usr/local/varnish/etc/varnish/default.vcl

ln -s /usr/local/varnish/sbin/varnishd /usr/bin/varnishd

vim /usr/local/varnish/etc/varnish/default.vcl

#去掉注释

backend default {
.host = "192.168.66.139";
.port = "80";
}

#启动varnish

varnishd -f /usr/local/varnish/etc/varnish/default.vcl -s file,/var/varnish_cache,1G -T 0.0.0:2000 -a 0.0.0.0:80

http://192.168.66.140/

返回头信息:

Accept-Ranges:bytes
Age:0
Connection:keep-alive
Content-Length:10
Content-Type:text/html; charset=UTF-8
Date:Fri, 03 Jun 2016 08:34:41 GMT
ETag:"c0672-a-53433d4d6ce32"
Last-Modified:Wed, 01 Jun 2016 09:08:22 GMT
Server:Apache/2.2.15 (CentOS)
Via:1.1 varnish
X-Varnish:977689110

  安装成功!

varnish安装的更多相关文章

  1. 高性能HTTP加速器Varnish安装与配置

    导读 Varnish是一款高性能且开源的反向代理服务器和HTTP加速器,它采用了全新的软件体系结构,和现在的硬件体系配合紧密.下面就由我给大家简单说说他的安装与配置. 安装 安装pcre 如果没有安装 ...

  2. Varnish安装使用(初学)

    本人对varnish也是新手,这里记录一下安装步骤! 环境:centos6.6 varnish安装包下载:wget https://repo.varnish-cache.org/source/varn ...

  3. 高性能HTTP加速器Varnish安装与配置(包含常见错误)

    Varnish是一款高性能的开源HTTP加速器.挪威最大的在线报纸Verdens Gang使用3台Varnish取代了原来的12台Squid,性能竟然比曾经更好.Varnish 的作者Poul-Hen ...

  4. varnish安装和配置

    实验环境:CentOS7 Varnish是高性能开源的反向代理服务器和HTTP缓存服务器. #varnish服务器:172.16.252.142 [root@varnish localhost]#yu ...

  5. Varnish快速安装及测试

    实验环境: slave-147:   192.168.75.147 slave-148:    192.168.75.148 两台机器均已关闭selinux,关闭iptables. varnish部署 ...

  6. Varnish 6.2.2 的介绍与安装

    一.简介 Varnish 是一款高性能且开源的反向代理服务器和 HTTP 加速器,其采用全新的软件体系机构,和现在的硬件体系紧密配合,与传统的 Squid 相比,Varnish 具有性能更高.速度更快 ...

  7. 安装Varnish 及遇到的坑

      转自:http://ixdba.blog.51cto.com/2895551/682555   一.安装Varnish Varnish的安装非常简单,下面逐步介绍: 1.安装前的准备  Varni ...

  8. Varnish – 高性能http加速器

    Varnish是一款高性能且开源的反向代理服务器和http加速器.与传统的Squid相比,Varnish具有性能更高.速度更快.管理更方便 等诸多优点.作者Poul-Henning Kamp是Free ...

  9. Varnish Cache

    1 Varnish简介 Varnish是高性能且开源的反向代理服务器和HTTP加速器(cache server).其开发者Poul-Henning Kamp是FreeBSD核心的开发人员之一.Varn ...

随机推荐

  1. ubuntu16.04下安装配置深度学习环境(Ubuntu 16.04/16.10+ cuda7.5/8+cudnn4/5+caffe)

    主要参照以下两篇博文:http://blog.csdn.net/g0m3e/article/details/51420565   http://blog.csdn.net/xuzhongxiong/a ...

  2. maven笔记(maven使用与安装,eclipse中maven的配置,maven项目的创建)

    一.初识maven 1.maven是什么? 他是一个项目管理器,配置好pom配置文件后,maven会管理项目的依赖文件等,当项目用到外部jar包时,maven帮助我们去网上下载并打包发到Tomcat中 ...

  3. eclipse部署和启动guns

    eclipse部署guns: 1.import -> 搜索maven -> Existing Maven Projects -> 选择guns根目录 2.修改配置文件: spring ...

  4. centos下安装storm

    centOS安装ZeroMQ centOS安装ZeroMQ所需组件及工具: yum install gcc yum install gcc-c++ yum install make yum insta ...

  5. Python_单元测试工具nose

    一.nose的API nose的API地址:http://pythontesting.net/framework/nose/nose-introduction/ 二.安装nose 先用easy_ins ...

  6. 烂泥Linux学习笔记

    把最近学习过程中所写的文章整理了下:注意:本帖会持续性更新!!! 虚拟化篇:<烂泥:虚拟化KVM安装与配置><烂泥:KVM安装centos6.5系统><烂泥:KVM中安装 ...

  7. wpf和winform的那点区别

    一提起winform和wpf有啥不同,可能大部分人都会想到wpf拥有漂亮的界面.wpf中也可以使用winform,大部分情况下,都没有任何问题,极少的情况下,可能会出现问题. 我们就来看一下: voi ...

  8. LeetCode Minimum Absolute Difference in BST

    原题链接在这里:https://leetcode.com/problems/minimum-absolute-difference-in-bst/#/description 题目: Given a b ...

  9. webpack 故障处理

    Webpack 的配置比较复杂,很容出现错误,下面是一些通常的故障处理手段. 一般情况下,webpack 如果出问题,会打印一些简单的错误信息,比如模块没有找到.我们还可以通过参数 --display ...

  10. C#检查网络是否可以连接互联网

    添加引用: using System.Runtime.InteropServices; using System.Net.NetworkInformation; [DllImport("wi ...