Create your own Raspberry Pi Server
Having a separate server on your network (or elsewhere) is a great idea to isolate the work you’re doing locally and for testing. Raspberry Pi is a super configurable inexpensive way to setup a server.
For example, on your Pi, you can run services that you can call from other programs like FileMaker. You can setup a web server using Apache. You can, with a monitor or TV, use the built-in Linux desktop environment. You could even build a weather station, or any of thousands of projects. There is so much you can do with a Pi.
For this brief intro, I’ll discuss the Raspberry PI 3, model B. This model is the current model available.
This basic intro will show you the sites I went to for finding how to setup each service I wanted. Since I’ve only set up a single Raspberry Pi, I am by no means a Raspberry Pi expert. Moreover, I’m only using a Raspberry Pi as a Linux server. Having offered that disclaimer, however, setting up a Pi was extremely easy and everything I tried worked almost immediately.
The beauty about Raspberry Pi 3 is that it’s extremely inexpensive, and has impressive supported features:
◆ Quad-core processor
◆ SSD drive
◆ 1 GB RAM
◆ Desktop Operating System (usable from a TV or monitor with HDMI connection)
◆ Overclocking options
◆ Experimental platform for thousands of projects
◆ Extremely popular
The Raspberry PI uses its own version of Linux called “Raspian” a free operating system based on Debian. Raspian has been optimized for the Raspberry Pi hardware.
You can easily add new packages via the command line using the ‘apt-get install’ syntax.
If you need another operating system, you can add that too.
Additionally, you can add other packages like Apache, PHP, and MySQL to setup a LAMP environment where you could run WordPress, Drupal, or other LAMP-based CMS. Unlike fast Java micro-services, WordPress might not be as fast as you’d like on a Raspberry Pi, but it still gives you a viable CMS testing environment.
If some of the command here don’t work for you, turn to the user forums to get questions answered.
Join for free and get help with questions or problems.
Searching online also is also helpful as the Pi community is large.
Let’s assume you’ll want to be able to administer your Pi remotely. That is, you want to be able to use it from a terminal, FTP, or even a Samba drive from another computer on your network. You could also access your Pi outside your network.
Setting up your Pi for remote access (as in from outside your network) —- setting up a static IP, set up router port forwarding rules, etc. — is beyond this document’s scope ... for now.
You also want to be able to run a WordPress site so you need to create a LAMP server (also called a MAMP server on Mac and WAMP server on Windows.)
Finally, maybe you want to run services like Java micro-services you can access from FileMaker or any program that can issue GET Requests.
Initial Packages to add:
• SSH - Remote admin
• Samba - Remote admin (volume or driver letter)
• Linux (assumed if you installed the default Raspian).
Be able to run standalone web applications and services accessible from FileMaker
Now, rather than go thorough each package step by step, when excellent online resources are available, I’ll instead just list the resources I used. Others can jump in to modify this document.
Good starting point here: https://www.raspberrypi.org/documentation/remote-access/ssh/
Setting up a LAMP Server (run WordPress, for example)
$sudo apt-get install tomcat8
There are optional pieces as well you will probably want to install. For example, to install the Tomcat manager application …
$sudo apt-get install tomcat8-admin
The manager application is extremely important as it gives you easy access to the Server Status (memory used, etc.) and a view of your running server applications.
To get to the manager application, you type in the browser’s URL below. However, you will first need to configure a user (see the tomcat-users.xml file in the “conf” folder)
In the manager page, you can un-deploy an application (which removes it from the web apps folder), start one, or stop a running one. If you expect an application (or service) to be running, check the manager application to see if Running says “true” for that application.
To test one of our services in the /services web application deployed in Tomcat above, just use POSTMAN (mac), or similar tool on Windows.
As you can see, the performance is excellent: 70ms.
(Note: if you want the HTML Manager Help or Manager Help options to work you need to do separate installs for them, or a single install referencing both.)
A FileMaker Example
Since FileMaker's INSERT FROM URL command only cares about the URL (as it should), the Raspberry Pi works perfectly:
So, using the same URL as in POSTMAN above...
(Note: for brevity, the FMP output above only considers the first, of possibly many matching cities for a given zip code.)
You will also find this ZipCode lookup example in the tutorial on creating a micro-service in Java, at the link below.
Create Micro-Services Using Java and the Spark Java Framework
The Raspberry PI is cool! Jump in and enjoy.