install/unix/openbsd.xml
093eb6affefe2ef930b08043a668168d2181ecc1
...
...
@@ -4,7 +4,7 @@
4
4
<title>OpenBSD installation notes</title>
5
5
<para>
6
6
This section contains notes and hints specific to installing
7
-
PHP on <link xlink:href="&url.openbsd;">OpenBSD 3.6</link>.
7
+
PHP on <link xlink:href="&url.openbsd;">OpenBSD</link>.
8
8
</para>
9
9
<sect2 xml:id="install.unix.openbsd.packages">
10
10
<title>Using Binary Packages</title>
...
...
@@ -15,30 +15,30 @@
15
15
The files you need can be found on your OpenBSD CD or on the FTP site.
16
16
</simpara>
17
17
<simpara>
18
-
The main package you need to install is <filename>php4-core-4.3.8.tgz</filename>,
19
-
which contains the basic engine (plus gettext and iconv). Next, take a look
20
-
at the module packages, such as <filename>php4-mysql-4.3.8.tgz</filename>
21
-
or <filename>php4-imap-4.3.8.tgz</filename>. You need to use the <command>phpxs</command>
18
+
The main package you need to install is <filename>php</filename>,
19
+
which contains the basic engine (plus fpm, gettext and iconv) and might be
20
+
available in several versions to choose from. Next, take a look
21
+
at the module packages, such as <filename>php-mysqli</filename>
22
+
or <filename>php-imap</filename>. You need to use the <command>phpxs</command>
22
23
command to activate and deactivate these modules in your &php.ini;.
23
24
</simpara>
24
25
<example xml:id="install.unix.openbsd.ports.example">
25
26
<title>OpenBSD Package Install Example</title>
26
27
<programlisting role="shell">
27
28
<![CDATA[
28
-
# pkg_add php4-core-4.3.8.tgz
29
-
# /usr/local/sbin/phpxs -s
30
-
# cp /usr/local/share/doc/php4/php.ini-recommended /var/www/conf/php.ini
31
-
(add in mysql)
32
-
# pkg_add php4-mysql-4.3.8.tgz
33
-
# /usr/local/sbin/phpxs -a mysql
34
-
(add in imap)
35
-
# pkg_add php4-imap-4.3.8.tgz
36
-
# /usr/local/sbin/phpxs -a imap
37
-
(remove mysql as a test)
38
-
# pkg_delete php4-mysql-4.3.8
39
-
# /usr/local/sbin/phpxs -r mysql
29
+
# pkg_add php
30
+
# pkg_add php-apache
31
+
# pkg_add php-mysqli
40
32
(install the PEAR libraries)
41
-
# pkg_add php4-pear-4.3.8.tgz
33
+
# pkg_add pear
34
+

35
+
Follow the instructions shown with each package!
36
+

37
+
(to remove packages)
38
+
# pkg_delete php
39
+
# pkg_delete php-apache
40
+
# pkg_delete php-mysqli
41
+
# pkg_delete pear
42
42
]]>
43
43
</programlisting>
44
44
</example>
...
...
@@ -51,9 +51,9 @@
51
51
<title>Using Ports</title>
52
52
<simpara>
53
53
You can also compile up PHP from source using the <link xlink:href="&url.openbsd.ports;">ports tree</link>.
54
-
However, this is only recommended for users familiar with OpenBSD. The PHP 4 port
55
-
is split into two sub-directories: core and extensions. The
56
-
extensions directory generates sub-packages for all of the supported
54
+
However, this is only recommended for users familiar with OpenBSD. The PHP port
55
+
is split into core and extensions. The
56
+
extensions generate sub-packages for all of the supported
57
57
PHP modules. If you find you do not want to create some of these modules,
58
58
use the <command>no_*</command> FLAVOR. For example, to skip building
59
59
the imap module, set the FLAVOR to <command>no_imap</command>.
...
...
@@ -63,7 +63,12 @@
63
63
<title>Common Problems</title>
64
64
<itemizedlist>
65
65
<listitem>
66
-
<simpara>The default install of Apache runs inside a
66
+
<simpara>Apache and Nginx are no longer the default server on OpenBSD, but they can both be easily
67
+
found in ports and packages. The new default server is also called 'httpd'.
68
+
</simpara>
69
+
</listitem>
70
+
<listitem>
71
+
<simpara>The default install of httpd runs inside a
67
72
<link xlink:href="&url.openbsd.chroot;">chroot(2) jail</link>, which will restrict PHP scripts to
68
73
accessing files under <filename>/var/www</filename>. You will therefore need to create a
69
74
<filename>/var/www/tmp</filename> directory for PHP session files to be stored, or use an
...
...
@@ -71,32 +76,20 @@
71
76
jail or listen on the <filename>localhost</filename> interface. If you use network functions,
72
77
some files from <filename>/etc</filename> such as <filename>/etc/resolv.conf</filename> and
73
78
<filename>/etc/services</filename> will need to be moved into <filename>/var/www/etc</filename>.
74
-
The OpenBSD PEAR package automatically installs into the correct chroot directories, so
75
-
no special modification is needed there. More information on the OpenBSD Apache is available
76
-
in the <link xlink:href="&url.openbsd.apachefaq;">OpenBSD FAQ</link>.
79
+
The OpenBSD PEAR package automatically installs into the correct chroot directories.
77
80
</simpara>
78
81
</listitem>
79
82
<listitem>
80
83
<simpara>
81
-
The OpenBSD 3.6 package for the <link xlink:href="&url.gd;">gd</link> extension requires
82
-
XFree86 to be installed. If you do not wish to use some of the font features that
83
-
require X11, install the <filename>php4-gd-4.3.8-no_x11.tgz</filename> package instead.
84
+
The OpenBSD package for the <link xlink:href="&url.gd;">gd</link> extension
85
+
requires Xorg to be installed. Unless already installed at base install by
86
+
adding the <filename>xbase.tgz</filename> file set, this can be added at
87
+
post-installation (see
88
+
<link xlink:href="https://www.openbsd.org/faq/faq4.html#FilesNeeded">OpenBSD FAQ#4</link>).
84
89
</simpara>
85
90
</listitem>
86
91
</itemizedlist>
87
92
</sect2>
88
-
89
-
<sect2 xml:id="install.unix.openbsd.older">
90
-
<title>Older Releases</title>
91
-
<simpara>
92
-
Older releases of OpenBSD used the FLAVORS system to compile up
93
-
a statically linked PHP. Since it is hard to generate binary packages using
94
-
this method, it is now deprecated. You can still use the old stable
95
-
ports trees if you wish, but they are unsupported by the OpenBSD team.
96
-
If you have any comments about this, the current maintainer for the port
97
-
is Anil Madhavapeddy (avsm at openbsd dot org).
98
-
</simpara>
99
-
</sect2>
100
93
</sect1>
101
94

102
95
<!-- Keep this comment at the end of the file
103
96