Skip to content

Instantly share code, notes, and snippets.

@camerahacks
Last active October 11, 2020 23:06
Show Gist options
  • Save camerahacks/8d05d99d7d85dbf7a6453f76ee3f27ca to your computer and use it in GitHub Desktop.
Save camerahacks/8d05d99d7d85dbf7a6453f76ee3f27ca to your computer and use it in GitHub Desktop.
Running Lucee Express on Raspberry Pi

Install/Run Lucee CFML server on Raspberry Pi

This guide assumes that the raspberry pi is running and you can SSH into it.

First Boot

Run sudo raspi-config change the hostname to make it easier to find on local network and reboot.

Open terminal and SSH using the hostname entered above ssh pi@hostname.local. If this doesn't wor, use your Pi's IP address.

Second Boot

sudo apt-get update
sudo apt-get upgrade

Go to the firdge and get some water. Hydrate yourself.

Install MariaDB/MySQL

Not sure if will use SQL but most likely will. Might as well get it installed now.

sudo apt-get install mariadb-server

Add a new user so we don't have to use root. First, get into MySQL.

sudo mysql

Create a new user.

CREATE USER 'MY_USERNAME'@'%' IDENTIFIED BY 'MY_PASSWORD';

Check if user was created

SELECT User FROM mysql.user;

Assign privileges to user.

GRANT ALL PRIVILEGES ON *.* TO 'MY_USERNAME'@'%';

exit to get out of mysql session

Login as new user to test

mysql -p

exit again if able to login with new user

Change MariaDB settings so can connect remotely

sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf

Comment out the line with #

bind-address = 127.0.0.1

Restart mysql with new config

sudo /etc/init.d/mysql restart

Install Java (JDK)

This is the tricky part. Lets make sure this works.

Install Java

sudo apt-get install oracle-java8-jdk

OR (if package above is not available)

sudo apt install openjdk-8-jdk

Go drink more liquids.

Install Lucee Express

Download Lucee express from https://download.lucee.org/

Create a lucee folder under user's home:

mkdir lucee

Use FTP to move the Lucee express zip file to the folder create above

Unzip it

unzip lucee.zip

Make starup and shutdown executable. Also need to make catalina executable since it is called by the two other scripts

sudo chmod u+x startup.sh
sudo chmod u+x shutdown.sh
cd bin
sudo chmod u+x catalina.sh

Let's reboot just for good measure

sudo reboot

Cross your finger and start the server

cd lucee
sudo ./startup.sh&

Navigate to <Raspberry Pi IP>:8888 - 8888 is the default port

You should see Lucee's home page

For some reason Lucee doesn't have an initial password Change the server password by creating password.txt a file here: /home/pi/lucee/lucee-server/context/password.txt

sudo su
echo -n  "password" > /home/pi/lucee/lucee-server/context/password.txt
exit

Navigate to the link below for the web admin interface. Use the same password you added to password.txt above http://<Raspberry Pi IP>:8888/lucee/admin/server.cfm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment