Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
12 changes: 6 additions & 6 deletions install/macos/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<!-- $Revision$ -->
<chapter xml:id="install.macosx" xmlns="http://docbook.org/ns/docbook">
<title>Installation on macOS</title>
<para>
This section contains notes and hints specific to installing PHP on macOS.
PHP is bundled with macOS since macOS X (10.0.0) prior to macOS Monterey (12.0.0).
Compiling is similar to the <link linkend="install.unix">Unix installation guide</link>.
</para>
<simpara>
PHP was bundled with macOS in versions 10 and 11, but is not included in versions
since macOS 12 (Monterey). Installation on recent versions either requires using
packages from third-party sources, or compilation from source.
</simpara>
&install.macos.packages;
&install.macos.bundled;
&install.macos.compile;
&install.macos.bundled;
</chapter>

<!-- Keep this comment at the end of the file
Expand Down
64 changes: 24 additions & 40 deletions install/macos/packages.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect1 xml:id="install.macosx.packages" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Using Packages</title>
<title>Installation on macOS using third-party packages</title>
<simpara>
There are a few pre-packaged and pre-compiled versions of PHP for
macOS. This can help in setting up a standard
Expand All @@ -13,49 +13,33 @@
version of PHP with the features you need.
</simpara>
<simpara>
The quickest way to install php on macOS is with homebrew:
An easy way to install PHP on macOS is with the
<link xlink:href="https://brew.sh/">Homebrew</link> packaging manager.
</simpara>
<para>
<orderedlist>
<listitem>
<para>
install homebrew, by following the instructions at <link xlink:href="https://brew.sh/">brew.sh</link>
</para>
</listitem>
<listitem>
<simpara>
brew install php
</simpara>
</listitem>
</orderedlist>
</para>
<orderedlist>
<listitem>
<para>
Install Homebrew by following the instructions on the website.
</para>
</listitem>
<listitem>
<simpara>
<command>brew install php</command>
</simpara>
</listitem>
</orderedlist>
<simpara>
The following alternative resources also offer easy to install packages and
precompiled binaries for PHP on Mac OS:
precompiled binaries for PHP on macOS:
</simpara>
<para>
<itemizedlist>
<listitem>
<simpara>
MacPorts:
<link xlink:href="&url.mac.macports;">&url.mac.macports;</link>
</simpara>
</listitem>
<listitem>
<simpara>
Liip:
<link xlink:href="&url.mac.liip;">&url.mac.liip;</link>
(PHP 5.3 - PHP 7.3; deprecated)
</simpara>
</listitem>
<listitem>
<simpara>
Fink:
<link xlink:href="&url.mac.fink;">&url.mac.fink;</link>
</simpara>
</listitem>
</itemizedlist>
</para>
<simplelist>
<member>
<link xlink:href="&url.mac.macports;">MacPorts</link>
</member>
<member>
<link xlink:href="&url.mac.fink;">Fink</link>
</member>
</simplelist>
</sect1>

