主机参考:VPS测评参考推荐/专注分享VPS服务器优惠信息!若您是商家可以在本站进行投稿,查看详情!此外我们还提供软文收录、PayPal代付、广告赞助等服务,查看详情! |
我们发布的部分优惠活动文章可能存在时效性,购买时建议在本站搜索商家名称可查看相关文章充分了解该商家!若非中文页面可使用Edge浏览器同步翻译!PayPal代付/收录合作 |
Varnish是一款高性能且开源的反向代理服务器和http加速器。与传统的Squid相比,Varnish具有性能更高、速度更快、管理更方便等诸多优点。但具体怎么安装呢?下面由小编给你们介绍安装varnish服务器的简单教程。
地址为192.168.1.35,192.168.1.36,192.168.1.37
安装varnish的服务器IP为192.168.1.33
第二步获取安装varnish所需要的包
编译 安装varnish6.0需要pcre库,pcre库为了兼容正则表达式
下载地址http://down.51cto.com/data/2315007
#cd pcre-8.39
# ./configure --prefix=/usr/local/pcre
第三步 安装varnish
下载地址http://down.51cto.com/data/456650
# tar xvf varnish-2.1.2.tar.gz
# cd varnish-2.1.2
这一步是指定varnish查找pcre库的位置,根据你安装的位置自行决定
# 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
#cp redhat/varnish.initrc /etc/init.d/varnish
# cp redhat/varnish.sysconfig /etc/sysconfig/varnish
下载地址http://down.51cto.com/data/2315096
最简单的 vcl配置文件,下载后解压出来,放入配置文件夹,例如/usr/local/varnish/etc
第五步 启动varnished
/usr/local/varnish/sbin/varnishd -f /usr/local/varnish/etc/vcl.conf
是否包含
x-varnish: 1807036043 1807036035Age: 63Via: 1.1 varnishConnection: keep-aliveX-Cache: HIT from www.furyamber.com
如果已有,则已工作。
ps vcl.conf是最简单的配置,如果需要有新的功能需要自己研究
看完上文不知道你对安装varnish服务器的教程了解多少?如果想了解更多,欢迎关注亿速云行业资讯频道
Varnish is a high performance and open source reverse proxy server and HTTP accelerator. Compared with the traditional squid, varnish has many advantages such as higher performance, faster speed and more convenient management. But how to install it? The following is a simple tutorial for you to install the varnish server.
Step 1: install 3 nginx servers
Address: 192.168.1.35192.168.1.36192.168.1.37
The server IP of varnish installation is 192.168.1.33
Step 2: get the package needed to install varnish
Compiling and installing varnish 6.0 requires the PCRE library, which is compatible with regular expressions
Download address: http://down.51cto.com/data/2315007
#tar xvf pcre-8.39.tar.gz
#cd pcre-8.39
# ./configure --prefix=/usr/local/pcre
#make make install
Step 3 install varnish
Download address: http://down.51cto.com/data/456650
# tar xvf varnish-2.1.2.tar.gz
# cd varnish-2.1.2
This step is to specify the location where varnish finds the PCRE library, which is determined by your installation location
# 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
#cp redhat/varnish.initrc /etc/init.d/varnish
# cp redhat/varnish.sysconfig /etc/sysconfig/varnish
Step 4 modify the configuration file
Download address: http://down.51cto.com/data/2315096
The simplest VCL configuration file is extracted after downloading and put into the configuration folder, such as / usr / local / varnish / etc
Modify the configuration according to the actual situation of your server
Step 5 start varnished
/usr/local/varnish/sbin/varnishd -f /usr/local/varnish/etc/vcl.conf
Step 6 test cache hit
Visit http://192.168.1.33 to view the request response header
x-varnish: 1807036043 1807036035Age: 63Via: 1.1 varnishConnection: keep-aliveX-Cache: HIT from www.furyamber.com
If it already exists, it works.
PS vcl.conf is the simplest configuration. If you need to have new functions, you need to study it yourself
After reading the above, I don't know how much do you know about the tutorial of installing the varnish server? If you want to learn more, please pay attention to the billion speed cloud industry information channel
--------------------------------------------------------------
主机参考,收集国内外VPS,VPS测评,主机测评,云服务器,虚拟主机,独立服务器,国内外服务器,高性价比建站主机相关优惠信息@zhujicankao.com
详细介绍和测评国外VPS主机,云服务器,国外服务器,国外主机的相关优惠信息,商家背景,网络带宽等等,也是目前国内最好的主机云服务器VPS参考测评资讯优惠信息分享平台
这几篇文章你可能也喜欢:
- CloudCone,美国Win系统VPS云服务器少量补货,美国洛杉矶MC机房,KVM虚拟架构,3核4G内存1Gbps带宽,17.49美元/月
- 热网互联Hotiis,年底特惠活动,海外高质量免备案VPS云服务器5折,中国香港/美国/日本机房,1核1G内存15Mbps带宽,低至20元/月,默认赠送5G DDOS防御
- 腾讯云,双十一特价优惠活动,高性价比国内轻量云服务器年付低至48元起,2核4G内存8Mbps带宽轻量云年付70元,续费2.5折起,还有海量代金券免费领
- 腾讯云,双11活动最后一天,超便宜云服务器2核4G内存8Mbps带宽仅198元/3年,无新账号可按照本文附带教程1个身份证开8个新用户账号抢购,买到就是赚到,挖币都能回本
- CloudCone,黑色星期五特别优惠,美国便宜VPS云服务器低至5.5美元/年,美国洛杉矶MC机房,KVM虚拟架构,1核256M内存1Gbps带宽优化线路,5.5美元/年
本文由主机参考刊发,转载请注明:安装varnish服务器的简单教程 https://zhujicankao.com/12635.html
评论前必须登录!
注册