Skip to content

Instantly share code, notes, and snippets.

@kukielp

kukielp/index.md

Created Mar 17, 2021
Embed
What would you like to do?

sudo apt update sudo apt upgrade

sudo mkdir /usr/lib/jvm cd /usr/lib/jvm sudo wget https://cdn.azul.com/zulu-embedded/bin/zulu11.41.75-ca-jdk11.0.8-linux_aarch32hf.tar.gz sudo tar -xzvf zulu11.41.75-ca-jdk11.0.8-linux_aarch32hf.tar.gz sudo rm zulu11.41.75-ca-jdk11.0.8-linux_aarch32hf.tar.gz

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/zulu11.41.75-ca-jdk11.0.8-linux_aarch32hf/bin/java 1 sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/zulu11.41.75-ca-jdk11.0.8-linux_aarch32hf/bin/javac 1

sudo update-alternatives --config java // There will be one only java -version javac -version

cd ~ wget https://apache-mirror.rbc.ru/pub/apache/tomcat/tomcat-9/v9.0.44/bin/apache-tomcat-9.0.44.tar.gz -P /tmp

sudo tar xf /tmp/apache-tomcat-9*.tar.gz -C /opt/tomcat

sudo ln -s /opt/tomcat/apache-tomcat-9.0.44 /opt/tomcat/latest

sudo chown -RH tomcat: /opt/tomcat/latest

sudo vi /etc/systemd/system/tomcat.service

[Unit]
Description=Tomcat 9 servlet container
After=network.target

[Service]
Type=forking

User=tomcat
Group=tomcat

Environment="JAVA_HOME=/usr/lib/jvm/zulu11.41.75-ca-jdk11.0.8-linux_aarch32hf"
Environment="JAVA_OPTS=-Djava.security.egd=file:///dev/urandom -Djava.awt.headless=true"

Environment="CATALINA_BASE=/opt/tomcat/latest"
Environment="CATALINA_HOME=/opt/tomcat/latest"
Environment="CATALINA_PID=/opt/tomcat/latest/temp/tomcat.pid"
Environment="CATALINA_OPTS=-Xms128M -Xmx256M -server -XX:+UseParallelGC"

ExecStart=/opt/tomcat/latest/bin/startup.sh
ExecStop=/opt/tomcat/latest/bin/shutdown.sh

[Install]
WantedBy=multi-user.target

sudo systemctl daemon-reload sudo systemctl start tomcat sudo systemctl status tomcat

sudo systemctl stop tomcat

sudo rm -rf /opt/tomcat/latest/webapps/ROOT sudo wget -O /opt/tomcat/latest/webapps/ROOT.war https://cdn.lucee.org/lucee-5.3.7.48.war

sudo systemctl start tomcat sudo tail -f /opt/tomcat/latest/logs/catalina.out #wait, first start can take minutes

sudo systemctl stop tomcat

#once started and stopped add a password, we need it to start to explode the WAR sudo vi /opt/tomcat/apache-tomcat-9.0.44/webapps/ROOT/WEB-INF/lucee-server/context/password.txt

sudo systemctl start tomcat

#admin page http://192.168.1.20:8080/lucee/admin/web.cfm

#main file sudo vi /opt/tomcat/latest/webapps/ROOT/index.cfm

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