-
Notifications
You must be signed in to change notification settings - Fork 788
/
Copy pathopenbsd.xml
114 lines (111 loc) · 4.49 KB
/
openbsd.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<?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>Installing from packages or ports on OpenBSD</title>
<para>
This section contains notes and hints specific to installing
PHP on <link xlink:href="&url.openbsd;">OpenBSD</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 fpm, gettext and iconv) and might be
available in several versions to choose from. Next, take a look
at the module packages, such as <filename>php-mysqli</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-apache
# pkg_add php-mysqli
(install the PEAR libraries)
# pkg_add pear
Follow the instructions shown with each package!
(to remove packages)
# pkg_delete php
# pkg_delete php-apache
# pkg_delete php-mysqli
# 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 port
is split into core and extensions. The
extensions generate 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 package for the <link xlink:href="&url.gd;">gd</link> extension
requires Xorg to be installed. Unless already installed at base install by
adding the <filename>xbase.tgz</filename> file set, this can be added at
post-installation (see
<link xlink:href="&url.openbsd.faq4;">OpenBSD FAQ#4</link>).
</simpara>
</listitem>
</itemizedlist>
</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
-->