<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/yac.setup.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'yac.installation.php',
    1 => 'Installation',
    2 => 'Installation',
  ),
  'up' => 
  array (
    0 => 'yac.setup.php',
    1 => 'Installing/Configuring',
  ),
  'prev' => 
  array (
    0 => 'yac.requirements.php',
    1 => 'Requirements',
  ),
  'next' => 
  array (
    0 => 'yac.configuration.php',
    1 => 'Runtime Configuration',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/yac/setup.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="yac.installation" class="section">
  <h2 class="title">Installation</h2>
  <p class="simpara">
   Yac can be installed in one of three ways: via PECL, via PIE, or
   by building it from source.
  </p>
  <p class="simpara">
   This <a href="https://pecl.php.net/" class="link external">&raquo;&nbsp;PECL</a> extension is not bundled with PHP.
  </p>
  <p class="simpara">
   Information for installing this PECL extension may be
found in the manual chapter titled <a href="install.pecl.php" class="link">Installation
of PECL extensions</a>. Additional information such as new releases,
downloads, source files, maintainer information, and a CHANGELOG, can be
located here: 
   <a href="https://pecl.php.net/package/yac" class="link external">&raquo;&nbsp;https://pecl.php.net/package/yac</a>.
  </p>
  <p class="simpara">
   Windows binaries (<abbr title="Dynamic Link Library">DLL</abbr> files)
for this <abbr title="PHP Extension Community Library">PECL</abbr> extension are available from the PECL website.
  </p>
  <div class="example" id="example-1">
   <p><strong>Example #1 Installing Yac with PECL</strong></p>
   <div class="example-contents">
<div class="shellcode"><pre class="shellcode">pecl install yac</pre>
</div>
   </div>

  </div>
  <p class="simpara">
   As of Yac 2.3.2, the extension can be installed with
   <a href="https://github.com/php/pie" class="link external">&raquo;&nbsp;PIE</a>, the PHP Installer for Extensions, by running the
   following on the command line.
  </p>
  <div class="example" id="example-2">
   <p><strong>Example #2 Installing Yac with PIE</strong></p>
   <div class="example-contents">
<div class="shellcode"><pre class="shellcode">pie install laruence/yac</pre>
</div>
   </div>

  </div>
  <p class="simpara">
   Optional serializers can be enabled at install time:
  </p>
  <div class="example" id="example-3">
   <p><strong>Example #3 Installing Yac with PIE and a serializer</strong></p>
   <div class="example-contents">
<div class="shellcode"><pre class="shellcode">pie install laruence/yac --enable-json</pre>
</div>
   </div>

  </div>
  <p class="simpara">
   The source code is hosted on
   <a href="https://github.com/laruence/yac" class="link external">&raquo;&nbsp;GitHub</a>. To
   build the extension from source, run the following on the command
   line, replacing the paths with those of the local PHP
   installation.
  </p>
  <div class="example" id="example-4">
   <p><strong>Example #4 Building Yac from source</strong></p>
   <div class="example-contents">
<div class="shellcode"><pre class="shellcode">/path/to/phpize
./configure --with-php-config=/path/to/php-config
make &amp;&amp; make install</pre>
</div>
   </div>

  </div>
  <p class="simpara">
   The following <code class="literal">configure</code> options are available:
  </p>
  <p class="simpara">
   Values are compressed with LZ4 before being stored. The LZ4
   compression backend was introduced in Yac 2.4.0, replacing the
   earlier FastLZ. By default, Yac uses the LZ4 copy bundled with the
   extension; no extra flag is needed. To link against the system LZ4
   library instead, use the
   <strong class="option configure">--with-system-lz4</strong> switch, which
   requires the <code class="literal">lz4.h</code> header and
   <code class="literal">liblz4</code> to be installed.
  </p>
  <p class="simpara">
   Alternative serializers can be compiled in with
   <strong class="option configure">--enable-json</strong>,
   <strong class="option configure">--enable-msgpack</strong> or
   <strong class="option configure">--enable-igbinary</strong>, which register the
   corresponding extension as an optional dependency. The serializer used at
   runtime is selected with the
   <a href="yac.configuration.php#ini.yac.serializer" class="link">yac.serializer</a> ini directive.
  </p>
 </div><?php manual_footer($setup); ?>