Tuesday 19 March 2013

Lighttpd and PHP on the BeagleBone

First of all, i originally found this information here and here, but the site seems down right now so i decided to put the information here aswell (with some modifications).

First of all i disable the web services:

systemctl disable cloud9.service
systemctl disable bone101.service
systemctl disable gateone.service

Then i install the required php packages:

opkg install php php-cgi php-cli
opkg install lighttpd lighttpd-module-fastcgi

Edit the lighttpd config file located at /etc/lighttpd.conf to enable fast-cgi:
Locate the server.modues line and uncomment mod_fastcgi:

Then further down the file is the fastcgi.server configuration, uncomment the lines to look something like this:

Make sure the path for php-cgi is correct!
Save the file and restart the lighted server:
/etc/init.d/lighttpd restart

Now, lets try if it works.
Create a new php file in /www/pages called index.php:

Finally, point your browser to the adress of your beaglebone and the PHP info page should show.

Thursday 14 March 2013

Neorouter on the Beaglebone

I wanted to install the neorouter client on one of my Beaglebone devices running the stock Angstrom image.

This was kind of easy after some trial and error.

First i went to the Neorouter download page, scrolled down to the Raspbian version and used wget to download the free "wheezy" version of the client to the /tmp directory of the Beaglebone.
Then you unpack the .deb package:
ar x <packagename>

Next you unpack the tar.gz file:
tar xvz < data.tar.gz

Next you move the files located in the /tmp/usr/bin directory to the /usr/bin

Then you create a file named neorouter.service in the /lib/systemd/system directory which contains the following:

Next you execute the command:
systemctl enable neorouter.service

This will make the client start at boot.
After that you can either reboot the Beaglebone or issue the command:
systemctl start neorouter.service

Last thing to do is configure the client by running:

and fill out the required parameters, then a list of computers connected to you neorouter network should display.
You exit the nrclientcmd by typing "quit".

All done