Pages

Sunday, November 11, 2018

How I Installed TNG on a Raspberry PI

Recently I've had great fun with Raspberry PIs (those small computers that cost $35.00 on Amazon—well, maybe $70.00 after you buy a case, power supply and MicroSD card). It occurred to me to try installing The Next Generation of Genealogical Sitebuilding (TNG https://www.tngsitebuilding.com/) on one of my PIs. (It is the same software I use to run the Whipple Database (https://db.whipple.org) on my favorite hosting company's servers (http://qwk.net).

It ended up being fairly simple, and took only about 2 hours. I had a working Raspberry PI 3B that I hadn't used for anything special. I had installed Raspbian Linux on a 32GB microSD card, and the computer was up and running. (To learn how to set up a Raspberry PI with Raspbian Linux, see the site https://www.raspberrypi.org/. I purchased all of my PIs at amazon.com.)

I have converted all my public sites (TNG and WordPress, primarily) to the MariaDB database, preferring it to MySQL. I decided to do the same with this adventure.

All I had to do was issue the following commands on the PI's commandline:

% sudo apt update
% sudo apt upgrade
% sudo apt update
% sudo apt install apache2
% sudo apt install mariadb-server
% sudo apt install php php-mbstring
% sudo apt install mysql-utilities/stable
% sudo apt install php-db/stable

With that completed, I followed the instructions at the TNG Sitebuilding web site.

For this adventure, I unzipped the TNG zip file into the /var/www/html directory. I access the database on my local home work network either with the URL "localhost" (if using the Raspberry PI's browser), or by the IP address assigned to the PI.

The response when searching for individuals on the PI is very fast. My GEDCOM file has nearly 160,000 names. The import on the PI is slower than on my hosted website.

Note: If you're new to MariaDB, any commands that work with MySQL also work with MariaDB. (The command-line client, for example is started with the mysql command, just as in MySQL.)

So Now What?

I suppose I could add my PI's IP address to routing tables for whipple.org and let outsiders visit my Raspberry PI ... But that might make Comcast upset. So now (for the time being, at least), since I'm just a hobbyist, I'm content with being able to access my database from any computer or handheld in my home network.

If I were an entrepreneur, I suppose there is a pile of gold waiting for someone?

No comments:

Post a Comment