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

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↓]

varnish4.X安装的更多相关文章

  1. 编译安装 varnish-4.1.2和yum 安装 varnish-4.0.3

    vanish可以让用户自己选择缓存数据是存于内存还是硬盘,存于内存一般基于二八法则即常访问的数据是磁盘存储的总数据五分之一,因此内存也应该是硬盘文件大概五分之一.如果有多台vanish则,总内存满足即 ...

  2. varnish4.0简介

    Varnish 4.0 简介 Varnish 是一款开源的HTTP加速器和反向代理服务器,它的主要特点有: (1)是基于内存缓存,重启后数据将消失.(2)利用虚拟内存方式,io性能好.(3)支持设置0 ...

  3. varnish 4.0编译安装小记

    varnish 4.0 编译问题 centos-6.5 x86环境 装varnish遇到几个错误要先安装python-docutils然后提示error1,于是安装:libedit-devel然后提示 ...

  4. web缓存服务器varnish-4.1.6的部署及配置详解

    web缓存服务器varnish-4.1.6的部署及配置详解 1.安装varnish4.1.6安装依赖 yum install -y autoconf automake jemalloc-devel l ...

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

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

  6. cnetos6.5安装Varnish

    安装依赖包: tar -zxvf docutils-0.13.1.tar.gz python setup.py install unzip pcre2-10.23.zip ./configure -- ...

  7. varnish4.0缓存代理配置

    防伪码:你必须非常努力,才能看起来毫不费力. 一.varnish原理: 1)Varnish简介: varnish缓存是web应用加速器,同时也作为http反向缓存代理.你可以安装varnish在任何h ...

  8. Varnish 6.2.2 的介绍与安装

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

  9. docker——容器安装tomcat

    写在前面: 继续docker的学习,学习了docker的基本常用命令之后,我在docker上安装jdk,tomcat两个基本的java web工具,这里对操作流程记录一下. 软件准备: 1.jdk-7 ...

随机推荐

  1. unity 2017 卡在 loading界面

    看了网上很多方法,都不奏效. 提供一个简单的方法,不妨一试! 打开其他版本unity,登陆你的账户,再打开unity2017即可!

  2. 使用Git下载指定分支命令为

    使用Git下载指定分支命令为: git clone -b 分支名 仓库地址   例如: git clone -b dev https://github.com/xxx.git   将下载分支名为2D- ...

  3. 改造 Firefox 浏览器——GitHub 热点速览

    作者:HelloGitHub-小鱼干 上周推荐了一个可以在浏览器上用 VS Code 的项目,这次 Firefox-UI-Fix 带你给 Firefox 来个大变身,在它现有 Proton UI 下进 ...

  4. H.265视频编码与技术全析(下)

    H.265视频编码与技术全析(下) 四.帧内预测模式 共35个(h264有9个),包括Planar,DC,33个方向模式: 除了Intra_Angular预测外,HEVC还和H.264/MPEG-4 ...

  5. 如何在CPU上优化GEMM(下)

    如何在CPU上优化GEMM(下) Array Packing 另一个重要的技巧是数组打包.这个技巧是对数组的存储维度进行重新排序,将某个维度上的连续访问模式在平滑后转换为顺序模式. 如上图所示,在阻塞 ...

  6. 英特尔® 至强® 平台集成 AI 加速构建数据中心智慧网络

    英特尔 至强 平台集成 AI 加速构建数据中心智慧网络 SNA 通过 AI 方法来实时感知网络状态,基于网络数据分析来实现自动化部署和风险预测,从而让企业网络能更智能.更高效地为最终用户业务提供支撑. ...

  7. 量子:基于ERP块对的两步量子直接通信

    学习论文: 题目:Two-step quantum direct communication protocol using the Einstein-Podolsky-Rosen pair block ...

  8. centos 7 查看磁盘使用情况

    1.查询系统整体磁盘使用情况 df -h [root@hadoop100 aubunt]# df -h 文件系统 容量 已用 可用 已用% 挂载点 /dev/mapper/centos-root 17 ...

  9. 如何提升springboot服务吞吐量

    生产环境偶尔会有一些慢请求导致系统性能下降,吞吐量下降,下面介绍几种优化建议. 方案 1.undertow替换tomcat 电子商务类型网站大多都是短请求,一般响应时间都在100ms,这时可以将web ...

  10. Redundant Paths 分离的路径

    Redundant Paths 分离的路径 题目描述 为了从F(1≤F≤5000)个草场中的一个走到另一个,贝茜和她的同伴们有时不得不路过一些她们讨厌的可怕的树.奶牛们已经厌倦了被迫走某一条路,所以她 ...