Installing IBM Cognos 10.2.1 Business Intelligence on CentOS 6.5
I've started compiling some instructions for installing IBM Cognos 10.2.1 Business Intelligence onto a minimal installation of CentOS 6.5.
It's mostly been going well up until the point of configuring the Cognos Connection website on Apache. At that point it seems to be struggling with loading the mod2_2_cognos.so file. If anybody finds this page and has found a way around this please comment as it's doing my head right in at the moment!
Likewise if you see something you think I'm doing wrong below I'd be very happy to hear from you.
For now though here's what I did:
I've completed the entire installation from a remote command line using the ssh -X command so that graphical output is redirected to my computer.
Creating the service account
Create "cognos" user.
useradd cognos
set his password
passwd cognos
Installing a Desktop Environment
Annoyingly you'll need the a Desktop Environment as the Cognos installer appears to require this.
sudo yum groupinstall "Desktop" "Desktop Platform" "X Window System" "Fonts"
Performing the installation
Locate install file
tar -xvf [name of .tar.gz file]
Next are some pre-requisites that you'll need in order to run the Cognos installer.
sudo yum install glibc (for openmotif libraries)
sudo yum install libXp
sudo yum install libXm.so.4
I had to install the following for 10.2.1 but it wasn't required for 10.1.1:
sudo yum install libgcc_s.so.1
Create the Cognos directories under /opt
sudo yum install glibc (for openmotif libraries)
sudo yum install libXp
sudo yum install libXm.so.4
I had to install the following for 10.2.1 but it wasn't required for 10.1.1:
sudo yum install libgcc_s.so.1
Create the Cognos directories under /opt
sudo mkdir /opt/ibm
sudo mkdir /opt/ibm/cognos
Give ownership to the Cognos user
sudo chown -R cognos /opt/ibm
Then I log on as / su to the Cognos user
navigate to the installation directory that you extracted the installation files to (mine was /opt/software/bi1021/linuxi38664h/) and execute the installer:
./issetup
./issetup
The installer will then load via the graphical interface. Install your required components. At the end you will have the option to load Cognos Configuration, if you select this it will fail to load.
It was complaining about no JAVA_HOME so had to set this.
cd ~
nano .bash_profile
add line below
export JAVA_HOME=/usr/lib/jvm/jre-1.7.0
save / exit
at command line reload the profile using
. .bash_profile
Navigate to the bin64 folder for your installation to manually load Cognos Configuration
cd /opt/ibm/cognos/c10_64/bin64
Then launch Cognos Configuration using the following command:
./cogconfig.sh
I'm not going to go into how to configure Cognos Configuration settings, I'm assuming if you're doing this that you're generally familiar with Cognos' configuration settings and given that each installation is pretty much different to the last I'm leaving out the details from this guide.
After saving the configuration and starting up Cognos it fails to load. This is because Apache Derby DB won't start up properly.
This is because of new java security policies, if you look in the/opt/ibm/cognos/c10_64/logs/derby.log file you will see that it failed to start with the following error:
access denied ("java.net.SocketPermission" "localhost:1527" "listen,resolve")
the solution is to edit the file:
/usr/lib/jvm/jre-1.7.0/lib/security/java.policy
Then you need to add in the line:
permission java.net.SocketPermission "localhost:1527", "listen";
After the first grant. I'm not sure how important is is that it's after the first grant, but that's the solution I found on an unrelated page describing the same error starting Apache Derby.
/usr/lib/jvm/jre-1.7.0/lib/security/java.policy
Then you need to add in the line:
permission java.net.SocketPermission "localhost:1527", "listen";
After the first grant. I'm not sure how important is is that it's after the first grant, but that's the solution I found on an unrelated page describing the same error starting Apache Derby.
After this it will start up and Cognos will start.
Configuring the Cognos Connection website
We first need to install apache, to do this use the following command:
sudo yum install httpd
Now I needed to create a file named cognos.conf in /etc/httpd/conf/ - the file contains the following information:
START OF FILE >>>>>>>>>
LoadModule cognos_module "/opt/ibm/cognos/c10_64/cgi-bin/mod2_2_cognos.so"
LoadModule cognos_module "/opt/ibm/cognos/c10_64/cgi-bin/mod2_2_cognos.so"
<IfModule mod_cognos.c>
CGIBinDir "/opt/ibm/cognos/c10_64/cgi-bin">
</IfModule>
#<Directory />
#Options FollowSymLinks
#AllowOverride All
#</Directory>
ScriptAlias /ibmcognos/cgi-bin/ "/opt/ibm/cognos/c10_64/cgi-bin/"
Alias /ibmcognos "/opt/ibm/cognos/c10_64/webcontent"
#<Directory />
#Options FollowSymLinks
#AllowOverride All
#</Directory>
ScriptAlias /ibmcognos/cgi-bin/ "/opt/ibm/cognos/c10_64/cgi-bin/"
Alias /ibmcognos "/opt/ibm/cognos/c10_64/webcontent"
<Directory "/opt/ibm/cognos/c10_64/cgi-bin">
AllowOverride FileInfo
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
SetHandler cgi-script
Order allow,deny
Allow from all
</Directory>
<Directory "/opt/ibm/cognos/c10_64/webcontent">
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
SetHandler cgi-script
Order allow,deny
Allow from all
</Directory>
<Directory "/opt/ibm/cognos/c10_64/webcontent">
Options FollowSymLinks
AllowOverride FileInfo
Order allow,deny
Allow from all
</Directory>
<Location /ibmcognos/cgi-bin/cognos_module>
SetHandler cognos-handler
Order allow,deny
Allow from all
</Location>
<Location /ibmcognos/cgi-bin/diag_cognos_module>
SetHandler cognos-handler
Order allow,deny
Allow from all
</Location>
<<<<<<<<< END OF FILE
AllowOverride FileInfo
Order allow,deny
Allow from all
</Directory>
<Location /ibmcognos/cgi-bin/cognos_module>
SetHandler cognos-handler
Order allow,deny
Allow from all
</Location>
<Location /ibmcognos/cgi-bin/diag_cognos_module>
SetHandler cognos-handler
Order allow,deny
Allow from all
</Location>
<<<<<<<<< END OF FILE
You need to then edit /etc/httpd/httpd.conf and add the following line at the end:
# load cognos configuration
include /etc/httpd/conf/cognos.conf
include /etc/httpd/conf/cognos.conf
These lines ensure the cognos.conf file is loaded at Apache HTTPD startup.
Now this is where I get into some problems. Apache HTTPD is NOT loading up, instead it is giving an error as follows:
Starting httpd: httpd: Syntax error on line 1012 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/cognos.conf: Cannot load /opt/ibm/cognos/c10_64/cgi-bin/mod2_2_cognos.so into server: libhttpdap2_stub.so: cannot open shared object file: No such file or directory
It turns out that the error is a result of the Apache MOD file not being supported in the versions of Apache httpd included with RHEL versions higher than 5.3.
For now the best thing to do is to comment out the line "LoadModule cognos_module "/opt/ibm/cognos/c10_64/cgi-bin/mod2_2_cognos.so" cognos.conf file and stick with the cognos.cgi defaults instead. In the meantime I will try to find out why the mod is not supported and if there's any workaround.