IBM Business Analytics Proven Practices: Installing the IBM Cognos Lifecycle Manager Tomcat Application Server as a Windows Service

Nature of Document: Tip or Technique; Product(s): IBM Cognos Lifecycle Manager; Area of Interest: Upgrade

This document describes how to register Lifecycle Manager as a Windows service.

Share:

Greg McDonald, Product Manager, IBM

Greg McDonald is a Product Manager on the platform team and has been part of Cognos for 12 years. During that time Greg has work in the Customer Support and Product Management areas. Current product management responsibilities include Lifecycle Manager, Upgrade, Application Lifecycle and Content Manager.



Amrita Sasane, Staff Software Engineer, IBM

Amrita Sasane have 6.5 years experience in Quality Assurance (software testing) out of which 3 years of experience with LCM product and currently leading the QC effort and Automation.



Niraj Modi, Software Developer, IBM

Niraj Modi has 7+ years of Product Development experience in Java/J2EE and open source technologies, and has been leading the Development activities in LCM for the last 3 years.



Amit Nagar, Software Developer, IBM

Amit Nagar has 7+ years of IT Industry experience in Java/J2EE domain, working as Developement Technical Lead in the LCM product for approximately 3 years and undertaking various development-related activities.



Mrunal Lohar, Associate Software Engineer, IBM

Mrunal Lohar works as an Associate Software Engineer on development of the server side and the GUI of the IBM Cognos Lifecycle Manager. She has been part of the Cognos Group for the last 2.5 years.



25 September 2013 (First published 13 July 2011)

Also available in Chinese Russian

Introduction

Purpose

Lifecycle Manager currently runs in a command prompt window. This means that installing Lifecycle Manager on a server can be problematic. Often remaining logged into servers or other remote systems is not allowed and therefore a user must log out. This causes an issue when trying to run Lifecycle Manager as the command window running. Lifecycle Manager will close as soon as the user logs out of the remote server.

Implement this technique to register Lifecycle Manager as a Windows service.

Use this technique along with the "Technique for Securing the Lifecycle Manager Web URI" to begin locking down Lifecycle Manager.

Applicability

This technique was created using Lifecycle Manager 10.1 and Mirosoft Windows 7 but will work on all Microsoft Windows operating systems that are supported by Lifecycle Manager.

Exclusions and Exceptions

To successfully implement this technique, two additional files are required and attached with this document.

  • common.xsl
  • service.bat

Steps to Implement this Technique

Backup the Lifecycle Manager directory structure

It is strongly recommended that Lifecycle Manager be stopped and a backup be taken before going forward with this technique.

Make a backup of the entire Lifecycle Manager directory either by compressing or copying the Lifecycle Manager directory. To make sure that this is a good back up, restore the compressed or copied files to a different location and see if it runs.

Copying the server.xml file

In Windows Explorer, go to the LIFECYCLE MANAGER_install_location\tomcat\conf directory and rename the file "server.xml" to "server.xml.original".

Now go to the LIFECYCLE MANAGER_install_location\webapps\LifecycleManager\WEB-INF and copy the "server.xml" file to the LIFECYCLE MANAGER_install_location\tomcat\conf location.

Update the “log4j.um.server.xml” file

Navigate to the LIFECYCLE MANAGER_install_location\webapps\LifecycleManager\WEB-INF\configuration directory and make a copy of the file “log4j.um.server.xml”. Once the copy is made, edit the file using a text editor.

In the file, look for this section:

<appender name="logfile" class="org.apache.log4j.RollingFileAppender">
		<param name="MaxFileSize" value="10MB"/>
		<param name="File" value=".. /logs/lifecycleManager.log"/>
		<param name="Append" value="true"/>
		<layout class="org.apache.log4j.PatternLayout">
		<param name="ConversionPattern" value="%d{ISO8601} %-5p [%-30.30c]
				 %t: %m %n"/>
		</layout>
</appender>

