<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/install.unix.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'es',
  ),
  'this' => 
  array (
    0 => 'install.unix.pacman.php',
    1 => 'Installing from packages on Arch Linux',
    2 => 'Installing from packages on Arch Linux',
  ),
  'up' => 
  array (
    0 => 'install.unix.php',
    1 => 'Instalaci&oacute;n en sistemas Unix',
  ),
  'prev' => 
  array (
    0 => 'install.unix.alpine.php',
    1 => 'Installing from packages on Alpine Linux',
  ),
  'next' => 
  array (
    0 => 'install.unix.openbsd.php',
    1 => 'Instalaci&oacute;n desde paquetes o puertos en OpenBSD',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'install/unix/pacman.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="install.unix.pacman" class="sect1">
 <h2 class="title">Installing from packages on Arch Linux</h2>
 <p class="simpara">
  While PHP can be installed from source, it is also available through
  packages on Arch Linux and derivatives that use pacman.
 </p>
 <div class="warning"><strong class="warning">Advertencia</strong>
 <p class="simpara">
  Las versiones provenientes de terceros son consideradas no oficiales y
  no son directamente soportadas por el proyecto PHP. Cualquier bug encontrado debe ser reportado al proveedor
  de estas versiones no oficiales, a menos que pueda ser reproducido utilizando las versiones
  provenientes de <a href="https://www.php.net/downloads.php" class="link external">&raquo;&nbsp; la zona de descargas
  oficial</a>.
 </p>
</div>
 <p class="simpara">
  The packages can be installed using the <strong class="command">pacman</strong> command.
 </p>
 <div class="sect2" id="install.unix.pacman.packages">
  <h3 class="title">Installing packages</h3>
  <p class="simpara">
   First, note that other related packages may be desired, such as
   <code class="literal">php-apache</code> for <a href="install.unix.apache2.php" class="link">Apache</a>,
   or <code class="literal">php-fpm</code> for FastCGI setups.
  </p>
  <p class="simpara">
   Before installing a package, it is recommended to ensure the system
   is up to date. Typically, this is done by running the command
   <strong class="command">pacman -Syu</strong>.
  </p>
  <div class="example" id="install.unix.pacman.example">
   <p><strong>Ejemplo #1 Pacman Install Example with Apache</strong></p>
   <div class="example-contents">
<div class="shellcode"><pre class="shellcode"># pacman -S php php-apache</pre>
</div>
   </div>

  </div>
  <p class="simpara">
   Pacman will automatically install all dependencies for PHP.
   The web server may need to be restarted in order for the changes to
   take effect. For example:
  </p>
  <div class="example" id="install.unix.pacman.example2">
   <p><strong>Ejemplo #2 Restarting Apache once PHP is installed</strong></p>
   <div class="example-contents">
<div class="shellcode"><pre class="shellcode"># systemctl restart httpd</pre>
</div>
   </div>

  </div>
 </div>
 <div class="sect2" id="install.unix.pacman.config">
  <h3 class="title">Better control of configuration</h3>
  <p class="para">
   In the last section, PHP was installed with only core modules. It is
   very likely that additional modules will be desired, such as
   <span class="simplelist"><a href="book.mysql.php" class="link">MySQL</a>, <a href="book.curl.php" class="link">cURL</a>, <a href="book.image.php" class="link">GD</a>, etc.</span>
   These may also be installed via the <strong class="command">pacman</strong> command.
  </p>
  <div class="example" id="install.unix.pacman.config.example">
   <p><strong>Ejemplo #3 Methods for listing additional PHP packages</strong></p>
   <div class="example-contents">
<div class="shellcode"><pre class="shellcode"># pacman -Ss php</pre>
</div>
   </div>

  </div>
  <p class="simpara">
   The list of packages will include a number of packages that includes
   PHP extensions such as <code class="literal">php-gd</code>,
   <code class="literal">php-intl</code>, <code class="literal">php-sqlite</code>, and others.
   When extensions are installed, additional packages
   will be automatically installed as necessary to satisfy the dependencies
   of those packages.
  </p>
  <div class="example" id="install.unix.pacman.config.example2">
   <p><strong>Ejemplo #4 Install PHP with GD</strong></p>
   <div class="example-contents">
<div class="shellcode"><pre class="shellcode"># pacman -S php-gd</pre>
</div>
   </div>

  </div>
  <p class="simpara">
   After installing an extension package, the corresponding entry in
   <var class="filename">/etc/php/php.ini</var> must be uncommented to enable it.
   For example, after installing <code class="literal">php-gd</code>, uncomment the line
   <code class="literal">extension=gd</code> in <var class="filename">/etc/php/php.ini</var>.
   Restarting the web server (like Apache) is required before these
   changes take effect.
  </p>
 </div>
</div><?php manual_footer($setup); ?>