ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Install Oracle 12cR2 CloudControl

Install Oracle 12cR2 CloudControl

原创 Linux操作系统 作者:DBA_oracle_java 时间:2013-07-08 09:34:20 0 删除 编辑
1.环境准备
[root@12c-CloudControl ~]# uname -m
x86_64
[root@12c-CloudControl ~]# lsb_release -id
Distributor ID: EnterpriseEnterpriseServer
Description:    Enterprise Linux Enterprise Linux Server release 5.7 (Carthage)
[root@12c-CloudControl ~]# 

[root@12c-CloudControl ~]# free -m
             total       used       free     shared    buffers     cached
Mem:          3957       2828       1129          0        114       2285
-/+ buffers/cache:        428       3529
Swap:         4996          0       4996

2.下载COLUDCONTROL安装介质
http://www.oracle.com/technetwork/oem/grid-control/downloads/linuxx8664soft-085949.html


3.配置系统环境
据说在OEL中有个oracle-validated,可以在EM主机上安装必要的rpm 软件包以及调整/etc/sysctl.conf中的内核参数

有关于oracle-validated的相关链接:
http://www.oracledatabase12g.com/archives/understand-oracle-validated-configurations.html

3.1 mount 光盘
[root@12c-CloudControl ~]# mount /dev/sr0 /mnt/cdrom/
mount: block device /dev/sr0 is write-protected, mounting read-only

