Hi,
for the archives I'd like to share a short report about successfull
installation of the web forum from http://www.punBB.org on an PC
running OpenBSD 3.7:
1) I've downloaded and installed (using pkg_add) the following packages
from ftp://ftp.de.openbsd.org/unix/OpenBSD/3.7/packages/i386/ :
php5-core-5.0.4
php5-pgsql-5.0.4
postgresql-client-7.4.3p2
postgresql-server-7.4.3p2
2) Then I followed the instructions printed by "pkg_info -D package_name"
for each of those packages and also the instructions listed in the file
/usr/local/share/doc/postgresql/README.OpenBSD
3) Prepended "index.php" to this line to /var/www/conf/httpd.conf :
DirectoryIndex index.php index.html
4) Added this line to /var/postgresql/data/postgresql.conf
unix_socket_directory = '/var/www/tmp'
5) Added 2 lines to /etc/rc.conf.local :
httpd_flags=""
postgresql=YES
6) Added this to /etc/rc.local:
if [ X"${postgresql}" = X"YES" -a -x /usr/local/bin/pg_ctl ]; then
su -l _postgresql -c "nohup /usr/local/bin/pg_ctl start \
-D /var/postgresql/data -l /var/postgresql/logfile \
-o '-D /var/postgresql/data'"
echo -n ' postgresql'
fi
7) and this to /etc/rc.shutdown :
if [ -f /var/postgresql/data/postmaster.pid ]; then
su -l _postgresql -c "/usr/local/bin/pg_ctl stop -m fast \
-D /var/postgresql/data"
rm -f /var/postgresql/data/postmaster.pid
fi
8) Then I unpacked http://www.punbb.org/download/punbb-1.2.6.tar.gz
and copied the content of the upload/ subdir into /var/www/htdocs/punbb
I've also download Russian.zip from that website and put it under
/var/www/htdocs/punbb/lang
9) The files and dirs under /var/www/htdocs/punbb belong to root:daemon
and the ones under /var/postgresql to the _postgresql user, but I had
to create an additional dir and to change few permissions:
mkdir /var/www/tmp (this dir holds the
postgresql unix socket)
chmod a+rwt /var/www/tmp
chgrp www /var/www/htdocs/punbb/{cache,img/avatars}
chmod g+rwt /var/www/htdocs/punbb/{cache,img/avatars}
10) Added a database and user to postgresql using createdb
and createuser
11) And finally used a trick when running (in a browser)
http://www.my.domain/punbb/install.php after a reboot:
I have entered "/tmp" without quotes into the "hostname"
text field - this made punBB to connect to the postgresql d/b
through the local unix socket /var/www/tmp/.s.PGSQL.5432
Thank you for OpenBSD and the well-tested packages.
Regards
Alex