Installing Tomcat on Ark Linux

From ArkWiki

Jump to: navigation, search

Standalone

  • Install tomcat package by typing apt-get install tomcat
  • Edit /srv/tomcat/conf/server.xml using your favourite text editor
  • Uncomment
<Connector port="8080" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true" />

by removing

<!-- Uncomment this to run in standalone mode.

before the line and

-->

after the line.

  • To run tomcat type service tomcat start
  • To include tomcat in the runlevel startup type chkconfig tomcat on. This will result in tomcat being started upon syste startup.
  • To test your tomcat you can open your browser and head to http://localhost:8080

With Apache 2 using Mod Proxy

  • Install httpd and tomcat package by typing "apt-get install httpd tomcat"
  • Use your favourite text editor to create /etc/httpd/vhosts/tomcat containing
<VirtualHost *>
        ServerName servlet.example.com
        DocumentRoot /srv/tomcat/webapps
        ProxyPass         / ajp://localhost:8009/
        ProxyPassReverse  / ajp://localhost:8009/
</VirtualHost>
  • Start tomcat and httpd by typing service tomcat start; service httpd start
  • To include tomcat and httpd run level type chkconfig tomcat on; chkconfig httpd on
  • To test your tomcat go to http://servlet.example.com using your web browser.

Back to Main Page

Personal tools