[root@12c-CloudControl ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              25G  9.5G   14G  42% /
tmpfs                 2.0G     0  2.0G   0% /dev/shm
/dev/sr0              3.6G  3.6G     0 100% /media/OL5.7 x86_64 dvd 20110728
/dev/sr0              3.6G  3.6G     0 100% /mnt/cdrom

3.2 touch /etc/yum.repos.d/public-yum-el5.repo,并加入以下内容
[root@12c-CloudControl ~]# touch /etc/yum.repos.d/public-yum-el5.repo
[oel5]
name = Enterprise Linux 5.7 DVD
baseurl=file:///mnt/cdrom/Server/
gpgcheck=0
enabled=1
EOF


3.3 正式安装oracle-validated软件包环境,使用yum install oracle-validated 命令
[root@12c-CloudControl ~]# yum install oracle-validated
Loaded plugins: rhnplugin, security
This system is not registered with ULN.
ULN support will be disabled.
oel5                                                                                                         | 1.1 kB     00:00     
oel5/primary                                                                                                 | 1.4 MB     00:00     
oel5                                                                                                                      3275/3275
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package oracle-validated.x86_64 0:1.1.0-14.el5 set to be updated
oel5/filelists                                                                                               | 3.1 MB     00:00     
--> Processing Dependency: sysstat for package: oracle-validated
--> Processing Dependency: /usr/lib/libaio.so for package: oracle-validated
--> Processing Dependency: unixODBC-devel for package: oracle-validated
--> Processing Dependency: /usr/lib64/libodbccr.so for package: oracle-validated
--> Processing Dependency: libaio-devel for package: oracle-validated
--> Processing Dependency: /usr/lib/libodbc.so.1 for package: oracle-validated
--> Processing Dependency: /usr/lib64/libaio.so for package: oracle-validated
--> Processing Dependency: /usr/lib/libodbccr.so for package: oracle-validated
--> Processing Dependency: libXp.so.6 for package: oracle-validated
--> Processing Dependency: libdb-4.2.so()(64bit) for package: oracle-validated
--> Processing Dependency: libodbc.so.1()(64bit) for package: oracle-validated
--> Running transaction check
---> Package compat-db.x86_64 0:4.2.52-5.1 set to be updated
---> Package libXp.i386 0:1.0.0-8.1.el5 set to be updated
---> Package libaio-devel.i386 0:0.3.106-5 set to be updated
---> Package libaio-devel.x86_64 0:0.3.106-5 set to be updated
---> Package sysstat.x86_64 0:7.0.2-11.el5 set to be updated
---> Package unixODBC.i386 0:2.2.11-7.1 set to be updated
---> Package unixODBC.x86_64 0:2.2.11-7.1 set to be updated
---> Package unixODBC-devel.i386 0:2.2.11-7.1 set to be updated
---> Package unixODBC-devel.x86_64 0:2.2.11-7.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================
 Package                              Arch                       Version                             Repository                Size
====================================================================================================================================
Installing:
 oracle-validated                     x86_64                     1.1.0-14.el5                        oel5                      24 k
Installing for dependencies:
 compat-db                            x86_64                     4.2.52-5.1                          oel5                     1.6 M
 libXp                                i386                       1.0.0-8.1.el5                       oel5                      22 k
 libaio-devel                         i386                       0.3.106-5                           oel5                      12 k
 libaio-devel                         x86_64                     0.3.106-5                           oel5                      11 k
 sysstat                              x86_64                     7.0.2-11.el5                        oel5                     187 k
 unixODBC                             i386                       2.2.11-7.1                          oel5                     830 k
 unixODBC                             x86_64                     2.2.11-7.1                          oel5                     835 k
 unixODBC-devel                       i386                       2.2.11-7.1                          oel5                     743 k
 unixODBC-devel                       x86_64                     2.2.11-7.1                          oel5                     799 k

Transaction Summary
====================================================================================================================================
Install      10 Package(s)
Upgrade       0 Package(s)

Total download size: 5.0 M
Is this ok [y/N]: Y
Downloading Packages:
------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                               419 MB/s | 5.0 MB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : unixODBC                                                                                                    1/10 
  Installing     : sysstat                                                                                                     2/10 
  Installing     : compat-db                                                                                                   3/10 
  Installing     : unixODBC                                                                                                    4/10 
  Installing     : unixODBC-devel                                                                                              5/10 
  Installing     : unixODBC-devel                                                                                              6/10 
  Installing     : libaio-devel                                                                                                7/10 
  Installing     : libaio-devel                                                                                                8/10 
  Installing     : libXp                                                                                                       9/10 
  Installing     : oracle-validated                                                                                           10/10 

Installed:
  oracle-validated.x86_64 0:1.1.0-14.el5                                                                                            

Dependency Installed:
  compat-db.x86_64 0:4.2.52-5.1       libXp.i386 0:1.0.0-8.1.el5  libaio-devel.i386 0:0.3.106-5  libaio-devel.x86_64 0:0.3.106-5  
  sysstat.x86_64 0:7.0.2-11.el5       unixODBC.i386 0:2.2.11-7.1  unixODBC.x86_64 0:2.2.11-7.1   unixODBC-devel.i386 0:2.2.11-7.1 
  unixODBC-devel.x86_64 0:2.2.11-7.1 

Complete!

3.4 参数检查
[root@12c-CloudControl ~]# cat /etc/sysctl.conf
# Oracle-Validated setting for kernel.msgmni is 2878
kernel.msgmni = 2878

# Oracle-Validated setting for kernel.msgmax is 8192
kernel.msgmax = 8192

# Oracle-Validated setting for kernel.msgmnb is 65536
kernel.msgmnb = 65536

# Oracle-Validated setting for kernel.sem is '250 32000 100 142'
kernel.sem = 250 32000 100 142

# Oracle-Validated setting for kernel.shmmni is 4096
kernel.shmmni = 4096

# Oracle-Validated setting for kernel.shmall is 1073741824
kernel.shmall = 1073741824

# Oracle-Validated setting for kernel.shmmax is 4398046511104 on x86_64 and 4294967295 on i386 architecture. Refer Note id 567506.1
kernel.shmmax = 4398046511104

# Oracle-Validated setting for kernel.sysrq is 1
kernel.sysrq = 1

# Oracle-Validated setting for net.core.rmem_default is 262144
net.core.rmem_default = 262144

# For 11g, Oracle-Validated setting for net.core.rmem_max is 4194304
# For 10g, uncomment 'net.core.rmem_max = 2097152', comment 'net.core.rmem_max = 4194304' entry and re-run sysctl -p
# net.core.rmem_max = 2097152
net.core.rmem_max = 4194304

# Oracle-Validated setting for net.core.wmem_default is 262144
net.core.wmem_default = 262144

# For 11g, Oracle-Validated setting for net.core.wmem_max is 1048576
# For 10g, uncomment 'net.core.wmem_max = 262144', comment 'net.core.wmem_max = 1048576' entry for this parameter and re-run sysctl -p
# net.core.wmem_max = 262144
net.core.wmem_max = 1048576

# Oracle-Validated setting for fs.aio-max-nr is 3145728
fs.aio-max-nr = 3145728

# For 11g, Oracle-Validated setting for net.ipv4.ip_local_port_range is 9000 65500
# For 10g, uncomment 'net.ipv4.ip_local_port_range = 1024 65000', comment 'net.ipv4.ip_local_port_range = 9000 65500' entry and re-run sysctl -p
# net.ipv4.ip_local_port_range = 1024 65000
net.ipv4.ip_local_port_range = 9000 65500

# Oracle-Validated setting for vm.min_free_kbytes is 51200 to avoid OOM killer
vm.min_free_kbytes = 51200




4.创建OEM账户
[root@12c-CloudControl ~]# groupadd -g 800 oinstall
[root@12c-CloudControl ~]# useradd -g oinstall oem


5. /etc/security/limits.conf
[root@12c-CloudControl ~]# vi /etc/security/limits.conf
oem soft nofile 4096
oem hard nofile 4096


6.这里推荐新建一个11.2.0.2或更改版本的数据库作为EM Repository
需要退Repository数据库做一些设置

DB VERSION:11.2.0.3
DB MACHINE IPADDR:192.168.20.41

6.1 修改Repository数据库相关参数
[root@localhost ~]# su - oracle
oracle@localhost.localdomain:/home/oracle>sqlplus  / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Fri Jul 5 14:11:39 2013

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup;
ORACLE instance started.

Total System Global Area  622149632 bytes
Fixed Size                  2230912 bytes
Variable Size             213910912 bytes
Database Buffers          398458880 bytes
Redo Buffers                7548928 bytes
Database mounted.
Database opened.

  alter system set processes= 500 scope=spfile;
  alter system set session_cached_cursors=500 scope=spfile;
  alter system set shared_pool_size=650M scope=spfile;
  alter system set job_queue_processes=22 scope=spfile;
  alter database add logfile size 320M;
  alter system set open_cursors=350 scope=spfile;
  alter system set sga_target=2g scope=spfile;
  alter system set pga_aggregate_target=1G scope=spfile;
  
  
6.2 EM 要求 repository database没有配置DB control ,如果有的话需要通过下列命令drop 掉(OPTION0)

oracle@localhost.localdomain:/home/oracle>$ORACLE_HOME/bin/emca -deconfig dbcontrol db -repos drop

STARTED EMCA at Jul 5, 2013 2:48:06 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
Database SID: szsc
Listener port number: 1521
Password for SYS user:  
Password for SYSMAN user:  

----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Jul 5, 2013 2:48:15 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u02/app/oracle/cfgtoollogs/emca/szsc/emca_2013_07_05_14_48_05.log.
Jul 5, 2013 2:48:15 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly
WARNING: ORA-28000: the account is locked

Jul 5, 2013 2:48:15 PM oracle.sysman.emcp.ParamsManager checkListenerStatusForDBControl
WARNING: Error initializing SQL connection. SQL operations cannot be performed
Jul 5, 2013 2:48:15 PM oracle.sysman.emcp.EMDBPreConfig performDeconfiguration
WARNING: EM is not configured for this database. No EM-specific actions can be performed. Some of the possible reasons may be: 
 1) EM is configured with different hostname then physical host. Set environment variable ORACLE_HOSTNAME= and re-run EMCA script 
 2) ORACLE_HOSTNAME is set. Unset it and re-run EMCA script
