Skip to content

Installation: Tomcat

randikathryn edited this page Feb 17, 2014 · 14 revisions

Notes

Tomcat is the Java servlet that runs Fedora and Solr.

Steps

  1. Install the tomcat servlet container with your package manager, by entering the following commands in the terminal window:
    Ubuntu: sudo apt-get install tomcat7
    CentOS: 1. At your terminal prompt, enter sudo yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps 1. Type Y when asked "Is this ok [y/N]".

       The final output should look similar to this (with the ... indicating system generated code that has been intentionally left out of these instructions):  
      _..._  
      *xml-commons-apis               x86_64    1.3.04-3.6.el6          base    439 k*  
      *xml-commons-resolver           x86_64    1.1-4.18.el6            base    145 k*  
    
      _Transaction Summary_  
      _================================================================================_  
      _Install      45 Package(s)_  
      _Total download size: 19 M_  
      _Installed size: 50 M_  
      _Is this ok [y/N]: Y_  
      _Downloading Packages:_  
      _Setting up and reading Presto delta metadata_  
      _..._  
      *xml-commons-apis.x86_64 0:1.3.04-3.6.el6*  
      *xml-commons-resolver.x86_64 0:1.1-4.18.el6*  
      _Complete!_  
    
  2. Add the username you're using to install things to the tomcat group, by entering the following commands in the terminal window:
    Ubuntu: sudo usermod -G tomcat7 -a $USER
    CentOS: sudo usermod -G tomcat -a $USER

  3. On CentOS, you'll need to set tomcat to start automatically on start/reboot by entering the command sudo chkconfig tomcat6 on.

  4. Exit the terminal window and log back in to make sure the group changes take effect.

  5. (Re)Start your tomcat server, using the following commands:
    Ubuntu: sudo service tomcat7 restart
    Centos: sudo service tomcat6 restart
    The output should look like this:
    Stopping tomcat6: [ OK ]
    Starting tomcat6: [ OK ]

Verification Steps

  1. Test your tomcat installation by browsing to http://localhost:8080 or enter the command curl localhost:8080 in the terminal window. You should see the default tomcat home page, announcing that "It Works!"
  2. Test your group membership to be sure it includes the tomcat or tomcat7 group. Enter the command id in the terminal window. The output should look like this:
    uid=500(user_name) gid=500(user_name) groups=500(user_name),91(tomcat),502(ssh) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
    Do not continue until your group membership is updated!

Next Step

Proceed to Install SQL db for Fedora or return to the Overview page.

Clone this wiki locally