Lucee 5 with a slice of Raspberry Pi

I got Lucee 5.1 beta running on my Raspberry Pi 2B. Fully functional web
server running on Gentoo Linux.

PI 2B: about $40
https://www.raspberrypi.org/
https://www.adafruit.com/category/105

OS: Gentoo Linux
https://wiki.gentoo.org/wiki/Raspberry_Pi

Servlet: Jetty 9.3.10

Java JDK: Oracle Linux ARM 32 Hard Float ABI
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

SD card: 64 GB … about $33

One of the cheapest webservers available… around $ 80.00. Great for
testing stuff. Will run off a battery with the right parts.

Now to see if I can run some type of DB server at the same time. I guess I
could purchase another Raspberry Pi and run the DB server on that one.
Maybe I will build a cluster since this has got to be one of these
cheapest ways to play with this tech.

Andrew Penhorwood

1 Like

On Wednesday, 6 July 2016 20:23:05 UTC+7, Andrew Penhorwood wrote:

Not sure MySQL will run on an ARM chip. Even if it did not sure both Java
and MySQL would fit in the 1 GB of RAM space on the RPI2.

It’s not supported but people have apparently got it running.

http://www.clusterdb.com/mysql-cluster/mysql-cluster-running-on-raspberry-pi

I need to get lucee installed in this:
https://getchip.com/pages/pocketchip

:slight_smile:

1 Like

I’d have though MySQL would be in the standard repositories ?

Not sure MySQL will run on an ARM chip. Even if it did not sure both Java
and MySQL would fit in the 1 GB of RAM space on the RPI2.

Bottom line is if it runs Java it will run Lucee. Yay Lucee. :slight_smile:
Which means almost everything. Lucee coming to a toaster near you.

Andrew Penhorwood

You can always add a swap file (at the risk of killing the flash quicker !).

do you have a working image built for the pi you could share? I would love to play around with the pi too. or if you have a set of steps you took to get it running?

Java for Linux ARM 64 Hard Float ABI ( RP3 )
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Install Jetty instead of Tomcat - Jetty is easier to configure and will run on anything.

Once that is running the Jetty Demo then you just need to put Lucee on it. Fairly easy to do but it requires editing some config files. I can send you examples if you are interested.

I had a Lucee control RP3 at one point. Has been awhile since I played with it.

If you want Lucee on a Pi, really all you need is CommandBox. You’ll have a server up in about 1 minute flat. Just wget the binary version, unzip it, and box server start. Here’s a server I have running right now on an RPI2 using CommandBox and ContentBox CMS. I use an H2 in-memory DB. I set up the whole blog in about 30 minutes. I’ve also used CommanBox to do hardware automation on a Pi. Check out the blog in the link below.

http://pi.bradwood.com/

What would be the most reliable option? Thinking about using lucee/pi3 in an iot application and the hardware would be physically remote. I have never used commandbox before so I don’t know much about it and if it would be ideal for booting and running everytime without fail (all other pi issues aside). What you think?

Well, we have Docker images that are powered by CommandBox (and run both Adobe CF and Lucee). They are very fast, very performant, and very stable. There are customers using them right now including US govt agencies. You won’t find a more lightweight version of Lucee. We use Undertow which is a very small servlet engine made by JBoss (part of their Wildfly project) and we allow you to configure your entire server including datasources with a couple JSON files so everything is completely portable. CommandBox requires no installation and can start any version of Lucee that you want. It will even auto-upgrade to the newest versions when they come out (on restart).

As far as running the server on boot, I actually have a blog entry that shows how I did it (very easy) on my Pi blog. It’s just an init.d script.

http://pi.bradwood.com/blog/starting-the-cfml-server-on-boot

Here’s a guide to get you going on CommandBox:

https://ortus.gitbooks.io/commandbox-documentation/content/getting_started_guide.html

Read through the entire “embedded server” section in our docs. It covers everything you need. CommandBox provides a fully scripable CLI for managing your engine’s configuration which is documented here:
https://cfconfig.ortusbooks.com/introduction/getting-started-guide.html
CFConfig is optional, but it will sure make your life easier.

The CommandBox is a good way to go. I have that setup for some projects. I personally like Jetty so I do most things with Jetty.

The fast way will be CommandBox.

1 Like

Thank you both for the great information.

1 Like