Author Topic: How do I install TomEE instead of the tomcat-10  (Read 2341 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
How do I install TomEE instead of the tomcat-10
« on: September 08, 2022, 12:47:49 PM »
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.
« Last Edit: September 08, 2022, 12:50:53 PM by kwesiaryee »

Offline
***
Re: How do I install TomEE instead of the tomcat-10
« Reply #1 on: September 09, 2022, 06:49:20 AM »
Quote
yum install java-11-openjdk -y


Quote
echo "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

Quote
useradd -s /sbin/nologin tomcat

Quote
wget 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

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

Quote
ln -s /opt/tomee/apache-tomee-webprofile-9.0.0-M8 /opt/tomee/latest

Code: [Select]
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


Code: [Select]
systemctl daemon-reload
systemctl enable tomee
systemctl start tomee

Offline
*