静默方式(silent)安装的基本步骤为:
一. OMS SERVER环境准备,REPOSITORY DB环境准备.
二. 下载安装程序,解压缩到安装目录
三. 进行GC_10.2.0.3_full安装(静默方式),选择noconfig的方式.
四. Patch OMS AND AGENT FROM 10.2.0.3 TO 10.2.0.5
使用noconfig方式,只安装软件,不进行配置操作(在升级安装中noconfig常常被用到,一般安装10.2.0.3,升级到10.2.0.5等新版本后,才执行后面的config操作,这样就省去升级repository db对象的操作。)
五. 运行ConfigureGC.pl进行软件安装后的配置,包括OMS的配置,repository db对象的创建。
六. 检查opmn的运行状态,登录GC的em管理界面。
七. 配置agent,增加受监控的数据库节点
[@more@]- 配置OMS SERVER 的ORACLE 用户环境
groupadd oinstall
groupadd dba
useradd -m -g oinstall -G dba oracle
Passed oracle
- 配置OMS SERVER的oracle用户的参数文件
$more /home/oracle/.bash_profile
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
PATH=$PATH:$HOME/bin
export PATH
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_BASE=/oracle/OracleHomes
export ORACLE_HOME=$ORACLE_BASE/oms10g
export OMS_HOME=$ORACLE_BASE/oms10g
export ORACLE_SID=girdctl
export ORACLE_TERM=xterm
export AGENT_HOME=$ORACLE_BASE/agent10g
LD_LIBRARY_PATH=$OMS_HOME/perl/lib/5.6.1:$OMS_HOME/opmn/lib:$OMS_HOME/lib:/lib64:/usr/lib64:/usr/local/lib64:$AGENT_HOME/lib:/lib:/usr/lib:/usr/local/lib:/usr/lib64/gcj-4.1.1:/usr/lib/gcj-4.1.1:/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre/lib/x86_64/server
export PERL5LIB=$OMS_HOME/perl/lib/5.6.1
export PATH=$OMS_HOME/bin:$OMS_HOME/opmn/bin:$AGENT_HOME/bin:$OMS_HOME/bin:$PATH:.
export NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
- 配置OMS SERVER系统环境
#more /etc/security/limits.conf
。。。。。。
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536
#more /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144
#/sbin/sysctl -p
运行下面命令使设置生效/sbin/sysctl -p
#vi /etc/pam.d/login
session required /lib/security/pam_limits.so
增加上面一行内容.
另外需要注意的是:
/tmp 目录保持1.3G空间;$OMS_HOME 保持2.5G 的剩余空间.
- REPOSTORY DB SERVER的配置
Table 8-9 Fixed Initialization Parameter Values
Parameter
Value
job_queue_processes
10
db_block_size
8192
timed_statistics
TRUE
open_cursors
300
session_cached_cursors
200
aq_tm_processes
1
compatible
(default) undo_management
AUTO
undo_retention
10800
undo_tablespace
processes
150
log_buffer
1048576
statistics_level
TYPICAL (Note that this value is specific only to Enterprise Manager 10g Repository Database release and later.)
TEMP space (Tablespace)Foot 1
50 MB (extending to 100 MB)
_b_tree_bitmap_plans
false (hidden parameter)
Repostory db:
alter system set job_queue_processes=10 scope=spfile;
Alter system set timed_statistics=TRUE scope=spfile;
Alter system set open_cursors=300 scope=spfile;
Alter system set session_cached_cursors=200 scope=spfile;
Alter system set aq_tm_processes=1 scope=spfile;
Alter system set undo_management=auto scope=spfile;
Alter system set undo_retention=10800 scope=spfile;
Alter system set processes=150 scope=spfile;
Alter system set log_buffer=1048576 scope=spfile;
Alter system set statistics_level=TYPICAL scope=spfile;
重新启动repostory db,使上面的参数生效.
在安装之前,需要删除REPOSITORY DB资料的信息,具体操作如下:
ON REPOSTITORY DB:
To install Enterprise Manager Grid Control using an existing database, follow these steps:
- If your existing database is configured with Database Control, then ensure that you deconfigure it before you begin the installation of Grid Control.
To deconfigure Database Control for a single instance database, run the following command:/bin/emca -deconfig dbcontrol db -repos drop
To deconfigure Database Control for a Real Application Clusters (RAC) database, run the following command:/bin/emca -deconfig dbcontrol db -repos drop - cluster
After deconfiguring the Database Control, connect to the database as SYS user and run the following SQL files from the Oracle home of the database:/rdbms/admin/dbmspool.sql
Dbmspool.sql 脚本建立了gc需要的对象,不运行则运行安装时会出错.
rdbms/admin/prvtpool.plb Note:The command drops all the public synonyms starting with the following names created by any user for any schema:- 'MGMT$%'
- 'MGMT_%'
- 'SMP_EMD%'
- 'SMP_MGMT%'
- 'SETEMVIEWUSERCONTEXT'
- 'DBMS_SHARED_POOL'
- 'EMD_MNTR'
- 'ECM_UTIL'
最后最好在repostory db上检查,是否还存在sysman用户,如果仍然存在,可以运行下面的命令,进行手工的清楚.(oracle10g的emca ..-repos drop的命令可以完成删除的任务,可以信赖)
drop user sysman cascade;
drop role MGMT_USER;
drop user MGMT_VIEW cascade;
drop public synonym MGMT_TARGET_BLACKOUTS;
drop public synonym SETEMVIEWUSERCONTEXT;
- If your existing database is configured with Database Control, then ensure that you deconfigure it before you begin the installation of Grid Control.
- 在OMS SERVER上创建一个文件连接,安装部分程序包
#ln -s /usr/lib/libgdbm.so.2.0.0 /usr/lib/libdb.so.2
#chmod 755 /usr/lib/libgdbm.so.2.0.0
#chmod 755 /usr/lib/libdb.so.2
# rpm -Uvh libXp-1.0.0-8.1.el5.*
warning: libXp-1.0.0-8.1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
package libXp-1.0.0-8.1.el5.x86_64 is already installed
package libXp-1.0.0-8.1.el5.i386 is already installed
安装libXP包,用于启动X_Windows,如果使用slient安装,则不需要安装这个包
# rpm -Uvh compat-db*
warning: compat-db-4.2.52-5.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:compat-db ########################################### [ 50%]
2:compat-db ########################################### [100%]
[root@OMS Server]# rpm -aq|grep compat-db
compat-db-4.2.52-5.1
compat-db-4.2.52-5.1
# rpm -Uvh openmotif-2.3.1-2*
warning: openmotif-2.3.1-2.el5_4.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:openmotif ########################################### [ 50%]
2:openmotif ########################################### [100%]
[root@OMS Server]# rpm -aq|grep openmotif
openmotif-2.3.1-2.el5_4.1
openmotif22-2.2.3-18
openmotif22-2.2.3-18
openmotif-2.3.1-2.el5_4.1
[root@OMS Server]# rpm -aq|grep pdksh
[root@OMS Server]# ls -lt pdksh*
-r--r--r-- 187 root root 210368 Jul 27 2009 pdksh-5.2.14-36.el5.x86_64.rpm
[root@OMS Server]# rpm -Uvh pdksh-5.2.14-36.el5.x86_64.rpm
warning: pdksh-5.2.14-36.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:pdksh ########################################### [100%]
上面安装GC时系统检查提示需要安装的包.
- 创建repos数据库的密码文件
Repository db:
使用orapwd 生成密码文件$ORACLE_HOME/dbs/orapw
, 在最后进行gc config时,需要在oms使用sys用户身份远程登录到respository db,进行sysman用户创建和sysman schema的创建.$orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=pwdssss entries=5
创建用户密码文件,用于SYS远程登录时的密码文件身份验证.
如果不创建这个密码文件,则在进行oms 配置时,进行emca的资料库创建时,将报无法连接到资料库的错误。因为oms 服务器需要使用sys用户身份远程登录到repos数据库,而如果repos数据库服务器没有这个密码文件,将无法进行远程的身份验证,就导致oms的sys远程登录失败,无法创建sysman用户及其对象。
二. 下载安装程序,解压缩到安装目录
oracle grid control 10g for linux x86_64 的最新full版本是10.2.0.3,而不像gc 10g for linux x86的高full版本是10.2.0.1
oracle grid control 10g for linux x86_10.2.0.3的下载地址:
http://www.oracle.com/technetwork/oem/grid-control/downloads/linuxx8664soft-085949.html
两个文件,称为:Linux_x86_64_Grid_Control_full_102030_disk1.zip,Linux_x86_64_Grid_Control_full_102030_disk2.zip
$cd /setup
$ls
Linux_x86_64_Grid_Control_full_102030_disk1.zip
Linux_x86_64_Grid_Control_full_102030_disk1.zip
$unzip Linux_x86_64_Grid_Control_full_102030_disk1.zip
$unzip Linux_x86_64_Grid_Control_full_102030_disk2.zip
$ls
Linux_x86_64_Grid_Control_full_102030_disk1.zip
Linux_x86_64_Grid_Control_full_102030_disk2.zip
Disk1
三. 进行GC_10.2.0.3_full安装(静默方式),选择noconfig的方式.
安装的版本是: redhat_Linux_x86_64_Grid_Control_full_102030
- 编辑静默安装的RESPONSEFILE文件
$cp /setup/Disk1/responent/em_using_existing_db.rsp /oracle
$cd /oracle
$cat em_using_existing_db.rsp|grep -v ^#|grep -v ^$>em_using_existing_db_new.rsp
如果你不想看太多的参数说明文档,对文件的配置项已经非常熟悉,可以通过上面的命令,去除参数说明内容,使得文件内容更加简洁和易于编辑.
[oracle@ocmdb2 oracle]$ more em_using_existing_db_new.rsp
RESPONSEFILE_VERSION=2.2.1.0.0
UNIX_GROUP_NAME=oinstall
FROM_LOCATION="../oms/Disk1/stage/products.xml"
FROM_LOCATION_CD_LABEL="EM10g"
BASEDIR="/oracle/OracleHomes"
INSTALLATION_NAME="oms10g"
NEXT_SESSION=true
NEXT_SESSION_ON_FAIL=true
DEINSTALL_LIST={"oracle.sysman.top.oms","10.2.0.3.0"}
SHOW_DEINSTALL_CONFIRMATION=true
SHOW_DEINSTALL_PROGRESS=true
REMOVE_HOMES="/oracle/OracleHomes"
ACCEPT_LICENSE_AGREEMENT=true
TOPLEVEL_COMPONENT={"oracle.sysman.top.oms","10.2.0.3.0"}
COMPONENT_LANGUAGES={"en"}
s_reposHost="reposdb"
s_reposPort="1521"
s_reposSID="gridctl"
s_reposDBAPwd="mypwd99"
s_mgmtTbsName="/oradata/gridctl/mgmt.dbf"
s_ecmTbsName="/oradata/gridctl/mgmt_ecm_depot1.dbf"
b_emailSelected=false
s_emailAddress=
s_emailServer=
b_metalinkSelected=false
s_metalinkUser=
s_metalinkPassword=
b_proxySelected=false
EM_PROXYUSER=
EM_PROXYREALM=
EM_PROXYPASSWORD=
EM_PROXYHOST=
EM_DONTPROXYFOR=
EM_PROXYPORT=
s_securePassword="mypwd99"
s_securePasswordConfirm="mypwd99"
b_lockedSelected=true
s_reposPwd="mypwd99"
s_reposPwdConfirm="mypwd99"
n_firstInstanceValidation=2
n_firstReposValidation=1
n_firstReposPwdValidation=2
n_firstSecureValidation=2
n_firstVldnEmailSer=2
b_upgrade=false
b_showOptConfigPage=TRUE
s_installType="NOSEED"
红色显示的内容,是需要根据实际情况进行设置的,这里需要提起注意的是两个数据库文件的设置,文件的路径是repository db服务器上的路径,而不是本机(oms server) 的路径.
配置文件有关email、metalink、proxy的配置,这里不设置,所以将这些内容都屏蔽了.
GC 的基本配置:
1.OMS Server 1台(虚拟机)
2.RepositoryDB Server 1台(虚拟机)
3.OS: RHEL5.5_X86_64
4.Repository Database: 10.2.0.5
5. OMS:10.2.0.5 X86_64
6.AGENT:10.2.0.5
一. OMS SERVER环境准备,REPOSITORY DB环境准备