Hi All; I've inherited an old Lucee server which I...
# lucee
n
Hi All; I've inherited an old Lucee server which I think need some love - specifically, I'd like to upgrade the JRE. Details:
Copy code
Version	Lucee 5.3.7.59
Version Name	Gelert
Release date	07-Aug-2023	 
Servlet Container	Apache Tomcat/8.5.6
Java	1.8.0_112 (Oracle Corporation) 64bit 
OS	Linux (4.4.120-92.70-default) 64bit
Architecture	64bit
I basically want to switch out the Oracle version to the equivalent OpenJDK. There's some apps on there which I think currently require Java8, so I'm not looking to jump Java11, that can wait until I can request a new box. Is it just a matter of following -> https://docs.lucee.org/guides/installing-lucee/installation-linux/upgrade-JRE.html I'm a bit confused as to exactly what I'm meant to download: I appear to have Java in
/opt/lucee/jdk/jre
and not tied to the OS'es package manager. Can anyone direct me to what I should be downloading to replace that
jre
folder?
e
unless its an express install version, update the OS version of the jdk/ restart lucee and you are good to go
n
Ah ok, but...
Copy code
# java -version
openjdk version "1.8.0_161"
OpenJDK Runtime Environment (IcedTea 3.7.0) (build 1.8.0_161-b12 suse-27.13.1-x86_64)
OpenJDK 64-Bit Server VM (build 25.161-b12, mixed mode)
Is what I get from the OS....
1.8.0_112 (Oracle Corporation) 64bit
is what I get from lucee admin?
This is what's in lucee_ctl
Copy code
# set base params for subshell
CATALINA_BASE=/opt/lucee/tomcat; export CATALINA_BASE
CATALINA_HOME=/opt/lucee/tomcat; export CATALINA_HOME
CATALINA_PID=/opt/lucee/tomcat/work/tomcat.pid; export CATALINA_PID
CATALINA_TMPDIR=/opt/lucee/tomcat/temp; export CATALINA_TMPDIR
JRE_HOME=/opt/lucee/jdk/jre; export JRE_HOME
JAVA_HOME=/opt/lucee/jdk; export JAVA_HOME
TOMCAT_OWNER=root; export TOMCAT_OWNER
s
Lucee installer will use its own JDK/JRE unless you point it to a different one. Not hard to do (should just be in your Tomcat conf files) but Commandbox also makes this super easy
e
The version you have installed, installed with the java version. you just change the env paths, which would be easier
s
whether or not you like commandbox tho, good to un-bundle your jdk/jre in your conf files from whatever Lucee installed
e
agreed @sknowlton!
I believe you go to /opt/lucee/bin/ make sure your java_home is defined in your env and properly working, then run configtest.sh which picks up java_home
n
I'd love to run CB, but multiple sites on a single VPS with no budget for CB Pro!
d
Something like this should work:
Copy code
# Download jre, e.g <https://adoptium.net/temurin/releases/?package=jre&os=linux&arch=x64&version=11>
# Upload to /home/ubuntu (or whichever home folder on server)
cd /home/ubuntu/
tar -xvzf OpenJDK11U-jre_x64_linux_hotspot_11.x.xx_x.tar.gz
cd /opt/lucee/
sudo ./lucee_ctl stop
#backup current jre
sudo cp -R jre/ jre8.x.x.bak
sudo rm -rf jre
sudo mv /home/ubuntu/jdk-11.x.xx+x-jre/ .
sudo mv jdk-11.x.xx+x-jre jre
sudo chown -R lucee:lucee jre jre8.x.xx_x.bak
sudo ./lucee_ctl start
Give me a shout if any of above is not clear.