1. The grouperInstaller.jar installer may leave a Tomcat process running. Check for a Tomcat process running from the Grouper installation directory /opt/grouper and if found kill it:

    ps auwx | grep tomcat
    root     32425  3.5 27.6 1163092 280788 pts/3  Sl   18:17   0:34 /usr/lib/jvm/java-7-openjdk-amd64/bin/java -XX:MaxPermSize=150m -Xmx640m -Dcatalina.home=/opt/grouper/apache-tomcat-6.0.35 -jar /opt/grouper/apache-tomcat-6.0.35/bin/bootstrap.jar
     
    kill 32425
  2. Replace the log directory for Grouper core or API with a symlink to the directory that you created earlier:

    cd /opt/grouper/grouper.apiBinary-2.2.2
    rm -rf logs
    ln -s /var/log/grouperApi logs
  3. Fix the ownership of log files created during the installation process:

    chown -R tomcat6:tomcat6 /var/log/grouperUi
    chown -R tomcat6:tomcat6 /var/log/grouperWs
  4. Delete the old and out of date JDBC jar files distributed with Grouper:

    cd /opt/grouper/grouper.apiBinary-2.2.2/lib/jdbcSamples
    rm ./*
  5. Download the latest version of the appropriate JDBC connector jar file:
    1. Browse here for MariaDB
    2. Browse here for MySQL.
    3. Browse here for PostgreSQL.
  6. Copy the JDBC connector jar file into the Grouper API library custom directory, eg:

    cd /opt/grouper/grouper.apiBinary-2.2.2/lib/custom
    cp /tmp/mariadb-java-client-1.3.6.jar .
  7. Copy the JDBC connector jar file into the Grouper UI lib directory:

    cd /opt/grouper/grouper.ui-2.2.2/dist/grouper/WEB-INF/lib
    cp /tmp/mariadb-java-client-1.3.6.jar .
  8. Copy the JDBC connector jar file into the Grouper WS lib directory:

    cd /opt/grouper/grouper.ws-2.2.2/grouper-ws/build/dist/grouper-ws/WEB-INF/lib
    cp /tmp/mariadb-java-client-1.3.6.jar .
  9. There are three (3) copies of the file grouper.hibernate.properties that you must edit:

    cd /opt/grouper
    find . -name grouper.hibernate.properties
    ./grouper.ws-2.2.2/grouper-ws/build/dist/grouper-ws/WEB-INF/classes/grouper.hibernate.properties
    ./grouper.ui-2.2.2/dist/grouper/WEB-INF/classes/grouper.hibernate.properties
    ./grouper.apiBinary-2.2.2/conf/grouper.hibernate.properties

    Edit one of the files shown above and set the JDBC connection properties appropriately, and then copy the edited version into place in the other two (2) locations (all 3 copies of the file should be identical):

    1. For MariaDB:

      hibernate.connection.driver_class = org.mariadb.jdbc.Driver
      hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
      hibernate.connection.url = jdbc:mysql://localhost:3306/grouper?autoReconnect=true&CharSet=utf8&useUnicode=true&characterEncoding=utf8
      hibernate.connection.username = grouper
      hibernate.connection.password = some_password
    2. For MySQL:

      hibernate.connection.driver_class = com.mysql.jdbc.Driver
      hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
      hibernate.connection.url = jdbc:mysql://localhost:3306/grouper?autoReconnect=true&CharSet=utf8&useUnicode=true&characterEncoding=utf8
      hibernate.connection.username = grouper
      hibernate.connection.password = some_password
    3. For PostgreSQL:

      hibernate.connection.driver_class = org.postgresql.Driver
      hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
      hibernate.connection.url = jdbc:postgresql://localhost:5432/grouper
      hibernate.connection.username = grouper
      hibernate.connection.password = some_password
  10. Create the file /etc/tomcat6/Catalina/localhost/grouper.xml with the contents

    <Context docBase="/opt/grouper/grouper.ui-2.2.2/dist/grouper" path="/grouper" reloadable="false" mapperContextRootRedirectEnabled="true" mapperDirectoryRedirectEnabled="true"/>
  11. Create the file /etc/tomcat6/Catalina/localhost/grouper-ws.xml with the contents

    <Context docBase="/opt/grouper/grouper.ws-2.2.2/grouper-ws/build/dist/grouper-ws" path="/grouper-ws" reloadable="false" mapperContextRootRedirectEnabled="true" mapperDirectoryRedirectEnabled="true"/>
  12. Edit the file /opt/grouper/grouper.ui-2.2.2/dist/grouper/WEB-INF/web.xml as follows:
    1. Remove all <security-constraint> elements and their child elements.
    2. Remove all <login-config> elements and their child elements.
    3. Remove all <security-role> elements and their child elements.
       
  13. Edit the file /opt/grouper/grouper.ws-2.2.2/grouper-ws/build/dist/grouper-ws/WEB-INF/web.xml and make the same changes as above.

    Note that there is a <security-constraint> element that is already commented out as part of an optional ESB listener servlet. Be careful if you delete it because the closing element </security-constraint> is on a line that contains the "close comment" XML syntax "-->"
     
  14. There are three (3) copies of the file grouper.properties that you must edit:

    cd /opt/grouper
    find . -name grouper.properties
    ./grouper.ws-2.2.2/grouper-ws/build/dist/grouper-ws/WEB-INF/classes/grouper.properties
    ./grouper.ui-2.2.2/dist/grouper/WEB-INF/classes/grouper.properties
    ./grouper.apiBinary-2.2.2/conf/grouper.properties

    Edit one of the files and add

    configuration.detect.utf8.file.problems = false

    and then copy the edited version to the other two (2) locations (all 3 copies should be identical).

    Additionally if you are using MariaDB add

    db.log.driver.mismatch = false
  • No labels