Re: Installing RackTables
On 2016 Jan 05 (Tue) at 05:20:07 + (+), Stuart Henderson wrote: :On 2016-01-05, Jordonwrote: :> 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? : :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. : Since it is mandatory for base-httpd, I would recommend adding php-fpm as a run-depend. -- Real computer scientists don't program in assembler. They don't write in anything less portable than a number two pencil.
Re: Installing RackTables
On 2016-01-06, Peter Hesslerwrote: > On 2016 Jan 05 (Tue) at 05:20:07 + (+), Stuart Henderson wrote: >:On 2016-01-05, Jordon 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? >: >: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. >: > > Since it is mandatory for base-httpd, I would recommend adding php-fpm as > a run-depend. Given that there are 75-odd packages using PHP it doesn't make sense to change this dependency on an individual port basis. Perhaps it would make more sense to move php-fpm to the main PHP package, though a simple comment like "install the php-fpm package to use this" in examples/httpd.conf would improve things (at least for people who notice the /etc/examples dir). (side-note: "what are all these different httpds and how do I use php?" might make a good faq entry)..
Re: Installing RackTables
On 2016-01-05, Stuart Henderson wrote: > On 2016-01-05, Jordon <open...@sirjorj.com> 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
Installing RackTables
I’ve been trying to get RackTables running and my lack of web server experience is not making this easy. I started with a fresh install of 5.8 and added the racktables package. I then copy/pasted the ‘ln’ commands that were shown after the package install. At this point, the packages are installed but nothing works - I think I need to get httpd running. I found some basic httpd.conf examples and enabled httpd in rc.conf.local (httpd_flags=“”) and got it to the point where it would serve a .html file from /var/www/htdocs, so I think that is good. 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 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. Am I on the right track? Is there some obvious documentation I am missing or is there a lot of assumed knowledge that I simply do not have? Jordon
Re: Installing RackTables
On 2016-01-05, Jordonwrote: > 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? 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. 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.