Jul 5, 2013 2:48:15 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Jul 5, 2013 2:50:19 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jul 5, 2013 2:50:19 PM


6.3 同时要求sysman 和 sysman_mds、 sysman_opss用户不存在,已创建该用户的DB 可以drop 掉
SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE    11.2.0.3.0      Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production


drop user sysman cascade;
drop user sysman_mds cascade;
drop user sysman_opss cascade;
drop user sysman_apm cascade;
drop user sysman_ro cascade;
drop user mgmt_view cascade;

7. 解析EM主机的主机名

[root@12c-CloudControl ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               12c-CloudControl localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6

192.168.20.70 12c-CloudContro



8.创建目录
[root@12c-CloudControl ~]# mkdir /u01
[root@12c-CloudControl ~]# chown -R oem:oinstall /u01/
oem@12c-CloudControl:/home/oem>mkdir -p $ORACLE_HOME
oem@12c-CloudControl:/home/oem>mkdir -p $AGENT_HOME



9.解压介质包
oem@12c-CloudControl:/tmp>unzip em12cr2p1_linux64_disk1.zip 
oem@12c-CloudControl:/tmp>unzip em12cr2p1_linux64_disk2.zip 
oem@12c-CloudControl:/tmp>unzip em12cr2p1_linux64_disk3.zip 
Please wait ...oem@CloudControl:/tmp>./runInstaller ORACLE_HOSTNAME=12c-CloudControl
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 400 MB.   Actual 7891 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 4996 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2013-07-05_09-00-13AM.

安装截图文档地址:
http://pan.baidu.com/share/link?shareid=1796296386&uk=992925046





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

请登录后发表评论 登录
全部评论

注册时间:2013-07-02

  • 博文量
    31
  • 访问量
    116870