Product:
Planning Analytics 2.0.91
Linux Centos
Problem:
How install PA to Linux server?
Download latest version from IBM;
https://www.ibm.com/support/pages/ibm-planning-analytics-20-fix-lists
Linux commands:
https://ss64.com/bash/
Solution:
Install the Linux distribution with a GUI.
https://getfedora.org/workstation/download/
https://wiki.centos.org/Download
Setup a static IP address on Linux, so it is easy to connect to it with PUTTY and WINSCP.
https://winscp.net/eng/index.php
(Test this steps in you lab first, they may differ because of your flavor of Linux)
Install simple editor:
yum install nano
Install X11 windows system (if needed) on linux:
yum install xorg-x11-server-Xorg xorg-x11-xauth xorg-x11-apps -y
https://www.osradar.com/configure-x11-forwarding-in-centos-rhel-6-7-8-and-fedora-28-29/
In /etc/ssh/sshd_config file set X11Forwarding=yes
Restart the SSH service with command:
systemctl restart sshd
To use X11 you must install Xming on your Windows laptop:
https://sourceforge.net/projects/xming/
Open file C:\Program Files (x86)\Xming\X0.hosts in notepad++
add the IP address of the linux system you want to work with

Restart the Xming program on your Windows laptop.
Install C++ libraries:
yum -y install libstdc++ libstdc++.i686 motif libXm.so.4 libXtst
Create a installations folder:
mkdir -p /data/installationsmedia
Copy the file tm1_linuxi38664h_2.0.91.41_ml.tar.gz to the linux server with WINSCP.
Change to root user:
su –
Go to the folder where media are:
cd /data/installationsmedia
Unzip the file:
tar -xf tm1_linuxi38664h_2.0.91.41_ml.tar.gz
Go to the linuxi38664h folder:
cd linuxi38664hprof
Check that you have execute permissions on the files:
ls -al
Run the installation:
./issetup


Click next for the installation.

select production if it is a production server.

All components are selected above.


Create a user:
groupadd cognosusers
useradd cognos -g cognosusers -m
passwd cognos
Install java:
Download from here https://developer.ibm.com/javasdk/downloads/sdk8/
Copy file ibm-java-x86_64-jre-8.0-6.10.bin to linux server.
Go to folder where the media is. Copy to data folder with command:
cp ibm-java-x86_64-jre-8.0-6.10.bin /data/
Go to data folder:
cd /data
Change to be able to execute:
chmod 777 ibm-java-x86_64-jre-8.0-6.10.bin
Run install of java with command:
./ibm-java-x86_64-jre-8.0-6.10.bin

Click OK to English as language

Select “i accept..” and click Next

Click Next
Click Next

Click Install

Click Done
Create environment values (only if they are needed):
JAVA_HOME /opt/ibm/java-x86_64-80/jre
LD_LIBRARY_PATH /opt/ibm/cognos/tm1_64/webapps/pmpsvc/WEB-INF/bin64/
Do not edit the /etc/bashrc file, instead create a custom.sh shell script in folder /etc/profile.d/ to make custom changes to your environment for all users

Go to folder /etc/profile.d/ and create a new cognos.sh file to store your variables.
export JAVA_HOME=/opt/ibm/java-x86_64-80/jre
export LD_LIBRARY_PATH=”/opt/ibm/cognos/tm1_64/webapps/pmpsvc/WEB-INF/bin64:$LD_LIBRARY_PATH”
export PATH=”$PATH:/opt/ibm/cognos/tm1_64/bin64″
export DISPLAY=’192.168.1.11:0.0′

You must set the IP of the windows laptop you run Xming on to the export DISPLAY command.
Enter . ./cognos.sh to activate the settings above. In some Linux installations you do not need above values – as they are already configured, then it can be enough to only type JAVA_HOME=/opt/ibm/java-x86_64-80/jre before your command.
Enter env to check the variables values.
Change the file block value:
sysctl -w vm.max_map_count=1310600
Create a folder for the tm1 applications (tm1 do not work well with long paths):
mkdir -p /data/pa
Change users to have access to the folders:
chmod -R 777 /data/pa
chmod -R 777 /opt/ibm/cognos
Change owner to the cognos account:
chown –R cognos:cognosusers /data/pa/
chown –R cognos:cognosusers /opt/ibm/cognos/
To start Cognos Configuration:
LD_LIBRARY_PATH=/opt/ibm/cognos/tm1_64/webapps/pmpsvc/WEB-INF/bin64/ JAVA_HOME=/opt/ibm/java-x86_64-80/jre /opt/ibm/cognos/tm1_64/bin64/cogconfig.sh
Set the memory for the TM1WEB to higher number if TM1WEB is used.

