Linux Installation Configuration varnish Web Accelerator

Source: Internet
Author: User
Tags varnish

Linux Installation Configuration varnish Web Accelerator

Varnish is a high-performance open-source HTTP accelerator that can be used for purely proxy servers, load balancing, but Varnish's primary function is cache acceleration, which is also the best place for it. The following describes how to install and use.

    1. Wget-c http://repo.varnish-cache.org/source/varnish-3.0.1.tar.gz
    2. Tar xzvf varnish-3.0.1.tar.gz
    3. CD varnish-3.0.1
    4. ./configure--prefix=/usr/local/varnish
    5. Make
    6. Make install
    7. Groupadd Varnish
    8. useradd-d/var/lib/varnish-g varnish-s/sbin/nologin Varnish
    9. Ln-s/usr/local/varnish/sbin/varnishd/usr/sbin/varnishd

Start varnish:

    1. Varnishd-f/usr/local/varnish/etc/varnish/default.vcl-s malloc,1g-g varnish-u varnish-t 127.0.0.1:2000

Close varnish:

    1. Pkill Varnish

Introduction to Startup Parameters:
-f/usr/local/etc/varnish/default.vcl
This –f option specifies which configuration file varnishd uses.
-S MALLOC,1G
This –s option is used to determine the storage type and storage capacity used by varnish, I am using the malloc type (malloc is a C function for allocating memory space), and 1G defines how much memory is malloced,1g = 1gigabyte.
-T 127.0.0.1:2000
Varnish has a text-based management interface that can be activated to manage varnish without stopping varnish. You can specify which interface the management software listens to. Of course you can't allow people all over the world to access your varnish management interface, because they can easily access the varnish management interface to gain access to your root. I recommend that you just let it listen to the native port. If you have users in your system that you do not fully trust, you can restrict access to varnish's management ports through firewall rules.
-A 0.0.0.0:8080
The meaning of this sentence is to make varnish listen to all IP to 8080 port HTTP request, if in production environment, you should let varnish listen 80, this is also the default.
For an introduction to VCL configuration files, follow the instructions on how to view:
Man/usr/local/varnish/share/man/man7/vcl.7
You can also view the online documentation: https://www.varnish-cache.org/docs/3.0/

Reprint please indicate the article source: "https://www.centos.bz/2011/10/linux-install-varnish-cache-server/"

Linux Installation Configuration varnish Web Accelerator

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.