title: Problems starting tomcat 7 in centos 7
body: <p>I'm trying to run tomcat 7 in centos-release-7-4.1708.el7.centos.x86_64</p>
  
  <p>These are the steps followed:</p>
  
  <pre><code>yum install java-1.7.0-openjdk-devel java-1.7.0-openjdk
  </code></pre>
  
  <p>Test if installed:</p>
  
  <pre><code>echo $JAVA_HOME
  /usr/java/jdk/
  echo $JRE_HOME
  /usr/java/jdk/jre
  </code></pre>
  
  <p>Install tomcat 7</p>
  
  <pre><code>yum install tomcat tomcat-webapps tomcat-admin-webapps
  
  systemctl stop tomcat
  systemctl start tomcat
  systemctl enable tomcat
  </code></pre>
  
  <p>It should create a symlink to tomcat.service, but no...</p>
  
  <pre><code>systemctl status tomcat
  
  
  tomcat.service - Apache Tomcat Web Application Container
     Loaded: loaded (/usr/lib/systemd/system/tomcat.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Mon 2017-11-13 10:26:33 WET; 4min 7s ago
    Process: 2825 ExecStart=/usr/libexec/tomcat/server start (code=exited, status=127)
   Main PID: 2825 (code=exited, status=127)
  
  systemd[1]: Started Apache Tomcat Web Application Container.
  systemd[1]: Starting Apache Tomcat Web Application Container...
  server[2825]: /usr/libexec/tomcat/server: Failed to set JAVACMD
  systemd[1]: tomcat.service: main process exited, code=exited, status=127/n/a
  systemd[1]: Unit tomcat.service entered failed state.
  systemd[1]: tomcat.service failed.
  </code></pre>
  
  <p><strong>UPDATE 1</strong></p>
  
  <p>Content of file tomcat.service in /usr/lib/systemd/system</p>
  
  <pre><code># Systemd unit file for default tomcat
  #
  # To create clones of this service:
  # DO NOTHING, use tomcat@.service instead.
  
  [Unit]
  Description=Apache Tomcat Web Application Container
  After=syslog.target network.target
  
  [Service]
  Type=simple
  EnvironmentFile=/etc/tomcat/tomcat.conf
  Environment="NAME="
  EnvironmentFile=-/etc/sysconfig/tomcat
  ExecStart=/usr/libexec/tomcat/server start
  SuccessExitStatus=143
  User=tomcat
  Group=tomcat
  
  
  [Install]
  WantedBy=multi-user.target
  </code></pre>