执行srvctl是报错errorwhileloadingsharedlibraries:libpthread.so.0:[oracle@rac02~]$srvctl/opt/ora10g/product/10.2.0/db_1/jdk/jre/bin/java:errorwhileloadingsharedlibraries:libpthread.so.0:cannotopensharedobjectfile:Nosuchfileordirectory查看srvctl命令,正确的应该在?/crs/bin目录下,而本机的却在db_1/bin目录下[oracle@rac02~]$whichsrvctl/opt/ora10g/product/10.2.0/db_1/bin/srvctl查看变量设置[oracle@rac02~]$more.bash_profile#.bash_profile#Getthealiasesandfunctionsif[-f~/.bashrc];then.~/.bashrcfi#UserspecificenvironmentandstartupprogramsPATH=$PATH:$HOME/binexportPATHexportTMP=/tmpexportTMPDIR=$TMPexportORACLE_BASE=/opt/ora10gexportORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1exportORACLE_SID=RACDB1exportORACLE_TERM=xtermexportPATH=/usr/sbin:$PATHexportPATH=$ORACLE_HOME/bin:$PATHexportLD_LIBRARY_PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin/exportCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlibulimit-u16384-n65536umask022这列exportPATH=$ORACLE_HOME/bin:$PATH没有crs_home所以才会找到$ORACLE_HOME/bin下的srvctl$vi/home/oracle/.bash_profile增加以下信息exportCRS_HOME=$ORACLE_BASE/product/10.2.0/crs修改exportPATH=$ORACLE_HOME/bin:$PATH为exportPATH=$CRS_HOME/bin:$ORACLE_HOME/bin:$PATH[oracle@rac02~]$source.bash_profile[oracle@rac02~]$whichsrvctl/opt/ora10g/product/10.2.0/crs/bin/srvctl找到了正确的srvctl命令$vi/opt/ora10g/product/10.2.0/crs/bin/vipca注释掉LD_ASSUME_KERNEL=2.4.19exportLD_ASSUME_KERNEL如下即可#Removethisworkaroundwhenthebug3937317isfixedarch=`uname-m`if["$arch"="i686"-o"$arch"="ia64"-o"$arch"="x86_64"]then#LD_ASSUME_KERNEL=2.4.19#exportLD_ASSUME_KERNEL[oracle@rac02bin]$srvctl用法:srvctl<command><object>[<options>]命令:enable|disable|start|stop|relocate|status|add|remove|modify|getenv|setenv|unsetenv|config对象:database|instance|service|nodeapps|asm|listener有关各个命令和对象的详细帮助,请使用:srvctl<command><object>-h执行srvctl查看OCR注册的数据库信息[oracle@rac02~]$srvctlconfigdatabaseRACDB说明在OCR中注册了一个数据库即RACDB