0

I have just performed the following steps, and at the end I don't understand this Tomcat Status Message:

tomcat.service - Apache Tomcat Web Application Container Loaded: 
loaded (/run/systemd/generator.late/tomcat.service; bad; vendor prese  Active: inactive (dead)

$ sudo mkdir -p -v /opt/java/64
$ sudo mv -v ~/Downloads/jre1.8.0_111 /opt/java/64
$ sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/64/jre1.8.0_111/bin/java" 1
$ sudo update-alternatives --set java /opt/java/64/jre1.8.0_111/bin/java
$ sudo apt-get remove icedtea-8-plugin
$ ln -s /opt/java/64/jre1.8.0_111/lib/amd64/libnpjp2.so ~/.mozilla/plugins/
$ sudo groupadd tomcat
$ sudo useradd -s /bin/false -g tomcat -d /opt/tomcat tomcat
$ sudo apt install tomcat8
$ sudo apt-get install tomcat8 tomcat8-docs tomcat8-admin tomcat8-examples

I then ran the following command and and pasted username information in the /etc/tomcat8/tomcat-users.xml file.

$ gksu leafpad /etc/tomcat8/tomcat-users.xml
$ systemctl restart tomcat8    
$ gksu leafpad /run/systemd/generator.late/tomcat.service

I pasted the following in the /run/systemd/generator.late/tomcat.service file.

[Unit]
Description=Apache Tomcat Web Application Container
After=network.target

[Service]
Type=forking

Environment=JAVA_HOME=/opt/java/64/jre1.8.0_111

Environment=CATALINA_PID=/run/tomcat8.pid

Environment=CATALINA_HOME=/usr/share/tomcat8

Environment=CATALINA_BASE=/usr/share/tomcat8

Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC'

Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'

ExecStart=/usr/share/tomcat8/bin/startup.sh

ExecStop=/usr/share/tomcat8/bin/shutdown.sh

User=tomcat
Group=tomcat
UMask=0007
RestartSec=10
Restart=always

[Install]
WantedBy=multi-user.target

I finally ran the following commands:

$ sudo apt-get install ant git
$ systemctl restart tomcat8
$ sudo systemctl status tomcat

This is where I get such status message above. I hope someone can help.

  1. Is such message normail?
  2. I think I need help with the command above as it does not match with the content of the file tomcat.service.
  3. I super need help with the content of tomcat.service. Can it be that I pasted someting wrong in there?

My OS is Ubuntu Server 16.04.

0
0

I know why now. It has to do with the command below.

$ sudo systemctl status tomcat

It is supposed to be

$ sudo systemctl status tomcat8

Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.