On 2016-01-05, Stuart Henderson wrote:

> On 2016-01-05, Jordon <[email protected]> wrote:
> > Next, I think I need to get php working.  This is where I get stuck.
> > An email posted here last month mentioned getting php_fpm running,
> >but that package is not installed on my machine.  If that is a
> >requirement for racktables, shouldn't pkg_add install it?

I am the one who posted that e-mail last month as Stuard already told
you php-fpm is needed only for httpd from the base and Nginx. I am
running RackTables with httpd from the base and works very well in
chroot mode.


> 
> Whether or not php-fpm is a requirement depends on which webserver
> software you use. It's needed for nginx and the httpd from base, but
> isn't needed for Apache httpd.
> 
> > I did some searching for getting php running on httpd in openbsd and
> > found a lot of info on apache and nginx, but not much on the new
> > httpd.
> 

OpenBSD comes with the man pages second to none. That should be the
first thing you always check before using Google to find third party
how-tos which are often inaccurate, obsolete, or even worse plain wrong.
After installing a package post installation message will typically
point to OpenBSD specific pkg_readmes. Those are written by OpenBSD
porters and are very good.


> There isn't very much information around for it; very roughly you need
> to install and run php-fpm, and there's a sample config block in 
> /etc/examples/httpd.conf.  I've only tested racktables with nginx but
> I don't have anything special in the config for it so I don't see 
> why it wouldn't work with httpd from base.

I would proceed in following fashion. 

1. Learn how to configure very basic HTTP server by configuring 
/etc/httpd.conf. Take the time to understand the concept of chrooted web
server. 

2. Install php-fpm. I am specifically running

php-fpm-5.6.11p0 on OpenBSD 5.8 stable

with php-5.6.11.

Check out /etc/examples/httpd.conf to see how to enable  php support. By
default PHP will be running chrooted. Don't proceed further until you
get proper display of php-info page.

3. Install MariaDB server from the base. It comes with the excellent
pkg_readme. Contrary to noise posts in respond to my question about
LibreNMS and httpd in the insecure mode,  MariaDB works very well in
chroot mode (Unfortunately LibreNMS has to many dependencies so that is
why I was asking about insecure mode which Stuart correctly pointed
out).

Make sure you configure MariaDB correctly before installing RackTables
and attempting to run installation script. Don't forget. Your PHP server
will have to talk to MariaDB server. Check dependencies
(php-mysql-5.6.11, php-pdo_mysql-5.6.11).

4. Finally when you have mysqld, php_fpm, and httpd daemons correctly
installed, configured, and running you are ready to run RackTables
installation script. Script will fail at first. Now go back and check my
post from the last month how to "fix" the problem. By the way your
RackTable will be running chrooted as well. 

Best,
Predrag

Reply via email to