I was surprised to not find any info on how to install Lucee manually on ‘other’ Unix platforms. I have successfully built my Tomcat9/OpenJDK8 server on FreeBSD 12 and I used the Windows documentation for hints on how to create the configuration files for my /usr/local/lucee install. However, when I try to run the jar file I get an error message and a clue.
# java -jar /usr/local/lucee/lucee-220.127.116.11.jar
Failed to execute!
Reason: -e is missing
Usage: script [-options]
Where options include:
What do I use for ‘-e’?
Does anyone have a Howto for installing Lucee on Unix?
chmod +x /usr/local/lucee/lucee-18.104.22.168.jar
then try running it again.
Thank you for replying. I already tried 744 perms yesterday so I did as you suggested giving the .jar file 755 and there is no difference. I still get the same error message when executing as root.
So I tried stuffing random values for ‘-e’ on the command line and this is what I get:
# java -jar lucee-22.214.171.124.jar -e 44
Exception in thread "main" java.lang.NoClassDefFoundError: javax/servlet/ServletException
Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletException
... 1 more
I think the only reason that it hasn’t been done is because no one has really asked for it or needed it yet. Still, I think it’s cool that you’re trying to do it!
I’m really confused by how you’re trying to run Lucee though. You mentioned that you have a Tomcat9/OpenJDK8 setup, but then you’re trying to run Lucee as a jar via the java CLI. Any particular reason why you’re running it that way?
You might try simply dropping the Lucee WAR into your Tomcat setup and running Lucee as a more traditional Java app that way. But maybe there’s something you’re trying to do that I don’t understand at the moment.
Either way, I’m delighted to hear you’re trying to run Lucee on FreeBSD. =)
Thank you, that is very helpful. Somewhere along this process I got confused thinking that the jar file I was using was just an installer for Lucee and not the application itself. I will use the WAR file instead and set it up in Tomcat as suggested.
I have managed to get Lucee running on FreeBSD 12. There were a few things that took a while to resolve and I had to resort to doing an install on Ubuntu in a VM to make comparisons. The important changes for anyone wishing to do the same are as follows:
There is a 50MB upload limit in the Tomcat Manager as configured by the FreeBSD tomcat9 pkg. This must be increased to 70MB to enable the lucee.war to be uploaded from the Manager.
The Tomcat connector must be set to port 8888, it defaults to 8080 and clashes with Lucee on 8080.
After the comment ‘Define a non-SSL/TLS HTTP/1.1 Connector on port 8080’
This is the only place the port needs to be changed.
Enable Tomcat to use CFM pages.
<welcome-file>index.cfm</welcome-file> to the top of the list
All xml config files must be owner=www, group=www
Awesome. Glad you got it working!
Just a couple comments:
You probably do not need to upload the Lucee war file via the Tomcat manager. You can probably also simply SCP (copy over SSH) the war to your Tomcat webapps folder and it will autodeploy the same way that it does through the manager.
You probably do not need to change the port. Just change the URL you’re using to access lucee to use port 8080 instead. 8888 is what’s used by the installer and some other editions in order to not conflict with other apps that use port 8080 by default.
Good call on the XML file configs!
Thank you for posting your steps on how you got it working! That’s awesome and I’m sure future users will appreciate it!