phpdaemon Install on Ubuntu 12.04
I recently wanted to use PHP for a service running on a Linux machine. After looking at several projects I decided to dig deeper into phpdaemon. The source is available on GitHub (https://github.com/kakserpom/phpdaemon). There is some documentation in English and some in Russian. The English documentation is less than ideal. I fought with the code for some time before getting it installed and running. Here is what I did to get everything working under Ubuntu Linux 12.04.
- Download current source from GitHub
- Extract source to /opt
- Make sure you have /opt/phpdaemon directory with conf, lib, app-*, and application directories
- Link phpd to somewhere in your PATH
- Create config files
- Rename default config file
- Adjust user and group settings in /etc/phpdaemon/phpd.conf
- Install required PECL libraries
- Create /etc/php5/conf.d/pecl.ini, add these lines
extension=libevent.so
to the file
extension=eio.so
extension=proctitle.so - Ensure Apache (or any other web server) is not running
- Install the attached init script to /etc/init.d/phpd
- Start phpdaemon
https://github.com/kakserpom/phpdaemon/downloads
ln -s /opt/phpdaemon/bin/phpd /usr/local/bin/phpd
mkdir /etc/phpdaemon
cp -a /opt/phpdaemon/conf/* /etc/phpdaemon
mv /etc/phpdaemon/phpd.conf.default /etc/phpdaemon/phpd.conf
sudo apt-get -V install php-pear libevent-dev build-essential
sudo pecl install libevent-beta eio proctitle-alpha
sudo service phpd start
Now you should be able to view http://127.0.0.1/Example/ in a web browser.