Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 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
24 changes: 8 additions & 16 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,45 +13,37 @@
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>
Install Homebrew by following the instructions on the website.
</para>
</listitem>
<listitem>
<simpara>
brew install php
<command>brew install php</command>
</simpara>
</listitem>
</orderedlist>
</para>
<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>
Comment thread
jimwins marked this conversation as resolved.
Outdated
<simpara>
MacPorts:
<link xlink:href="&url.mac.macports;">&url.mac.macports;</link>
<link xlink:href="&url.mac.macports;">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>
<link xlink:href="&url.mac.fink;">Fink</link>
</simpara>
</listitem>
</itemizedlist>
Expand Down
34 changes: 14 additions & 20 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.
Comment thread
jimwins marked this conversation as resolved.
</simpara>
<example xml:id="install.unix.debian.config.example">
<title>Methods for listing additional PHP packages</title>
Expand All @@ -78,8 +72,8 @@
<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
and install them like any other with either <command>apt</command>
or <command>aptitude</command>. And because Debian performs
dependency checks, it'll prompt for those so for example to install
MySQL and cURL:
</simpara>
Expand Down Expand Up @@ -121,8 +115,8 @@
</listitem>
<listitem>
<simpara>
There are two basic commands for installing packages on Debian (and other
linux variants): <literal>apt</literal> and <literal>aptitude</literal>.
There are two basic commands for installing packages on Debian:
<command>apt</command> and <command>aptitude</command>.
However, explaining the subtle differences between these commands goes
beyond the scope of this manual.
</simpara>
Expand Down
113 changes: 113 additions & 0 deletions install/unix/dnf.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
<?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>
<para>
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.
</para>
Comment thread
jimwins marked this conversation as resolved.
Outdated
&warn.install.third-party-support;
<para>
The packages can be installed using the <command>dnf</command> command.
</para>
Comment thread
jimwins marked this conversation as resolved.
Outdated
<sect2 xml:id="install.unix.dnf.packages">
<title>Installing packages</title>
<simpara>
First, note that other related packages may be desired like
Comment thread
jimwins marked this conversation as resolved.
Outdated
<literal>php-pear</literal> for PEAR, or <literal>php-mysqlnd</literal>
for the MySQL extension.
Comment thread
jimwins marked this conversation as resolved.
Outdated
</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>
<simpara>
In the last section, PHP was installed with only core modules. It's
very likely that additional modules will be desired, such as
<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 <command>dnf</command> command.
</simpara>
Comment thread
jimwins marked this conversation as resolved.
Outdated
<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 examples will show a lot of packages including several PHP specific ones
like php-cgi, php-cli and php-dev. Determine which are needed
Comment thread
jimwins marked this conversation as resolved.
Outdated
and install them like any other with <command>dnf</command>.
Because the package manager does
dependency checks, it'll prompt for those. For example, to install
Comment thread
jimwins marked this conversation as resolved.
Outdated
MySQL and cURL:
</simpara>
<example xml:id="install.unix.dnf.config.example2">
<title>Install PHP with MySQL, cURL</title>
<programlisting role="shell">
<![CDATA[
# dnf install php-mysqlnd php-curl
]]>
</programlisting>
</example>
<simpara>
Comment thread
jimwins marked this conversation as resolved.
Outdated
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>
Comment thread
jimwins marked this conversation as resolved.
</sect1>

<!-- Keep this comment at the end of the file
Local variables:
Comment thread
jimwins marked this conversation as resolved.
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