<!-- Keep this comment at the end of the file
Expand Down
46 changes: 16 additions & 30 deletions install/unix/debian.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect1 xml:id="install.unix.debian" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Debian GNU/Linux installation notes</title>
<title>Installing from packages on Debian GNU/Linux and related distributions</title>
<para>
This section contains notes and hints specific to installing
PHP on <link xlink:href="&url.debian;">Debian GNU/Linux</link>.
While PHP can be installed from source, it is also available through
packages from <link xlink:href="&url.debian;">Debian GNU/Linux</link>.
This is also true for other distributions based on Debian, such as
Ubuntu, Kali Linux, and Linux Mint.
</para>
<warning>
<para>
Unofficial builds from third-parties are not supported here. Any bugs
should be reported to the Debian team unless they can be reproduced using
the latest builds from our <link xlink:href="&url.php.downloads;">download
area</link>.
</para>
</warning>
&warn.install.third-party-support;
<para>
While the instructions for building PHP on Unix apply to Debian as well,
this manual page contains specific information for other options, such as
using either the <literal>apt</literal> or <literal>aptitude</literal>
commands. This manual page uses these two commands interchangeably.
The packages can be installed using either the <command>apt</command> or
<command>aptitude</command> commands. This manual page uses these two
commands interchangeably.
</para>
<sect2 xml:id="install.unix.debian.apt">
<title>Using APT</title>
Expand Down Expand Up @@ -63,7 +57,7 @@
<link linkend="book.mysql">MySQL</link>,
<link linkend="book.curl">cURL</link>,
<link linkend="book.image">GD</link>,
etc. These may also be installed via the <literal>apt</literal> command.
etc. These may also be installed via the <command>apt</command> command.
</simpara>
<example xml:id="install.unix.debian.config.example">
<title>Methods for listing additional PHP packages</title>
Expand All @@ -76,12 +70,12 @@
</programlisting>
</example>
<simpara>
The examples will show a lot of packages including several PHP specific ones
like php-cgi, php-cli and php-dev. Determine which are needed
and install them like any other with either <literal>apt</literal>
or <literal>aptitude</literal>. And because Debian performs
dependency checks, it'll prompt for those so for example to install
MySQL and cURL:
The list of packages will include a large number of packages that includes
basic PHP components, such as <literal>php-cgi</literal>,
<literal>php-cli</literal>, and <literal>php-dev</literal>, as well as
many PHP extensions. 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.debian.config.example2">
<title>Install PHP with MySQL, cURL</title>
Expand Down Expand Up @@ -119,14 +113,6 @@
server was restarted after installation.
</simpara>
</listitem>
<listitem>
<simpara>
There are two basic commands for installing packages on Debian (and other
linux variants): <literal>apt</literal> and <literal>aptitude</literal>.
However, explaining the subtle differences between these commands goes
beyond the scope of this manual.
</simpara>
</listitem>
</itemizedlist>
</sect2>
</sect1>
Expand Down
116 changes: 116 additions & 0 deletions install/unix/dnf.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect1 xml:id="install.unix.dnf" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Installing from packages on GNU/Linux distributions that use DNF</title>
<simpara>
While PHP can be installed from source, it is also available through
packages on systems that use DNF, such as Red Hat Enterprise Linux,
OpenSUSE, Fedora, CentOS, Rocky Linux, and Oracle Enterprise Linux.
</simpara>
&warn.install.third-party-support;
<simpara>
The packages can be installed using the <command>dnf</command> command.
</simpara>
<sect2 xml:id="install.unix.dnf.packages">
<title>Installing packages</title>
<simpara>
First, note that other related packages may be desired like
<literal>php-pear</literal> for <link xlink:href="&url.pear;">PEAR</link>,
or <literal>php-mysqlnd</literal> for the <link linkend="book.mysqlnd">MySQL
extension</link>.
</simpara>
<simpara>
Second, before installing a package, it's wise to ensure the package list
is up to date. Typically, this is done by running the command
<command>dnf update</command>.
</simpara>
<example xml:id="install.unix.dnf.example">
<title>DNF Install Example</title>
<programlisting role="shell">
<![CDATA[
# dnf install php php-common
]]>
</programlisting>
</example>
<simpara>
DNF will automatically install the configuration for PHP for the web server,
but it may need to be restarted in order for the changes to take effect.
For example:
</simpara>
<example xml:id="install.unix.dnf.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.dnf.config">
<title>Better control of configuration</title>
<para>
In the last section, PHP was installed with only core modules. It's
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>dnf</command> command.
</para>
<example xml:id="install.unix.dnf.config.example">
<title>Methods for listing additional PHP packages</title>
<programlisting role="shell">
<![CDATA[
# dnf search php
]]>
</programlisting>
</example>
<simpara>
The list of packages will include a large number of packages that includes
basic PHP components, such as <literal>php-cli</literal>,
<literal>php-fpm</literal>, and <literal>php-devel</literal>, as well as
many PHP extensions. 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.dnf.config.example2">
<title>Install PHP with MySQL, GD</title>
<programlisting role="shell">
<![CDATA[
# dnf install php-mysqlnd php-gd
]]>
</programlisting>
</example>
<simpara>
DNF will automatically add the appropriate lines to the
different &php.ini; related files like
<filename>/etc/php/8.3/php.ini</filename>,
<filename>/etc/php/8.3/conf.d/*.ini</filename>, etc. and depending on
the extension will add entries similar to <literal>extension=foo.so</literal>.
However, restarting the web server (like Apache) is required before these
changes take affect.
</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
-->
Loading