Use only FQDN instead of localhost in TM1 Application.

Only to be sure add the company domain and all tm1 servers to the valid domain list for the Cognos Application Firewall.

Do all configuration and press save icon.
Start the service to see that they do not give errors.

Stop the service in cognos configuration and exit cognos configuration.
Open ports in firewall for TM1 on linux:
firewall-cmd --zone=public --add-port=5495/tcp --permanent
firewall-cmd --zone=public --add-port=5498/tcp --permanent
firewall-cmd --zone=public --add-port=12345/tcp --permanent
firewall-cmd --zone=public --add-port=53333/tcp --permanent
firewall-cmd --zone=public --add-port=5895/tcp --permanent
firewall-cmd --zone=public --add-port=5898/tcp --permanent
firewall-cmd --zone=public --add-port=9510/tcp --permanent
firewall-cmd --reload
firewall-cmd --list-ports
(you may need to open more ports in the Linux firewall for your TM1 applications)

Update the values for TM1WEB if used, in file (nano /opt/ibm/cognos/tm1_64/webapps/tm1web/web-inf/configuration/tm1web_config.xml)
<!– CubeViewerRowPageSize: Number of rows to fetch in a page of cubeviewer –>
<add key=”CubeViewerRowPageSize” value=”200” />
<!– CubeViewerColumnPageSize: Number of columns to fetch in a page of cubeviewer –>
<add key=”CubeViewerColumnPageSize” value=”100” />
Use the scripts to start and stop the PA services.

Create unit service files with the configuration to prepare for systemd services, like the tm1 admin service.
nano /usr/lib/systemd/system/tm1adminsrv.service
That have this content:
[Unit]
Description=Cognos TM1 – tm1 admin server.service
After=network.target auditd.service
Documentation=https://www.ibm.com
[Service]
Type=forking
Environment=”LD_LIBRARY_PATH=/opt/ibm/cognos/tm1_64/bin64:/usr/lib:/lib:$LD_LIBRARY_PATH”
Environment=”JAVA_HOME=/opt/ibm/java-x86_64-80/jre”
Environment=”TM1_PATH=/opt/ibm/cognos/tm1_64/bin64″
ExecStart=/opt/ibm/cognos/tm1_64/bin64/startup_tm1admsrv.sh
ExecStop=kill `ps -e | grep “tm1admsrv.exe” | awk ‘{print $1}’`
# the user must have full access to the folders
User=cognos
WorkingDirectory=/opt/ibm/cognos/tm1_64
# Kill root process
KillMode=process
# Wait up to 30 seconds for service to start/stop
TimeoutStartSec=120
TimeoutStopSec=60
# Remove process, file, thread limits
#
LimitNPROC=infinity
LimitNOFILE=infinity
TasksMax=infinity
# Restart on non-successful exits.
Restart=on-failure
# Don’t restart if we’ve restarted more than 3 times in 2 minutes.
StartLimitInterval=120
StartLimitBurst=3
[Install]
WantedBy=multi-user.target
To start the service enter (use this first to test and ensure your unit file works):
systemctl start tm1adminsrv.service
To make the service start after a reboot of linux enter:
systemctl enable tm1adminsrv.service

After unit files are created you can stop/start the tm1 services with these commands:
- Start service: systemctl start [Name of Service]
- Stop service: systemctl stop [Name of Service]
- Restart service: systemctl restart [Name of Service]
- Status of service: systemctl status [Name of Service]
Create the file for TM1 Application web
nano /usr/lib/systemd/system/tm1app.service
That have this content:
[Unit]
Description=Cognos TM1 – Application server
After=network.target auditd.service
Documentation=https://www.ibm.com
[Service]
Type=forking
Environment=”JAVA_HOME=/opt/ibm/java-x86_64-80/jre”
# we use the script to start and stop
ExecStart=/opt/ibm/cognos/tm1_64/bin64/startwlp.sh
ExecStop=/opt/ibm/cognos/tm1_64/bin64/stopwlp.sh
User=cognos
WorkingDirectory=/opt/ibm/cognos/tm1_64/bin64
# Kill root process
# KillMode=process
# Wait up to 30 seconds for service to start/stop
TimeoutStartSec=120
TimeoutStopSec=60
# Remove process, file, thread limits
LimitNPROC=infinity
LimitNOFILE=infinity
TasksMax=infinity
# Restart on non-successful exits.
# Restart=on-failure
# Don’t restart if we’ve restarted more than 3 times in 2 minutes.
# StartLimitInterval=120
# StartLimitBurst=3
[Install]
WantedBy=multi-user.target
Create the file for TM1 planning sample (update for your TM1 instance)
nano /usr/lib/systemd/system/tm1plansamp.service
That have this content:
[Unit]
Description=Cognos TM1 – Planning Sample
After=network.target auditd.service tm1adminsrv.service
Documentation=https://www.ibm.com
[Service]
Type=forking
Environment=”LD_LIBRARY_PATH=/opt/ibm/cognos/tm1_64/bin64:/usr/lib:/lib:$LD_LIBRARY_PATH”
Environment=”JAVA_HOME=/opt/ibm/java-x86_64-80/jre”
Environment=”TM1_PATH=/opt/ibm/cognos/tm1_64/bin64″
# the case of the letters in path is important
ExecStart=/opt/ibm/cognos/tm1_64/bin64/tm1s.exe -w -z /opt/ibm/cognos/tm1_64/samples/tm1/PlanSamp
ExecStop=kill -s INT `ps -ef | grep “tm1s.exe -w -z /opt/ibm/cognos/tm1_64/samples/tm1/PlanSamp” | grep -v grep | awk ‘{print $2}’`
# must be root to be able to kill this process
User=root
WorkingDirectory=/opt/ibm/cognos/tm1_64/bin64
# Kill root process
KillMode=process
# Wait up to 30 seconds for service to start/stop
TimeoutStartSec=120
TimeoutStopSec=60
# Remove process, file, thread limits
LimitNPROC=infinity
LimitNOFILE=infinity
TasksMax=infinity
# Restart on non-successful exits.
Restart=on-failure
# Don’t restart if we’ve restarted more than 3 times in 2 minutes.
StartLimitInterval=120
StartLimitBurst=3
[Install]
WantedBy=multi-user.target

You need to test the start and stop a few times to get the commands correct.

Check in TM1 architect that you can reach the TM1 instance from your laptop.
If you edit the unit file, you must run this command to reload the file:
systemctl daemon-reload
To list running TM1 instance on Linux, enter this command:
ps -ef | grep “tm1s.exe”
To check the service running use this command:
systemctl list-units –type=service
To remove failed service enter this command:
systemctl reset-failed
If the TM1 instance is run with systemd, as above, then you must in each TM1s.cfg file have this value:
RunningInBackground=F
More information:
https://www.ibm.com/support/pages/how-install-cognos-analytics-1111-rhel-76-0
https://www.ibm.com/support/knowledgecenter/SSD29G_2.0.0/com.ibm.swg.ba.cognos.tm1_inst.2.0.0.doc/t_tm1_instunixlinux.html
https://developer.ibm.com/technologies/linux/tutorials/l-lpic1-106-1/
http://www.geo.mtu.edu/geoschem/docs/putty_install.html
https://cc.jlab.org/windows/X11onWindows
https://www.digitalocean.com/community/tutorials/understanding-systemd-units-and-unit-files
https://www.ibm.com/support/pages/how-manage-your-tm1-application-server-java-memory
https://www.cyberciti.biz/faq/how-to-check-open-ports-in-linux-using-the-cli/
https://www.thegeekdiary.com/how-to-open-a-ports-in-centos-rhel-7/
https://www.ibm.com/support/knowledgecenter/SSD29G_2.0.0/com.ibm.swg.ba.cognos.tm1_inst.2.0.0.doc/c_inst_troubleshooting_timeouts.html
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_basic_system_settings/managing-services-with-systemd_configuring-basic-system-settings
https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
https://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html
AWK tutorial: find and kill process use awk
Note that use of ODBC drivers on Linux demand a expensive license. Recommend to only use csv files to transfer data to and from TM1 on Linux.
Example on PA https://www.youtube.com/watch?v=x-VQ0Nr-Pg0