With the BeagleBone Black you can install a complete Linux operating system on it and use it in many ways, not only can you develop really cool circuits and create code to interact with it, but you can actually install a LAMP server on it to collect data in a database using some PHP with a web server that can display it, of course depending on your skills you could create some forms that will allow you to manipulate the database or perform some other type of tasks.
As I am sure you will find tones of guides out there showing you the mighty power of a LAMP server and the different variations of it, this guide will be using Ubuntu Server with Apache2 web server, Mariadb as the database and PHP. As well as the issue with the small 4 gig eMMC chip we will be using a Micro SD card in the slot as additional storage to house the website and database. This guide will assume you already have your BeagleBone Black setup and running Ubuntu Server, if not please follow the guide HERE, you may also wish to make your installation a bit more secure by creating a new user and removing the default one shown in this guide HERE.
After making sure you completed the two guides listed above or the equivalent, you can now prepare to set up the LAMP server, to complete this guid you will need a few things first.
- Ubuntu Server installed BeagleBone Black
- A 4 gig Micro SD card, 32 gig Micro SD card is recommended.
1. Boot BeagleBone Black.
Make sure your device is connected to your home network and plug-in the power cable and allow it to boot up.
2. SSH Into It.
From another computer or laptop you will want to open a new terminal window so you can SSH into your BeagleBone Black, you will be required to know the IP address that was assigned to it by your home router. Make sure you replace miles with your user name and replace the IP as well.
$ ssh miles@192.168.0.15
3. Update Sources.
We will first make sure that your source list is updated.
$ sudo apt-get update
4. Upgrade Software.
Now check to make sure every thing is up to date.
$ sudo apt-get upgrade
5. Distribution Upgrade.
You will also want to make sure there are not updates held back or any conflicts with other packets.
$ sudo apt-get dist-upgrade
6. Stop Avahi.
By default the Ubuntu Server for BeagleBone Black has Avahi service setup and running, This is to allow for USB connection to a computer for development reasons. For this guide we will not be using any of it so we will stop it with the commands below.
$ sudo systemctl stop avahi-daemon