在使用远程安装gc clinet的agent时,执行agentDownload.linux命令,遇到了"Please specify a Unique Oracle Base directory"的错误,本文描述了解决这个问题的方法和步骤.
主要的方法是: 修改/etc/oraInst.loc文件,将本次agent安装的日志存放在一个新的目录中(本次为/oracle/oraInventory2)
另外的一个方法: 备份旧的inventory内容,清空inventory 目录,完成安装后,恢复回来.
[@more@]一. 问题描述:
Oms server:
$cd $ORACLE_HOME/sysman/agent_download/10.2.0.5.0
$ rm -rf *
$unzip /setup/Linux_Grid_Control_agent_download_10_2_0_5_0.zip -d /oracle/OracleHomes/sysman/agent_download/10.2.0.5.0
$cp agent_download.rsp.bak agent_download.rsp
Gc client:
$mkdir /oracle/OracleHomes/agent10g
$cd /oracle/OracleHomes/agent10g
$rm -rf *
$wget http://ocmdb2:4889/agent_download/10.2.0.5.0/linux/agentDownload.linux
--2010-08-10 16:43:13-- http://ocmdb2:4889/agent_download/10.2.0.5.0/linux/agentDownload.linux
Resolving ocmdb2... 192.168.182.128
Connecting to ocmdb2|192.168.182.128|:4889... connected.
HTTP request sent, awaiting response... 200 OK
Length: 34130 (33K) [text/plain]
Saving to: `agentDownload.linux.1'
100%[======================================>] 34,130 --.-K/s in 0.001s
2010-08-10 16:43:13 (38.1 MB/s) - `agentDownload.linux.1' saved [34130/34130]
$export ORACLE_HOME=/oracle/OracleHomes
$./agentDownload.linux -b /oracle/OracleHomes -m ocmdb2 -r 4889
……
Enter Agent Registration Password:
…...
Launching Oracle Installer ...
Executing /oracle/OracleHomes/agent10g/agentDownload10.2.0.5.0Oui/Disk1/runInstaller -ignoreSysPrereqs -waitforcompletion -force -responseFile /oracle/OracleHomes/agent10g/agentDownload10.2.0.5.0Oui/agent_download.rsp -silent b_doDiscovery=TRUE b_startAgent=TRUE -sourceLoc http://ocmdb2:4889/agent_download/10.2.0.5.0//linux/agent/stage/products.xml FROM_LOCATION=http://ocmdb2:4889/agent_download/10.2.0.5.0//linux/agent/stage/products.xml -baseDir /oracle/OracleHomes CLUSTER_NODES={} s_OMSHost="ocmdb2" s_OMSPort="4889"
Starting Oracle Universal Installer...
Checking installer requirements...
Checking operating system version: must be enterprise-4, enterprise-5, redhat-3, redhat-4, redhat-5, redhat-5.1, SuSE-9, SuSE-10, UnitedLinux-1.0, asianux-1 or asianux-2
Passed
All installer requirements met.
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2010-08-10_03-54-46PM. Please wait ...Completed with Status=255
Please specify a Unique Oracle Base directory, or remove previously installed products and their directories. Directory name should contain only valid alphanumeric characters, including '_', or '.' characters.
Removing the copied stuff.....
Removed: /oracle/OracleHomes/agent10g/agentDownload10.2.0.5.0Oui/oui_linux.jar
Removed: /oracle/OracleHomes/agent10g/agentDownload10.2.0.5.0Oui/agent_download.rsp
Removed:/oracle/OracleHomes/agent10g/agentDownload10.2.0.5.0Oui/Disk1
Log name of installation can be found at: "/oracle/OracleHomes/agentDownload.linux081010155440.log"
二. 问题分析与解决
尝试了几次从远程安装agent都失败,都报"Please specify a Unique Oracle Base directory"错误.
在网站找到一个朋友的提示,可能是inventory的问题,尝试修改inventory,获得的安装成功.
两个修改inventory 的方法:
方法一. 使用root用户身份,修改/etc/oraInst.loc 文件,
#vi /etc/oraInst.loc
Modify:
inventory_loc=/oracle/oraInventory
inst_group=oinstall
To:
inventory_loc=/oracle/oraInventory2
inst_group=oinstall
方法二. 备份inventory目录后,清空该目录,安装完成后,再恢复回去.
$tar -cvf /setup/oraInventory_old.tar /oracle/oraInventory
$rm -rf /oracle/oraInventory/*
...
然后执行安装
Gc client:
$rm -rf /oracle/OracleHomes/agent10g/*
$cd /oracle/OracleHomes/agent10g
$wget http://ocmdb2:4889/agent_download/10.2.0.5.0/linux/agentDownload.linux
$chmod u+x agentDownload.linux
$export ORACLE_HOME=/oracle/OracleHomes/agent10g
$./agentDownload.linux -b /oracle/OracleHomes -m ocmdb2 -r 4889
……
#Root script to run
/oracle/OracleHomes/agent10g/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as "root"
3. Run the scripts
打开一个窗口,使用root身份,运行/oracle/OracleHomes/agent10g/root.sh
$cd /oracle/OracleHomes/agent10g/bin
$./emctl secure agent
[oracle@ocmdb1 bin]$ ./emctl secure agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
Agent successfully stopped... Done.
Securing agent... Started.
Enter Agent Registration Password :
Agent successfully restarted... Done.
Securing agent... Successful.
到此安装完成.
三 . 问题总结:
通过以上的操作,我们基本上明白了,错误之源在于oraInventory目录的设置,只需要修改/etc/oraInst.loc文件,将本次agent安装的日志存放在一个新的目录中(本次为/oracle/oraInventory2),与原来安装DB的inventory分开,就可以避免报"Please specify a Unique Oracle Base directory"错误.这个问题在redhat 5.3_x86上遇到,在redhat5.3 x86_64位上好像没有遇到,也许是oracle的安装程序脚本存在一些bug.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/32980/viewspace-1036581/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/32980/viewspace-1036581/