Varnish安装

 安装varnish之前先确定以下包已经安装:

pcre 如果没有,下载安装

1安装pcre

./configure --prefix=/usr/local/pcre

sudo make && make install

2.如果还是会报错,是关于pcre的。确认pkg-config已经安装,

apt-get install automake autoconf libtool pkg-config -y

以及确保 automake autoconf libtool pkg-config pcre-devel这些安装包都已经安装。如果确认,

那么varnish./configure可以成功运行,否则会一直报PKG_CONFIG_PATH有问题。说你没有设置PKG_PAHT

make时错误

export PKG_CONFIG_PATH=/usr/local/pcre/lib/pkgconfig

./configure --prefix=/usr/local/varnish --enable-debugging-symbols --enable-developer-warnings --enable-dependency-tracking

make

make install

3安装完成之后,

 

root@ttpod111:/usr/local/varnish/sbin# ./varnishd -f  /usr/local/varnish/etc/vcl.conf -s malloc,1G -T 127.0.0.1:2000 -a 0.0.0.0:8080

按照启动脚本

 

sbin/varnishd -f /usr/local/varnish/vcl.vonf -s malloc,1G  -T 127.0.0.1:2000 -a 0.0.0.0:80

 

你可能感兴趣的:(安装,varnish)