[DOC-CVS] [doc-en] master: Add install documentation for Arch Linux (pacman) (#5259)
[email protected] (Louis-Arnaud via GitHub)
| Newsgroups | php.doc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: Louis-Arnaud (lacatoire) Committer: GitHub (web-flow) Pusher: lacatoire Date: 2026-08-27T11:11:40+02:00 Commit: https://github.com/php/doc-en/commit/f0f5d8646b835280b44b1d95277e3881be931cd9 Raw diff: https://github.com/php/doc-en/commit/f0f5d8646b835280b44b1d95277e3881be931cd9.diff Add install documentation for Arch Linux (pacman) (#5259) * Add install documentation for Arch Linux (pacman) * fix(pacman): correct Apache integration and extension activation - Add php-apache to the install example (pacman -S php alone does not enable PHP in Apache on Arch Linux) - Add mention of php-fpm for FastCGI setups - Remove sudo from systemctl command (# prompt implies root) - Fix example title: 'Install PHP with MySQL, GD' -> 'Install PHP with GD' to match the actual command (pacman -S php-gd) - Correct the extension activation paragraph: on Arch, pacman does not automatically add lines to php.ini; the user must manually uncomment the relevant extension= line in /etc/php/php.ini Changed paths: A install/unix/pacman.xml M install/unix/index.xml Diff: diff --git a/install/unix/index.xml b/install/unix/index.xml index 6ce92ac5d93a..646d001dd396 100644 --- a/install/unix/index.xml +++ b/install/unix/index.xml @@ -27,6 +27,7 @@ <!-- distribution specific nodes --> &install.unix.debian; &install.unix.dnf; + &install.unix.pacman; &install.unix.openbsd; <!-- general from-source instructions --> &install.unix.source; diff --git a/install/unix/pacman.xml b/install/unix/pacman.xml new file mode 100644 index 000000000000..ba6113ba1f2e --- /dev/null +++ b/install/unix/pacman.xml @@ -0,0 +1,113 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision$ --> +<sect1 xml:id="install.unix.pacman" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> + <title>Installing from packages on Arch Linux</title> + <simpara> + While PHP can be installed from source, it is also available through + packages on Arch Linux and derivatives that use pacman. + </simpara> + &warn.install.third-party-support; + <simpara> + The packages can be installed using the <command>pacman</command> command. + </simpara> + <sect2 xml:id="install.unix.pacman.packages"> + <title>Installing packages</title> + <simpara> + First, note that other related packages may be desired, such as + <literal>php-apache</literal> for <link linkend="install.unix.apache2">Apache</link>, + or <literal>php-fpm</literal> for FastCGI setups. + </simpara> + <simpara> + Before installing a package, it is recommended to ensure the system + is up to date. Typically, this is done by running the command + <command>pacman -Syu</command>. + </simpara> + <example xml:id="install.unix.pacman.example"> + <title>Pacman Install Example with Apache</title> + <programlisting role="shell"> +<![CDATA[ +# pacman -S php php-apache +]]> + </programlisting> + </example> + <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: + </simpara> + <example xml:id="install.unix.pacman.example2"> + <title>Restarting Apache once PHP is installed</title> + <programlisting role="shell"> +<![CDATA[ +# systemctl restart httpd +]]> + </programlisting> + </example> + </sect2> + <sect2 xml:id="install.unix.pacman.config"> + <title>Better control of configuration</title> + <para> + In the last section, PHP was installed with only core modules. It is + very likely that additional modules will be desired, such as + <simplelist type="inline"> + <member><link linkend="book.mysql">MySQL</link></member> + <member><link linkend="book.curl">cURL</link></member> + <member><link linkend="book.image">GD</link></member> + <member>etc.</member> + </simplelist> + These may also be installed via the <command>pacman</command> command. + </para> + <example xml:id="install.unix.pacman.config.example"> + <title>Methods for listing additional PHP packages</title> + <programlisting role="shell"> +<![CDATA[ +# pacman -Ss php +]]> + </programlisting> + </example> + <simpara> + The list of packages will include a number of packages that includes + PHP extensions such as <literal>php-gd</literal>, + <literal>php-intl</literal>, <literal>php-sqlite</literal>, and others. + When extensions are installed, additional packages + will be automatically installed as necessary to satisfy the dependencies + of those packages. + </simpara> + <example xml:id="install.unix.pacman.config.example2"> + <title>Install PHP with GD</title> + <programlisting role="shell"> +<![CDATA[ +# pacman -S php-gd +]]> + </programlisting> + </example> + <simpara> + After installing an extension package, the corresponding entry in + <filename>/etc/php/php.ini</filename> must be uncommented to enable it. + For example, after installing <literal>php-gd</literal>, uncomment the line + <literal>extension=gd</literal> in <filename>/etc/php/php.ini</filename>. + Restarting the web server (like Apache) is required before these + changes take effect. + </simpara> + </sect2> +</sect1> +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +-->