Breaking

Tuesday, 23 March 2021

How to Install Apache Tomcat 8.5 on SLES 12 RAW

 

OS : SUSE Linux Enterprise Server 12 SP4

-----------


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

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

[Service]
Type=forking

User=tomcat
Group=tomcat

Environment="JAVA_HOME=/usr/java/jre1.8.0_231-amd64"
Environment="JAVA_OPTS=-Djava.security.egd=file:///dev/urandom"

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

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

[Install]
WantedBy=multi-user.target

-----------------






  347  2020-12-19 12:13:58 sudo useradd -m -U -d /opt/tomcat -s /bin/false tomcat

  348  2020-12-19 12:14:11 sudo mkdir -p /opt/tomcat

  349  2020-12-19 12:14:43 wget https://downloads.apache.org/tomcat/tomcat-8/v8.5.61/bin/apache-tomcat-8.5.61.tar.gz

  350  2020-12-19 12:14:58 ls -ltr

  351  2020-12-19 12:15:10 tar -xvf apache-tomcat-8.5.61.tar.gz

  352  2020-12-19 12:15:31 ls

  353  2020-12-19 12:15:42 sudo mv apache-tomcat-8.5.61 /opt/tomcat/

  354  2020-12-19 12:16:32 sudo ln -s /opt/tomcat/apache-tomcat-8.5.61/ /opt/tomcat/latest

  355  2020-12-19 12:16:43 sudo chown -R tomcat: /opt/tomcat

  356  2020-12-19 12:16:53 sudo sh -c 'chmod +x /opt/tomcat/latest/bin/*.sh'

  357  2020-12-19 12:16:55 clear

  358  2020-12-19 12:17:38 vi /usr/lib/systemd/system/tomcat.service

  359  2020-12-19 12:20:04 systemctl status mysql

  360* 2020-12-19 12:20:16 systemctl daemon-reload

  361  2020-12-19 12:20:27 systemctl status tomcat

  362  2020-12-19 12:20:43 sudo systemctl start tomcat

  363  2020-12-19 12:20:47 systemctl status tomcat

  364  2020-12-19 12:21:13 sudo systemctl enable tomcat





----------------------------------

os version

NAME="SLES"
VERSION="12-SP4"
VERSION_ID="12.4"
PRETTY_NAME="SUSE Linux Enterprise Server 12 SP4"
ID="sles"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles_sap:12:sp4"

-------------------------------------------------------

No comments:

Post a Comment