php-doc-en/install/unix/openbsd.xml
Leigh d4fc928c24 Updated OpenBSD install docs.
From anonymous contributor, but changes look good.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@339171 c90b9560-bf6c-de11-be94-00142212c4b1
2016-05-16 10:32:50 +00:00

123 lines
4.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect1 xml:id="install.unix.openbsd" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>OpenBSD installation notes</title>
<para>
This section contains notes and hints specific to installing
PHP on <link xlink:href="&url.openbsd;">OpenBSD 5.8</link>.
</para>
<sect2 xml:id="install.unix.openbsd.packages">
<title>Using Binary Packages</title>
<simpara>
Using binary packages to install PHP on OpenBSD is the recommended
and simplest method. The core package has been separated from the various
modules, and each can be installed and removed independently from the others.
The files you need can be found on your OpenBSD CD or on the FTP site.
</simpara>
<simpara>
The main package you need to install is <filename>php</filename>,
which contains the basic engine (plus gettext and iconv). Next, take a look
at the module packages, such as <filename>php-mysql</filename>
or <filename>php-imap</filename>. You need to use the <command>phpxs</command>
command to activate and deactivate these modules in your &php.ini;.
</simpara>
<example xml:id="install.unix.openbsd.ports.example">
<title>OpenBSD Package Install Example</title>
<programlisting role="shell">
<![CDATA[
# pkg_add php
# pkg_add php-fpm
# pkg_add php-mysql
(install the PEAR libraries)
# pkg_add pear
Follow the instructions shown with each package!
(to remove packages)
# pkg_delete php
# pkg_delete php-fpm
# pkg_delete php-mysql
# pkg_delete pear
]]>
</programlisting>
</example>
<simpara>
Read the <link xlink:href="&url.openbsd.packages;">packages(7)</link>
manual page for more information about binary packages on OpenBSD.
</simpara>
</sect2>
<sect2 xml:id="install.unix.openbsd.ports">
<title>Using Ports</title>
<simpara>
You can also compile up PHP from source using the <link xlink:href="&url.openbsd.ports;">ports tree</link>.
However, this is only recommended for users familiar with OpenBSD. The PHP 4 port
is split into two sub-directories: core and extensions. The
extensions directory generates sub-packages for all of the supported
PHP modules. If you find you do not want to create some of these modules,
use the <command>no_*</command> FLAVOR. For example, to skip building
the imap module, set the FLAVOR to <command>no_imap</command>.
</simpara>
</sect2>
<sect2 xml:id="install.unix.openbsd.faq">
<title>Common Problems</title>
<itemizedlist>
<listitem>
<simpara>Apache and Nginx are no longer the default server on OpenBSD, but they can both be easily
found in ports and packages. The new default server is also called 'httpd'.
</simpara>
</listitem>
<listitem>
<simpara>The default install of httpd runs inside a
<link xlink:href="&url.openbsd.chroot;">chroot(2) jail</link>, which will restrict PHP scripts to
accessing files under <filename>/var/www</filename>. You will therefore need to create a
<filename>/var/www/tmp</filename> directory for PHP session files to be stored, or use an
alternative session backend. In addition, database sockets need to be placed inside the
jail or listen on the <filename>localhost</filename> interface. If you use network functions,
some files from <filename>/etc</filename> such as <filename>/etc/resolv.conf</filename> and
<filename>/etc/services</filename> will need to be moved into <filename>/var/www/etc</filename>.
The OpenBSD PEAR package automatically installs into the correct chroot directories.
</simpara>
</listitem>
<listitem>
<simpara>
The OpenBSD 5.7+ package for the <link xlink:href="&url.gd;">gd</link> extension requires
XFree86 to be installed. This can be added post-installation (See OpenBSD FAQ#4) by adding
the <filename>xbase.tgz</filename> file set.
</simpara>
</listitem>
</itemizedlist>
</sect2>
<sect2 xml:id="install.unix.openbsd.older">
<title>Older Releases</title>
<simpara>
Older releases of OpenBSD used the FLAVORS system to compile up
a statically linked PHP. Since it is hard to generate binary packages using
this method, it is now deprecated. You can still use the old stable
ports trees if you wish, but they are unsupported by the OpenBSD team.
If you have any comments about this, the current maintainer for the port
is Anil Madhavapeddy (avsm at openbsd dot org).
</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
-->