首页 > 数据库 > Oracle > OCM实验-grid control安装
USERNAME ACCOUNT_STATUS
------------------------------ --------------------------------
OUTLN OPEN
SYS OPEN
SYSTEM OPEN
DBSNMP EXPIRED & LOCKED
WMSYS EXPIRED & LOCKED
TSMSYS EXPIRED & LOCKED
DIP EXPIRED & LOCKED
7 rows selected.
SYS@OCM2>alter user dbsnmp identified by oracle account unlock;
User altered.
SYS@OCM2>select username,account_status from dba_users;
USERNAME ACCOUNT_STATUS
------------------------------ --------------------------------
OUTLN OPEN
SYS OPEN
SYSTEM OPEN
DBSNMP OPEN
WMSYS EXPIRED & LOCKED
TSMSYS EXPIRED & LOCKED
DIP EXPIRED & LOCKED
7 rows selected.
System altered.
SYS@OCM2>@?/rdbms/admin/dbmspool.sql
127.0.0.1 localhost
192.168.152.20
ocm2
192.168.152.10
ocm1
127.0.0.1 localhost.localhost localhost
192.168.152.20
ocm2.com ocm2
192.168.152.10
ocm1.com ocm1
https://community.oracle.com/thread/996240
System altered.
设置session_cached_cursors参数
SYS@OCM2>alter system set session_cached_cursors=300
scope=spfile;
执行dbmspool.sql脚本
下面进入到grid control的安装,这个安装是使用图形界面的。需要使用root账户先执行一个xhost + 命令。
[oracle@ocm2 Disk1]$ ls
dcommon doc index.htm install libskgxn oms rdbms response runInstaller stage
然后启动图形安装界面
[oracle@ocm2 Disk1]$ ./runInstaller

在这个页面,我们选择使用一个存在的数据库。

输入软件的安装路径,这个采用默认设置即可。


这个页面是来检查系统的环境的,这里我们看到出现一个警告。这里需要注意的是出现警告如果忽略可以继续安装,如果出现失败false,这就要进行处理,然后才能继续。
我们先来看看这个警告

这个警告是由于/etc/hosts中的配置引起的。目前的/etc/hosts配置如下
[oracle@ocm2 logs]$ cat /etc/hosts
将其修改为这样
[root@ocm2 ~]# vi /etc/hosts
该问题就可以解决了。
该问题还可以参考如下信息
http://www.itpub.net/thread-1517786-1-1.html

在这个页面,我们需要输入主机名、端口、ORACLE_SID和sys的密码。输入完成后,我们需要点击prefill Tablespace locations
我们需要在数据库上指定两个新表空间存放管理GC资料库对象

然后点击ok

这时出现一个ERROR,open_cursors参数值应该大于300。这个错误我们可以在另外的命令行窗口执行下面的命令
SYS@OCM2>alter system set open_cursors=400
scope=both;





[root@ocm2 lib]# ls -lrt libgd*
-rwxr-xr-x 1 root root 118056 Mar 14 2008 libgdict-1.0.so.5.0.5
-rwxr-xr-x 1 root root 252612 Jan 5 2010 libgd.so.2.0.0
-rwxr-xr-x 1 root root 25652 Sep 26 2012 libgdbm.so.2.0.0
-rwxr-xr-x 1 root root 578312 Jan 9 2013 libgdk-x11-2.0.so.0.1000.4
-rwxr-xr-x 1 root root 62076 Jan 9 2013 libgdk_pixbuf_xlib-2.0.so.0.1000.4
-rwxr-xr-x 1 root root 94272 Jan 9 2013 libgdk_pixbuf-2.0.so.0.1000.4
lrwxrwxrwx 1 root root 16 Jan 8 18:53 libgdbm.so.2 -> libgdbm.so.2.0.0
lrwxrwxrwx 1 root root 14 Jan 8 18:54 libgd.so.2 -> libgd.so.2.0.0 # 我这个之前已经执行过了。
lrwxrwxrwx 1 root root 26 Jan 8 18:55 libgdk-x11-2.0.so.0 -> libgdk-x11-2.0.so.0.1000.4
lrwxrwxrwx 1 root root 34 Jan 8 18:55 libgdk_pixbuf_xlib-2.0.so.0 -> libgdk_pixbuf_xlib-2.0.so.0.1000.4
lrwxrwxrwx 1 root root 29 Jan 8 18:55 libgdk_pixbuf-2.0.so.0 -> libgdk_pixbuf-2.0.so.0.1000.4
lrwxrwxrwx 1 root root 21 Jan 8 19:00 libgdict-1.0.so.5 -> libgdict-1.0.so.5.0.5
然后执行
[root@ocm2 lib]# ln -s libgdbm.so.2.0.0 /usr/lib/libdb.so.2
进入到grid control 安装路径
[oracle@ocm2 ~]$ cd /u01/app/oracle/OracleHomes/oms10g/opmn/bin
[oracle@ocm2 bin]$ ls
argus opmn opmnconfig opmnctl opmnctl.tmp opmndep
启动opmn
[oracle@ocm2 bin]$ ./opmnctl startall
opmnctl: starting opmn and all managed processes...
然后回到安装界面点击 continue.
Starting to execute allroot.sh .........
Starting to execute /u01/app/oracle/OracleHomes/oms10g/root.sh ......
Running Oracle10 root.sh script...
\nThe following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/OracleHomes/oms10g
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
Adding entry to /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished execution of /u01/app/oracle/OracleHomes/oms10g/root.sh ......
Starting to execute /u01/app/oracle/OracleHomes/agent10g/root.sh ......
Running Oracle10 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/OracleHomes/agent10g
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
Finished execution of /u01/app/oracle/OracleHomes/agent10g/root.sh ......
[root@ocm2 lib]#
脚本执行后,进入到注册界面



来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/11590946/viewspace-1069236/ ,如需转载,请注明出处,否则将追究法律责任。