Knowledgebase

Installation and configuration of Varnish 3

  • تثبيت الورنيش, ملف التكوين الورنيش, تكوين الورنيش مع nginx, البرنامج المساعد الورنيش, install varnish, varnish configuration file, varnish secret key, configure varnish with nginx, varnish plugin, varnish default port, varnish repo, is varnish working
  • 0

Installation and configuration of Varnish 3

In this article you can learn how to install and configure Varnish cache. Varnish cache is very important as it is an accelerator for web applications known as the proxy, it temporarily stores the contents and also accelerates the delivery process from 300 - 1000x.

This section can not access it unless you access the root of the ability to perform any of the procedures described in the following lines since you can not control it through the WHM interface.

Processing steps:
At first, Apache must be ready before performing the installation to avoid port conflicts.

Step 1: Log on to the server's command-line interface as a primary user.

Step 2: Edit the following file.

vim /var/cpanel/cpanel.config

Step 3: Find the "apache_port" line and change it to

apache_port = 0.0.0.0: 8081

Step 4: Press the Save button

Step 5: To update the settings, run the following command.

/ usr / local / cpanel / whostmgr / bin / whostmgr2 --updatetweaksettings

Installation steps:

In the following steps you can learn how to install varnish 3 on your dedicated server.

Step 1: Check the CentOS version by running the following command.

Cat / etc / centos-release

CentOS 6.7 (Final)

Step 2: Add the varnish repositories to your server by using the following command.

CentOS 6 - rpm --nosignature -i http://repo.varnish-cache.org/redhat/varnish-3.0/el6/noarch/varnish-release/varnish-release-3.0-1.el6.noarch.rpm

CentOS 5 - rpm --nosignature -i http://repo.varnish-cache.org/redhat/varnish-3.0/el5/noarch/varnish-release/varnish-release-3.0-1.el5.centos.noarch.rpm

Select the command based on your version type.

Step 3: Install the varnish by running the following command

yum install varnish

Steps to order:

Step 1: Edit the file through the following command.

vim / etc / sysconfig / varnish

Step 2: At the bottom of the file, add the following lines.

 (After line # DAEMON_OPTS = "").

DAEMON_OPTS = "- a: 80 \

-T localhost: 6082 \

-b localhost: 8081 \

-u varnish -g varnish \

-s file, / var / lib / varnish / varnish_storage.bin, 2G "

-s file, / var / lib / varnish / varnish_storage.bin, 2G "

Step 3: Save the file.

Step 4: Do the following services to restart to make sure that the changes take effect.

service varnish restart

service httpd restart


Was this answer helpful?