LeasePak

mPower Server

System Requirements

Review the hardware and software requirements for the mPower server. You must install and configure all required software before installing the mPower program files.

Required Configurations

Apache

Modify the file httpd.conf as shown below, substituting your values as necessary

# optional READ APACHE DOCS!!!!!!
ServerTokens Prod
		 
# optional READ APACHE DOCS!!!!!!
ServerSignature Off

# optional -> directory index should already exist and be set to 
# something like index.html index.htm I suggest adding index.jsp 
# as well
DirectoryIndex   index.jsp
		
# path to YOUR modjk module it may be mod_jk.so if UNIX/Linux/BSD
LoadModule jk_module modules/mod_jk.so
		
# path to the mod jk config file
Include "<path to mod_jk confi>conf/mod_jk.conf"
		
# these are some SSL settings for Apache
# SSL 
SSLMutex sem
SSLRandomSeed startup builtin
SSLSessionCache none
		
ErrorLog logs/ssl.log
		
# this line is optional
# at MSI we wanted all requests to mpower to be redirected to the mpower URL
RedirectMatch permanent    http\:*/mpower*       https://<web server name>/mpower
		
# note both above and here the webserver name should be changed 
<VirtualHost <webserver name>:443>
    SSLEngine On
    SSLCertificateFile conf/ssl/server.crt
    SSLCertificateKeyFile conf/ssl/server.key
</VirtualHost>

# also needed it a directory for mpower documents from dxGen
# something like  
Alias /mpower_docs "/var/www/httpd/mpower_docs"
<Directory "/var/www/httpd/mpower_docs ">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

 

mod_jk

Modify the file mod_jk.conf as shown below, substituting your values as necessary

# CHANGE THE PATHS TO MEET YOUR SYSTEM OR IT WONT WORK
<IfModule mod_jk.c>

SetEnv JAVA_HOME "/usr/java/j2sdk1.4.2_02/"
SetEnv CLASSPATH
"/var/tomcat4/common/lib;$JAVA_HOME/lib/tool.jar;/var/tomcat4/mpower/WEB-INF
/classes"

Alias /mpower "/var/tomcat4/webapps/mpower"
<Directory "/var/tomcat4/webapps/mpower">
    SSLRequireSSL
    Options Indexes FollowSymLinks
</Directory>

JkMount /mpower/servlet/* ajp13
JkMount /mpower/*.jsp ajp13
JkMount /mpower/*.do ajp13

<Location "/mpower/WEB-INF/">
    AllowOverride None
    deny from all
</Location>

</IfModule>

JkWorkersFile "/etc/httpd/conf/workers.properties"
JkLogFile "/var/tomcat4/logs/mod_jk.log"
#
JkLogLevel debug

 

Tomcat

If necessary, configure the following files to make sure you have the correct connector in Tomcat.

server.xml

<!-- MAKE SURE THAT YOU HAVE THE RIGHT CONNECTOR -->
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector" acceptCount="10" 
    bufferSize="2048" compression="off" connectionLinger="-1" connectionTimeout="20000" 
    debug="0" disableUploadTimeout="false" enableLookups="true" maxKeepAliveRequests="100" 
    maxProcessors="75" minProcessors="5" port="8009" 
    protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler" proxyPort="0" 
    redirectPort="8443" scheme="http" secure="false" tcpNoDelay="true" 
    useURIValidationHack="false"> <Factory className="org.apache.catalina.net.DefaultServerSocketFactory"/>
</Connector>

workers.properties

Refer to the Tomcat documentation to ensure that this file is set up correctly for your system.

 

 

Installation

To install and configure the mPower software

  1. Make sure Tomcat is running
  2. Copy the file mpower.war to the CATALINA_HOME/webapps directory
  3. Tomcat should deploy the file automatically. If it doesn't, restart Tomcat
  4. If Tomcat still doesn't deploy the file, run the following command
    $JAVA_HOME/bin/jar -xvf mpower.war
    this will deploy the file and create the mpower directory.
  1. On the LeasePak server, set up a service for the mPower daemon mPowerd in the inetd/xinetd directory.
  2. On the mPower server, edit the following parameters in the file leasepak.xml, located in CATALINA_HOME/webapps/mpower.
    <TCP_IP_ADDRESS>leasepak_server</TCP_IP_ADDRESS>
    <ENVIRONMENT>leasepak_environment</ENVIRONMENT> 
    <PORT>mPowerd_port</PORT> 
    

    where leasepak_server is the IP address or name of your LeasePak server, leasepak_environment is the name of the LeasePak environment, and mPowerd_port is the TCP port number for the mPowerd daemon (not the leasepakd daemon)

  3. In the WEB-INF directory edit the web.xml file. The six customizable values are in the site customize here section towards the end of the file. The default values are from the MSI test installation; you must edit these values before using mPower.
    <!-- ************************************** -->
    <!-- site customize here -->
    <!-- ************************************** -->
    <!-- this is the URL to the base of the server -->
    <env-entry>
    <env-entry-name>SERVER_BASE_URL</env-entry-name>
    <env-entry-value>https://joea/mpower-</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
    
    <!-- this is the actual filesystem location of the server
        the trailing slash is important -->
    <env-entry>
    <env-entry-name>SERVER_ROOT</env-entry-name>
    <env-entry-value>/var/tomcat4/webapps/mpower-/</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
    
    <!-- this is the URL to the docgen web service -->
    <env-entry>
    <env-entry-name>docgen_endpoint</env-entry-name>
    <env-entry-value>http://silk3:8080/dxGen-/services/DocGenWsdl</env-entry
    -value>
    <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
    
    <!-- note the path below is used internal to the web server
     	so it needs to have / instead of \ EVEN IF it
    	may be running under windows
    	it also MUST contain the trailing / -->
    <env-entry>
    <env-entry-name>docgen_localdir</env-entry-name>
    <env-entry-value>/var/www/html/mpower_docs/</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
    
    <!-- this should be the output directory or what the webserver sees -->
    <env-entry>
    <env-entry-name>docgen_webdirectory</env-entry-name>
    <env-entry-value>/mpower_docs/</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
    
    <!-- directory to have log files put
        if not found then it use SERVER_ROOT -->
    <env-entry>
    <env-entry-name>LOGFILE_DIRECTORY</env-entry-name>
    <env-entry-value>/var/tomcat/webapps/mpower-/logs/</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
    
    <!-- ************************************** -->
    <!-- site customize ends here -->
    <!-- ************************************** -->