zoukankan      html  css  js  c++  java
  • varnish4.X安装


    本文提供了两种安装方式,但建议使用编译安装

    Attention
    Centos7默认yum安装版本为4.0.5,网上文档支持比较多;稳定版且文档较多仍集中在4.1版本

    1. rpm方式

    Install pygpgme, a package which allows yum to handle gpg signatures, and a package called yum-utils which contains the tools you need for installing source RPMs.

    sudo yum install pygpgme yum-utils
    

    You may need to install the EPEL repository for your system to install these packages. If you do not install pygpgme, GPG verification will not work.

    Create a file named /etc/yum.repos.d/varnishcache_varnish41.repo that contains the repository configuration below.

    Make sure to replace el and 7 in the config below with your Linux distribution and version:

    [varnishcache_varnish41]
    name=varnishcache_varnish41
    baseurl=https://packagecloud.io/varnishcache/varnish41/el/7/$basearch
    repo_gpgcheck=1
    gpgcheck=0
    enabled=1
    gpgkey=https://packagecloud.io/varnishcache/varnish41/gpgkey
    sslverify=1
    sslcacert=/etc/pki/tls/certs/ca-bundle.crt
    metadata_expire=300
    
    [varnishcache_varnish41-source]
    name=varnishcache_varnish41-source
    baseurl=https://packagecloud.io/varnishcache/varnish41/el/7/SRPMS
    repo_gpgcheck=1
    gpgcheck=0
    enabled=1
    gpgkey=https://packagecloud.io/varnishcache/varnish41/gpgkey
    sslverify=1
    sslcacert=/etc/pki/tls/certs/ca-bundle.crt
    metadata_expire=300
    

    Valid options for os and dist parameters can be found in our supported OS list in the docs.

    Update your local yum cache by running

    sudo yum -q makecache -y --disablerepo='*' --enablerepo='varnishcache_varnish41'
    

    You can now install packages from your repository.

    yum install varnish
    

    The configuration file is /etc/varnish/default.vcl

    2. 编译安装

    2.1 依赖包

    #yum install -y libtool ncurses-devel pcre-devel libxslt libedit python-imaging python-docutils
    
    yum install -y pcre-devel python-docutils libedit-dev* 
    

    2.2 编译Varnish

    wget https://varnish-cache.org/_downloads/varnish-4.1.11.tgz
    
    tar -xzvf varnish-4.1.11.tgz
    
    cd varnish-4.1.11/
    
    ./configure --prefix=/usr/local/varnish4
    
    make && make install
    
    ln -s /usr/local/varnish4/sbin/* /usr/sbin/
    ln -s /usr/local/varnish4/bin/* /usr/local/bin/
    
    cp -a /usr/local/varnish4/share/doc/varnish/example.vcl /usr/local/varnish4/default.vcl
    

     
    [sleepy↓]

     
     

  • 相关阅读:
    mdx 根据维度Hierarchy节点的名字来filter节点,搜索节点
    学习C++.Primer.Plus 8 函数探幽
    学习C++.Primer.Plus 7 函数
    学习C++.Primer.Plus 6 分支语句和逻辑操作符
    学习C++.Primer.Plus 5 循环和关系表达式
    学习C++.Primer.Plus 4 复合类型
    NYoj_171聪明的kk
    NYoj_104最大和
    希尔排序
    NYoj_49开心的小明
  • 原文地址:https://www.cnblogs.com/sunhongleibibi/p/11613181.html
Copyright © 2011-2022 走看看