安装2.0+版本

前期准备:

下载pcre

http://sourceforge.net/projects/pcre/files/pcre/

http://optimate.dl.sourceforge.net/project/pcre/pcre/7.9/pcre-7.9.tar.gz

下载varnish

https://www.varnish-cache.org/releases

http://repo.varnish-cache.org/source/varnish-2.1.2.tar.gz

建立 目录和存储文件目录

useradd -s /sbin/nologin varnish  

mkdir -p /wwwdata/varnish/cache 

mkdir -p /wwwdata/varnish/log

chown -R varnish:varnish /wwwdata/varnish/cache

chown -R varnish:varnish /wwwdata/varnish/log

安装pcre

cd /usr/local/src/
tar -zxvf pcre-7.9.tar.gz
cd pcre-7.9
./configure --prefix=/usr/local/pcre
make
make install

安装varnish

cd /usr/local/src/
tar -zxvf varnish-2.1..tar.gz
cd varnish-2.1. export PKG_CONFIG_PATH=/usr/local/pcre/lib/pkgconfig/ ./configure --prefix=/usr/local/varnish/ \
--enable-dependency-tracking \
--enable-debugging-symbols \
--enable-developer-warnings \
make
make install

至此安装完成,

备注:我试过安装最新版,没有安装成功,全部卸载后从新安装此版本可以安装成功!~

安装3.0+版本

yum install -y automake autoconf libtool ncurses-devel libxslt groff pcre-devel pkgconfig

rpm --nosignature -i http://repo.varnish-cache.org/redhat/varnish-3.0/el5/noarch/varnish-release/varnish-release-3.0-1.noarch.rpm

yum install varnish

varnish的启动

#启动varnish
varnishd -f /etc/varnish/default.vcl -s malloc,1G -T 127.0.0.1: -a 0.0.0.0:
service varnish restart

linux centos 安装配置varnish的更多相关文章

  1. 阿里云服务器Linux CentOS安装配置(零)目录

    阿里云服务器Linux CentOS安装配置(零)目录 阿里云服务器Linux CentOS安装配置(一)购买阿里云服务器 阿里云服务器Linux CentOS安装配置(二)yum安装svn 阿里云服 ...

  2. 阿里云服务器Linux CentOS安装配置(九)shell编译、打包、部署

    阿里云服务器Linux CentOS安装配置(九)shell编译.打包.部署 1.查询当前目录以及子目录下所有的java文件,并显示查询结果 find . -name *.java -type f - ...

  3. 阿里云服务器Linux CentOS安装配置(八)nginx安装、配置、域名绑定

    阿里云服务器Linux CentOS安装配置(八)nginx安装.配置.域名绑定 1.安装nginx yum -y install nginx 2.启动nginx service nginx star ...

  4. 阿里云服务器Linux CentOS安装配置(七)域名解析

    阿里云服务器Linux CentOS安装配置(七)域名解析 1.购买域名 登录阿里云,左侧菜单点击[域名],然后[域名注册],完成域名购买.(一般首年45元) 2.添加域名解析 在域名列表里点击你的域 ...

  5. 阿里云服务器Linux CentOS安装配置(六)resin多端口配置、安装、部署

    阿里云服务器Linux CentOS安装配置(六)resin多端口配置.安装.部署 1.下载resin包 http://125.39.66.162/files/2183000003E08525/cau ...

  6. 阿里云服务器Linux CentOS安装配置(五)jetty配置、部署

    阿里云服务器Linux CentOS安装配置(五)jetty配置.部署 1.官网下载jetty:wget http://repo1.maven.org/maven2/org/eclipse/jetty ...

  7. 阿里云服务器Linux CentOS安装配置(四)yum安装tomcat

    阿里云服务器Linux CentOS安装配置(四)yum安装tomcat 1.yum -y install tomcat  执行命令后,会帮你把jdk也安装好 2.tomcat安装目录:/var/li ...

  8. 阿里云服务器Linux CentOS安装配置(三)yum安装mysql

    阿里云服务器Linux CentOS安装配置(三)yum安装mysql 1.执行yum安装mysql命令:yum -y install mysql-server mysql-devel 2.启动mys ...

  9. 阿里云服务器Linux CentOS安装配置(二)yum安装svn

    阿里云服务器Linux CentOS安装配置(二)yum安装svn 1.secureCRT连接服务器 2.先创建一个文件夹,用来按自己的习惯来,用来存放数据 mkdir /data 3.yum安装sv ...

随机推荐

  1. Ubuntu 图形桌面死机重启(机器不重启)

    Ubuntu的图形界面容易死机,如果正在跑程序的话又不能重启.这时候可以通过终端来_重启_图形界面. 首先按Alt+Ctrl+F1进入终端界面.查看图形界面的进程: ps -t tty7 查看到名为X ...

  2. js实现复制|剪切指定内容到粘贴板--clipboard

    这是著名开源项目 clipboard.js 的 README.md,里面讲解的更加详细,有兴趣的同学可以了解一下.项目地址:https://github.com/zenorocha/clipboard ...

  3. 【leetcode】963. Minimum Area Rectangle II

    题目如下: Given a set of points in the xy-plane, determine the minimum area of any rectangle formed from ...

  4. pygame游戏框架

    #_author:来童星#date:2019/12/22 import pygame import sys pygame.init() size=width,height=640,480 screen ...

  5. C循环

    C 循环 有的时候,可能需要多次执行同一块代码.一般情况下,语句是顺序执行的:函数中的第一个语句先执行,接着是第二个语句,依此类推. 编程语言提供了允许更为复杂的执行路径的多种控制结构. 循环语句允许 ...

  6. 学习android文档

    follow lesson, 一. 创建一helloworld,运行.fragment_main.xml里默认是relativeLayout和Textview 二. 创建第一个图形界面,主要是说fra ...

  7. P1537 弹珠

    P1537 弹珠 题目描述 玛莎和比尔各自有自己的弹珠收藏.他们想重新分配收藏品,使两人能平等拥有弹珠.如果所有的弹珠的价值相同,那么他们就可以平分.但不幸的是,有一些弹珠更大,或者更美丽,所以,玛莎 ...

  8. windows每天定时执行脚本

     windows每天定时执行脚本 这里说的定时器就是Windows下的任务计划,当时遇到的坑正好总结一下,因为Windows10的定时器去执行脚本当时试了好多遍,都是没有成功,后来通过自己的观察发现是 ...

  9. Eclipse lombok get set方法报错

    在maven仓库中找到 lombok jar包 如:C:\Program File\.m2\Repository\org\projectlombok\lombok\1.18.2\lombok-1.18 ...

  10. POJ 1269 Intersecting Lines (判断直线位置关系)

    题目链接:POJ 1269 Problem Description We all know that a pair of distinct points on a plane defines a li ...