+

Search Tips | Advanced Search

For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.


Install MobileFirst Analytics on Tomcat

We can install MobileFirst Analytics on Apache Tomcat.


Before you begin

Ensure that you already have the MobileFirst Analytics WAR files. For more information on the installation artifacts, see Install MobileFirst Server to an application server. The analytics-ui.war and analytics-service.war files are found in the <mf_server_install_dir>\analytics folder. For more information about how to download and install Tomcat, see Apache Tomcat. Ensure that you download the version that supports Java™ 7 or higher. For more information about which version of Tomcat supports Java 7, see Apache Tomcat Versions.


Procedure

  1. Add analytics-service.war and the analytics-ui.war files to the Tomcat webapps folder.
  2. Uncomment the following section in the conf/server.xml file, which is present, but commented out, in a freshly downloaded Tomcat archive.

      <Valve className ="org.apache.catalina.authenticator.SingleSignOn"/>

  3. Declare the two war files in the conf/server.xml file, and define a user registry.

      <Context docBase ="analytics-service" path ="/analytics-service"></Context>
      <Context docBase ="analytics" path ="/analytics"></Context>
      <Realm className ="org.apache.catalina.realm.MemoryRealm"/>

    The MemoryRealm recognizes the users that are defined in the conf/tomcat-users.xml file. For more information about other choices, see Apache Tomcat Realm Configuration HOW-TO.

  4. Add the following sections to the conf/tomcat-users.xml file to configure a MemoryRealm.

    1. Add the security roles.

        <role rolename="analytics_administrator"/>
        <role rolename="analytics_infrastructure"/>
        <role rolename="analytics_support"/>
        <role rolename="analytics_developer"/>
        <role rolename="analytics_business"/>

    2. Add a few users with the roles we want.

        <user name="admin" password="admin" roles="analytics_administrator"/>
        <user name="support" password="demo" roles="analytics_support"/>
        <user name="business" password="demo" roles="analytics_business"/>
        <user name="developer" password="demo" roles="analytics_developer"/>
        <user name="infrastructure" password="demo" roles="analytics_infrastructure"/>

  5. Start your Tomcat Server and go to the MobileFirst Analytics Console.

      http://localhost:8080/analytics/console

    For more information about how to start the Tomcat Server, see the official Tomcat site. For example, Apache Tomcat 7, for Tomcat 7.0.

Parent topic: MobileFirst Analytics Server installation guide