REM on Apache Tomcat
By default REM runs on the Jetty web server bundled in the REM distribution package. The REM application is packaged as a standard war though, so running it on a different servlet container, like Apache Tomcat, is quite straightforward.
You will need:
-
the REM distribution package —
rhino-element-manager-<version>.zip; expanded to a location of your choice. -
an Apache Tomcat installation — either downloaded and configured manually, or installed via a package manager; minimum supported version is
7.0.39.
Setting up Tomcat to run REM
1 |
REM requires a few System Properties to be set in order to function properly. In your Apache Tomcat installation, edit (or create) REM_HOME="$CATALINA_BASE/rem_home" CATALINA_OPTS="-Drem.home=$REM_HOME -Dderby.stream.error.file=$REM_HOME/derby.log -Drem.norestart=true" CLASSPATH="$CATALINA_BASE/bin/rem-rmi.jar" If you wish to have REM store its working files in a different location, you can change the |
2 |
The |
3 |
Copy You should now be able to start Apache Tomcat and access REM at |
Customize REM logging
1 |
Unzip cd apache-tomcat-<version> mkdir rem-tmp cd rem-tmp unzip ../webapps/rem.war WEB-INF/classes/log4j2.properties |
|---|---|
2 |
Edit The default logging configuration is: # log4j 2 configuration
status=error
name=PropertiesConfig
appender.rolling.type=RollingFile
appender.rolling.name=FILE
appender.rolling.fileName=${sys:catalina.base}/logs/rem.log
appender.rolling.filePattern = ${sys:catalina.base}/logs/rem.log.%i
appender.rolling.policies.type = Policies
appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
appender.rolling.policies.size.size=10MB
appender.rolling.strategy.type = DefaultRolloverStrategy
appender.rolling.strategy.max = 10
appender.rolling.layout.type=PatternLayout
appender.rolling.layout.pattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p <%t> [%c] %m{nolookups}%n
logger.rolling.name=rem
logger.rolling.level=INFO
rootLogger.level=INFO
rootLogger.appenderRef.file.ref=FILE
|
3 |
Replace zip ../webapps/rem.war WEB-INF/classes/log4j2.properties |
4 |
Remove temporary files: cd .. rm -rf rem-tmp |
|
|
See the Log4j 2 documentation for more information on logging configuration. |
