by Matt Simons, Practice Lead
I was setting up a new CentOS machine the other day in our lab to use as an Optim 9.1 Server (now, CentOS is not an officially supported operating system for running the Optim Server components - its true - but we use it in our lab environments since its the closest thing to Red Hat Enterprise Linux) and I hit upon an issue. See, all of the components (Runtime Services, WebSphere, Optim Manager, Optim Connection Manager) work fine except for the process of installing the WAS-CE instance as a daemon (I hate having to remember to start things every time).
I was setting up a new CentOS machine the other day in our lab to use as an Optim 9.1 Server (now, CentOS is not an officially supported operating system for running the Optim Server components - its true - but we use it in our lab environments since its the closest thing to Red Hat Enterprise Linux) and I hit upon an issue. See, all of the components (Runtime Services, WebSphere, Optim Manager, Optim Connection Manager) work fine except for the process of installing the WAS-CE instance as a daemon (I hate having to remember to start things every time).
If you follow the documentation (install_config_optim.html), it tells you to execute a script (setup-mgmtserver-as-daemon.sh, located in /opt/IBM/InfoSphere/Optim/shared/WebSphere/AppServerCommunityEdition/bin by default) which will generate a new file (optimmgmtserver) that is to be copied to the appropriate startup directories and then hooked up to the init processing (by building symbolic links or using chkconfig depending on the platform). The problem is that on a CentOS machine, executing the setup-mgmtserver script doesn't do anything. And doesn't give you any reason why. So what's the deal?
If you examine the script, you will see around line 359 that if the system is a Linux host (which it determines by running uname) it attempts to determine the flavor of Linux by executing lsb_release -d and searching for the 2nd word in the result (awk '{ print $2 }'). It then uses the results of that awk to know what version of the startup script to generate.
OK, long explanation, so here's the meat of it. The only valid responses to the result of the awk (that is, responses that will lead to actually generating the script) are Red, AIX, SunOS, and Unbuntu. If awk '{ print $2 }' doesn't give you one of those, no script will be generated. So how to get around this? Just add the following block:
elif [ "$FLAVOR" = "CentOS" ]
then
createRedHatScript
into the section that chooses which script to generate (the very end of the whole setup-mgmtserver file). Since CentOS is 100% binary compatible to RedHat, the RHEL version of the optimmgmtserver script is the most appropriate choice.
Once this block is added to the $FLAVOR evaluation, you can run the setup-mgmtserver file and continue following the directions as if this was any other Red Hat host (copying to /etc/init.d, running chkconfig, etc).
Please note! (and remember!) that CentOS is not officially supported as an Optim Server OS, so this is not intended to circumvent that requirement. However, if you need a new lab or sandbox environment and don't have a RHEL subscription, this should help you cross the last hurdle to a fully functioning Optim Server.
Enjoy!
Enjoy!
No comments:
Post a Comment