How do I install TomEE instead of the tomcat-10

Started by kwesiaryee, September 08, 2022, 12:47:49 PM

Previous topic - Next topic

kwesiaryee

Hi,

I am new to CWP and so far I like the panel a lot. I have deployed my website and very satisfied, except that I tried to install payara on centos 7 and I am getting several errors, for that reason the server is not starting.

My next alternative is to see how best I can get the current version of TomEE installed and working instead of tomcat-10. Reason being I have EJB-based apps that I need to deploy.

Can that be done and how do I get that implemented.

bullten

Quoteyum install java-11-openjdk -y


Quoteecho "export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.16.0.8-1.el7_9.x86_64" >> /etc/profile
. /etc/profile
env | grep JAVA_HOME

Quoteuseradd -s /sbin/nologin tomcat

Quotewget https://dlcdn.apache.org/tomee/tomee-9.0.0-M8/apache-tomee-9.0.0-M8-webprofile.tar.gz
tar zxvf apache-tomee-9.0.0-M8-webprofile.tar.gz

Quotemv apache-tomee-webprofile-9.0.0-M8/ /opt/tomee/
chown -R tomcat:tomcat /opt/tomee/

Quoteln -s /opt/tomee/apache-tomee-webprofile-9.0.0-M8 /opt/tomee/latest

vi /usr/lib/systemd/system/tomee.service

Quote[Unit]
Description=TomEE 8 servlet container
After=network.target

[Service]
Type=forking

User=tomcat
Group=tomcat

Environment="JAVA_HOME=/usr/lib/jvm/jre"
Environment="JAVA_OPTS=-Djava.security.egd=file:///dev/urandom"

Environment="CATALINA_BASE=/opt/tomee/latest"
Environment="CATALINA_HOME=/opt/tomee/latest"
Environment="CATALINA_PID=/opt/tomee/latest/temp/tomee.pid"
Environment="CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC"

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

[Install]
WantedBy=multi-user.target


systemctl daemon-reload
systemctl enable tomee
systemctl start tomee