|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<!-- $Revision$ --> |
| 3 | +<sect1 xml:id="install.unix.pacman" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 4 | + <title>Installing from packages on Arch Linux</title> |
| 5 | + <simpara> |
| 6 | + While PHP can be installed from source, it is also available through |
| 7 | + packages on Arch Linux and derivatives that use pacman. |
| 8 | + </simpara> |
| 9 | + &warn.install.third-party-support; |
| 10 | + <simpara> |
| 11 | + The packages can be installed using the <command>pacman</command> command. |
| 12 | + </simpara> |
| 13 | + <sect2 xml:id="install.unix.pacman.packages"> |
| 14 | + <title>Installing packages</title> |
| 15 | + <simpara> |
| 16 | + First, note that other related packages may be desired, such as |
| 17 | + <literal>php-apache</literal> for <link linkend="install.unix.apache2">Apache</link>, |
| 18 | + or <literal>php-fpm</literal> for FastCGI setups. |
| 19 | + </simpara> |
| 20 | + <simpara> |
| 21 | + Before installing a package, it is recommended to ensure the system |
| 22 | + is up to date. Typically, this is done by running the command |
| 23 | + <command>pacman -Syu</command>. |
| 24 | + </simpara> |
| 25 | + <example xml:id="install.unix.pacman.example"> |
| 26 | + <title>Pacman Install Example with Apache</title> |
| 27 | + <programlisting role="shell"> |
| 28 | +<![CDATA[ |
| 29 | +# pacman -S php php-apache |
| 30 | +]]> |
| 31 | + </programlisting> |
| 32 | + </example> |
| 33 | + <simpara> |
| 34 | + Pacman will automatically install all dependencies for PHP. |
| 35 | + The web server may need to be restarted in order for the changes to |
| 36 | + take effect. For example: |
| 37 | + </simpara> |
| 38 | + <example xml:id="install.unix.pacman.example2"> |
| 39 | + <title>Restarting Apache once PHP is installed</title> |
| 40 | + <programlisting role="shell"> |
| 41 | +<![CDATA[ |
| 42 | +# systemctl restart httpd |
| 43 | +]]> |
| 44 | + </programlisting> |
| 45 | + </example> |
| 46 | + </sect2> |
| 47 | + <sect2 xml:id="install.unix.pacman.config"> |
| 48 | + <title>Better control of configuration</title> |
| 49 | + <para> |
| 50 | + In the last section, PHP was installed with only core modules. It is |
| 51 | + very likely that additional modules will be desired, such as |
| 52 | + <simplelist type="inline"> |
| 53 | + <member><link linkend="book.mysql">MySQL</link></member> |
| 54 | + <member><link linkend="book.curl">cURL</link></member> |
| 55 | + <member><link linkend="book.image">GD</link></member> |
| 56 | + <member>etc.</member> |
| 57 | + </simplelist> |
| 58 | + These may also be installed via the <command>pacman</command> command. |
| 59 | + </para> |
| 60 | + <example xml:id="install.unix.pacman.config.example"> |
| 61 | + <title>Methods for listing additional PHP packages</title> |
| 62 | + <programlisting role="shell"> |
| 63 | +<![CDATA[ |
| 64 | +# pacman -Ss php |
| 65 | +]]> |
| 66 | + </programlisting> |
| 67 | + </example> |
| 68 | + <simpara> |
| 69 | + The list of packages will include a number of packages that includes |
| 70 | + PHP extensions such as <literal>php-gd</literal>, |
| 71 | + <literal>php-intl</literal>, <literal>php-sqlite</literal>, and others. |
| 72 | + When extensions are installed, additional packages |
| 73 | + will be automatically installed as necessary to satisfy the dependencies |
| 74 | + of those packages. |
| 75 | + </simpara> |
| 76 | + <example xml:id="install.unix.pacman.config.example2"> |
| 77 | + <title>Install PHP with GD</title> |
| 78 | + <programlisting role="shell"> |
| 79 | +<![CDATA[ |
| 80 | +# pacman -S php-gd |
| 81 | +]]> |
| 82 | + </programlisting> |
| 83 | + </example> |
| 84 | + <simpara> |
| 85 | + After installing an extension package, the corresponding entry in |
| 86 | + <filename>/etc/php/php.ini</filename> must be uncommented to enable it. |
| 87 | + For example, after installing <literal>php-gd</literal>, uncomment the line |
| 88 | + <literal>extension=gd</literal> in <filename>/etc/php/php.ini</filename>. |
| 89 | + Restarting the web server (like Apache) is required before these |
| 90 | + changes take effect. |
| 91 | + </simpara> |
| 92 | + </sect2> |
| 93 | +</sect1> |
| 94 | +<!-- Keep this comment at the end of the file |
| 95 | +Local variables: |
| 96 | +mode: sgml |
| 97 | +sgml-omittag:t |
| 98 | +sgml-shorttag:t |
| 99 | +sgml-minimize-attributes:nil |
| 100 | +sgml-always-quote-attributes:t |
| 101 | +sgml-indent-step:1 |
| 102 | +sgml-indent-data:t |
| 103 | +indent-tabs-mode:nil |
| 104 | +sgml-parent-document:nil |
| 105 | +sgml-default-dtd-file:"~/.phpdoc/manual.ced" |
| 106 | +sgml-exposed-tags:nil |
| 107 | +sgml-local-catalogs:nil |
| 108 | +sgml-local-ecat-files:nil |
| 109 | +End: |
| 110 | +vim600: syn=xml fen fdm=syntax fdl=2 si |
| 111 | +vim: et tw=78 syn=sgml |
| 112 | +vi: ts=1 sw=1 |
| 113 | +--> |
0 commit comments