Install gc agent on client is getting 'Please specify a Unique Oracle Base directory'(redhat 5.3_x8

djb1008發表於2010-08-10

在使用遠端安裝gc clinetagent,執行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

--2010-08-10 16:43:13--

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 FROM_LOCATION= -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

$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),與原來安裝DBinventory分開,就可以避免"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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章