The following line:

<param name="File" value=".. /logs/lifecycleManager.log"/>

Needs to be updated to specify the fully qualified location of the "lifecycleManager.log" file like the example below:

<param name="File" value="C:/apps/LifecycleManager/logs/lifecycleManager.log"/>

Now the section sould look like this:

<appender name="logfile" class="org.apache.log4j.RollingFileAppender">
		<param name="MaxFileSize" value="10MB"/>
		<param name="File"
			  value="C:/apps/LifecycleManager/logs/lifecycleManager.log"/>
		<param name="Append" value="true"/>		
		<layout class="org.apache.log4j.PatternLayout">
		<param name="ConversionPattern" value="%d{ISO8601} %-5p [%-30.30c]
				 %t: %m %n"/>
		</layout>
</appender>

NOTE: Be sure to keep the "slashes" in the path as seen above.

Close and save the file.

Copy the attached "common.xsl" file to the proper directory

Go to the LIFECYCLE MANAGER_INSTALL_LOCATION\webapps\LifecycleManager\xsl directory and rename the "common.xsl" file to "common.xsl.original. Take a copy of the "common.xsl" file attached with this technique and copy it to the same directory: LIFECYCLE MANAGER_INSTALL_LOCATION\webapps\LifecycleManager\xsl .

Copy the attached "service.bat"

Copy the attached "service.bat" file to the LIFECYCLE MANAGER_INSTALL_LOCATION\bin directory.

Perform the next step only for Cognos 10.2.1 and up

Once the service.bat file has been copied on a 10.2.1 system, edit the file using a text editor.

In the file, look for the following:

set JRE_HOME=%cd%\jre\6.0

And change it to the following:

set JRE_HOME=%cd%\jre\7.0

Install Lifecycle Manager Tomcat as a Windows Service

Start a command window and change directory to LIFECYCLE MANAGER_install_location\bin location to run the service.bat file.

The usage of service command is:

service.bat install/uninstall service_name

install – To install the service
uninstall – To remove the service
service_name - name of the service

Run the following command:

service.bat install LifecycleManager

Note: Service_name is not currently required but should always be specified as problems may occur if the service_name parameter is left blank.

The results will look like this:

Installing the service 'LifecycleManager' ...
Using CURRENT_DIR:      C:\apps\LIFECYCLE MANAGER\LifecycleManager\bin
Using CATALINA_HOME:    C:\apps\LIFECYCLE MANAGER\LifecycleManager\bin\..\tomcat
Using CATALINA_BASE:    C:\apps\LIFECYCLE MANAGER\LifecycleManager\bin\..\tomcat
Using JAVA_HOME:
The service 'LifecycleManager' has been installed.

Now check Windows services for the new service name "Apache Tomcat LifecycleManager". It is important to note that "Apache Tomcat" will be added to the beginning of the Windows service name automatically.

The service can now be started. By default the service is set to a startup type of Manual. If Lifecycle Manager should be started automatically after a system reboot/shutdown/startup, the service startup type should be set to Automatic.

How to uninstall the Lifecycle Manager Windows Service

Start a command window and change directory to LIFECYCLE MANAGER_install_location\bin location.

Run the following command:

service.bat uninstall LifecycleManager

The results will look like this:

The service 'LifecycleManager' has been removed

Now check Windows services and the service name "Apache Tomcat LifecycleManager" will have been removed.

Test Lifecycle Manager

After a successfully installation of the LIFECYCLE MANAGER service, access the LIFECYCLE MANAGER url to test the application.

Example: http://localhost:4797/LifecycleManager


Download

DescriptionNameSize
common.xsl and service.bat fileslcmservicefiles.zip6KB

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Big data and analytics on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Business analytics
ArticleID=699984
ArticleTitle=IBM Business Analytics Proven Practices: Installing the IBM Cognos Lifecycle Manager Tomcat Application Server as a Windows Service
publish-date=09252013