Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions install/unix/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
109 changes: 109 additions & 0 deletions install/unix/pacman.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<?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>
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</title>
<programlisting role="shell">
<![CDATA[
# pacman -S php
]]>
</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[
# sudo 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 MySQL, GD</title>
<programlisting role="shell">
<![CDATA[
# pacman -S php-gd
]]>
</programlisting>
</example>
<simpara>
Pacman will automatically add the appropriate lines to the
different &php.ini; related files like
<filename>/etc/php/php.ini</filename>,
<filename>/etc/php/conf.d/*.ini</filename>, etc. and depending on
the extension will add entries similar to <literal>extension=foo</literal>.
However, 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
-->