Issue Fix on Enterprise Manager 10 (The OPMN Process Manager failed to start)

环境:
Oracle Linux 5.2
Oracle Enterprise Manager 10.2

现象及分析过程
在安装过程中出现如下经典报错:

在对上述问题的解决过程中,发现如下错误:
opmn: error while loading shared libraries: libmodapi.so: cannot open shared object file: No such file or directory
$ opmnctl startall:
......
ias-component/process-type/process-set:
    HTTP_Server/HTTP_Server/HTTP_Server
Error
--> Process (pid=13695)
    failed to start a managed process after the maximum retry limit
    Log:
    /u01/app/oracle/oms10g/opmn/logs/HTTP_Server~1

检查上述日志可能得到的两种提示:
/u01/app/oracle/oms10g/Apache/Apache/bin/httpd: error while loading shared libraries: libdb.so.2: cannot open shared object file: No such file or directory
或者
/u01/app/oracle/oms10g/Apache/Apache/bin/apachectl start: execing httpd
Syntax error on line 233 of /u01/app/oracle/oms10g/Apache/Apache/conf/httpd.conf:
Cannot load /u01/app/oracle/oms10g/Apache/Apache/libexec/mod_auth_dbm.so into server: /u01/app/oracle/oms10g/Apache/Apache/libexec/mod_auth_dbm.so: undefined symbol: dbm_fetch
第一个错误是因为没有静态库链接,第二个是因为链接到了错误的静态库

解决方案:
在运行环境中设置  LD_LIBRARY_PATH=$OMS_HOME/lib:$OMS_HOME/opmn/lib
以及
建立正确的静态库链接  ln -s /usr/lib/libgdbm.so.2.0.0 /usr/lib/libdb.so.2
以及
补充缺失的rpm包  rpm -ivh compat-db  (如严格按照安装文档应当不出现此问题)

参考文档
http://docs.oracle.com/cd/E13789_01/bh.100/e13791/troubleshooting.htm
https://community.oracle.com/thread/641992?start=0&tstart=0
请使用浏览器的分享功能分享到微信等