Just an update - the answer from webfaction still works ! - I tried with tomcat 10.0.8 and JRE_HOME=/usr/lib/jvm/jre-1.8.0-openjdk-1.8.0.275.b01-0.el7_9.x86_64/

Copy-Pasting here incase Webfaction Forums gets shutdown.

  1. Go to Apps in the control panel and create a new 'custom app listening on port' application. Make a note of the port number assigned to the app. You can name the app whatever you want - in this example, let's name it 'tomcat'.

  2. Go to Sites in the control panel and create a site to serve the app you created in step 1.

  3. SSH into your server and run the following commands:

        cd ~
        JRE_HOME=/usr/lib/jvm/jre-1.8.0-openjdk/
        echo "export JRE_HOME=$JRE_HOME" >> ~/.bashrc
        source ~/.bashrc
        wget https://mirrors.estointernet.in/apache/tomcat/tomcat-10/v10.0.20/bin/apache-tomcat-10.0.20.tar.gz
        cd ~/apps/tomcatserver
        tar zxf ~/apache-tomcat-10.0.20.tar.gz --strip 1
  4. Edit ~/apps/tomcat/conf/server.xml to change connector port 8080 to the port assigned to your custom app.

You can then start Tomcat by running:

~/apps/tomcat/bin/startup.sh
Once Tomcat is running, you should see the "If you're seeing this, you've successfully installed Tomcat. Congratulations!" page when you visit the site you created in step 2.

You can stop it by running:

~/apps/tomcat/bin/shutdown.sh

  • sean replied to this.

    anjanesh edit that to change webapps to apps and you're good to go 🙂

    Is there a way to get the app's service from stopping ?

    anjanesh Try starting it like this:

    USE_NOHUP=true ~/apps/tomcat/bin/startup.sh

    or

    export USE_NOHUP=true
    ~/apps/tomcat/bin/startup.sh
    3 years later
    Mastodon