[doc-en] master: Add Alpine Linux installation documentation (#5266)
| From: | Louis-Arnaud via GitHub | Date: | Thu, 27 Aug 2026 12:35:06 +0000 |
| Subject: | [doc-en] master: Add Alpine Linux installation documentation (#5266) | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-23654@lists.php.net to get a copy of this message | ||
Author: Louis-Arnaud (lacatoire)
Committer: GitHub (web-flow)
Pusher: lacatoire
Date: 2026-08-27T14:35:04+02:00
Commit: https://github.com/php/doc-en/commit/5a5899391ef91a4d42bca9495c8a1d323d38f23a
Raw diff: https://github.com/php/doc-en/commit/5a5899391ef91a4d42bca9495c8a1d323d38f23a.diff
Add Alpine Linux installation documentation (#5266)
* Add Alpine Linux installation documentation
Fixes #3782
* fix(alpine): align structure with dnf/pacman and correct technical details
- Rewrite intro to match the established pattern (while PHP can be
installed from source...)
- Add missing simpara after &warn.install.third-party-support;
- Add version substitution note: replace 83 with the version available
on the Alpine release
- Remove redundant php83-common from apk add (auto-dependency of php83,
confirmed via Docker)
- Explain the php83-fpm package / php-fpm83 service naming difference
- Rename sect2 title to 'Better control of configuration' for consistency
with dnf.xml and pacman.xml
- Replace 'modules' with 'extensions' (correct PHP terminology)
- State explicitly that extensions are auto-enabled via conf.d on install
(confirmed via Docker: apk add php83-gd creates conf.d/00_gd.ini)
Changed paths:
A install/unix/alpine.xml
M install/unix/index.xml
Diff:
diff --git a/install/unix/alpine.xml b/install/unix/alpine.xml
new file mode 100644
index 000000000000..af35e4ce7ef2
--- /dev/null
+++ b/install/unix/alpine.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision$ -->
+<sect1 xml:id="install.unix.alpine" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
+ <title>Installing from packages on Alpine Linux</title>
+ <simpara>
+ While PHP can be installed from source, it is also available through
+ packages on Alpine Linux and derivatives that use the
+ <command>apk</command> package manager.
+ </simpara>
+ &warn.install.third-party-support;
+ <simpara>
+ The packages can be installed using the <command>apk</command> package manager.
+ </simpara>
+ <sect2 xml:id="install.unix.alpine.packages">
+ <title>Installing packages</title>
+ <simpara>
+ PHP packages in Alpine Linux include the major version number in their name
+ (e.g. <literal>php83</literal> for PHP 8.3). In the examples below, replace
+ <literal>83</literal> with the PHP version available on your Alpine Linux release.
+ </simpara>
+ <simpara>
+ Before installing a package, ensure the package index is up to
+ date by running <command>apk update</command>.
+ </simpara>
+ <example xml:id="install.unix.alpine.example">
+ <title>Alpine Install Example</title>
+ <programlisting role="shell">
+<![CDATA[
+# apk add php83
+]]>
+ </programlisting>
+ </example>
+ <simpara>
+ Alpine does not configure PHP for a web server automatically.
+ For FastCGI setups, install <literal>php83-fpm</literal> and enable
+ the <literal>php-fpm83</literal> OpenRC service (note that the package
+ name and the service name use different ordering of the version suffix).
+ For example:
+ </simpara>
+ <example xml:id="install.unix.alpine.example2">
+ <title>Enabling and starting PHP-FPM</title>
+ <programlisting role="shell">
+<![CDATA[
+# apk add php83-fpm
+# rc-update add php-fpm83 default
+# rc-service php-fpm83 start
+]]>
+ </programlisting>
+ </example>
+ </sect2>
+ <sect2 xml:id="install.unix.alpine.config">
+ <title>Better control of configuration</title>
+ <para>
+ Only the core extensions are installed with the base package. Additional
+ extensions 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>
+ can be installed as separate packages.
+ </para>
+ <example xml:id="install.unix.alpine.config.example">
+ <title>Searching for available PHP packages</title>
+ <programlisting role="shell">
+<![CDATA[
+# apk search php83
+]]>
+ </programlisting>
+ </example>
+ <simpara>
+ The list of packages includes the CLI, FPM, and many extensions.
+ When extensions are installed, their dependencies are automatically
+ resolved.
+ </simpara>
+ <example xml:id="install.unix.alpine.config.example2">
+ <title>Install PHP with MySQL, GD</title>
+ <programlisting role="shell">
+<![CDATA[
+# apk add php83-mysqli php83-gd
+]]>
+ </programlisting>
+ </example>
+ <simpara>
+ Extensions are automatically enabled when installed; no manual
+ &php.ini; editing is required. Configuration files are placed in
+ <filename>/etc/php83/conf.d/</filename>. After installing new
+ extensions, PHP-FPM (or the web server) needs to be restarted for
+ the changes to 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
+-->
diff --git a/install/unix/index.xml b/install/unix/index.xml
index 646d001dd396..31b9d8f97a5a 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.alpine;
&install.unix.pacman;
&install.unix.openbsd;
<!-- general from-source instructions -->