varnish Basic
varnish Basic
从epel仓库中安装
epel仓库中的varnish版本为4.0.5
,截止目前,官方最新版本为6.4.0
从官方仓库中安装较新版本
以5.2.0
版本为例
编译安装
-
Download the appropriate release tarball, which you can find on https://varnish-cache.org/releases/ .
-
To build Varnish on a Red Hat or CentOS system, this command should install required packages (replace sudo yum install if needed):
Optionally, to rebuild the svg files:
Optionally, to pull from a repository:
- The configuration will need the dependencies above satisfied. Once that is taken care of:
The configure script takes some arguments, but more likely than not you can forget about that for now, almost everything in Varnish can be tweaked with run time parameters.
- Before you install, you may want to run the test suite, make a cup of tea while it runs, it usually takes a couple of minutes:
- And finally, the true test of a brave heart:
sudo make install
Varnish will now be installed in /usr/local. The varnishd binary is in /usr/local/sbin/varnishd. To make sure that the necessary links and caches of the most recent shared libraries are found, run sudo ldconfig.
启动
使用systemctl start varnish
即可,手动启动使用一下命令: