Installation

fweb edited this page May 27, 2016 · 28 revisions
  1. Install Varnish, but make sure you install a version above 2.1.

    You can use any version of Varnish >= 2.1. The Varnish website provides binary packages for most common distros or you can compile it from source. After installing, go ahead and start Varnish with the default VCL (configuration file) and make sure the management interface is turned on (port 6082 by default).

    Please note - if you are using Centos 7 please avoid Varnish 4.0.3 - use either 4.1.x or 3.0.x. See here for more details.

  2. Configure Varnish

    Recent versions of Turpentine now require a small addition to Varnish's configuration. Make sure you add the \ at the end of the line if you are putting them before the last option line.

    If you're using Varnish 3.x You'll need to make Varnish start up with the -p esi_syntax=0x2 option, and adding -p cli_buffer=16384 is recommended. How to add these options depends on your OS but for CentOS you would add it to DAEMON_OPTS in /etc/sysconfig/varnish.

    For CentOS: nano /etc/sysconfig/varnish, then ctrl W and search for uncommented version of DAEMON_OPTS Add -p esi_syntax=0x2 option and -p cli_buffer=16384 to DAEMON_OPTS

    If you're using Varnish 4.x You will need to start Varnish with the -p cli_buffer=16384 and -p feature=+esi_ignore_other_elements options. Also, as of Varnish 4.0 the inline C functionality is disabled by default. To enable inline C you need to modify Varnish's startup config and add -p vcc_allow_inline_c=on to Varnish's startup command.

  3. Start Varnish

    In CentOS: service varnish start Then to ensure it comes on at boot: chkconfig varnish on

  4. Install this plugin

    There are a couple of options for this:

    • Download and install the tarball package from the Downloads page on GitHub (note that this is not the "Download as tar.gz" button) and install through Magento Connect Downloader or Magento's mage command.
    • Install through Magento Connect with the extension key: http://connect20.magentocommerce.com/community/Nexcessnet_Turpentine
    • Install with modman. You would just need to use: modman clone https://github.com/nexcess/magento-turpentine.git

Note If you install with modman you should also set System > Configuration > Developer > Template Settings > Allow Symlinks to "Yes".

  1. Turn off the compiler option in Magento, and clear the cache.

  2. Clear the Config, Layout, and Block HTML caches and disable the Full Page Cache cache (if it is available and enabled) in System > Cache Management, then logout and log back in.

    Note Many other caching extensions are incompatible with Turpentine, so it you should also disable any other caching extensions (in addition to EE's full page cache) to avoid issues.

  3. Installation done! Head over to the Configuration page.