EM:企业管理器,有很多种叫法 …… EM 12C 的部署比较吃资源 …… 注意: 在rhel5.X系列的系统OEM 12C 安装界面可以是中文,database 12C也是中文, 在RHEL6.X系统下,DB为中文不会乱码,但是OEM会乱码 可以export lang=C 以下为先后在RHEL5.9和6.4下的安装 未来得及仔细整理 可能RHEL5和RHEL6两个系列的偶尔有混杂 不过大致过程如此 OEM 12C安装部署 2013年6月27日 北京致远 杨芳超
下载地址: http://www.oracle.com/technetwork/cn/oem/grid-control/downloads/index.html DB12C的文档: http://www.oracle.com/pls/db121/homepage OEM12C的文档: http://docs.oracle.com/cd/E24628_01/index.htm 安装前 一定要去看看官方文档 比如本例子中就有些必须的RPM包没有列举
RHEL 5.9 64bit
--//创建用户和组 groupadd oinstall groupadd dba groupadd oper useradd -m -u 1101 -g oinstall -G dba,oper -d /home/oracle -s /bin/bash -c "Oracle database Software Owner" oracle useradd -m -u 1102 -g oinstall -G dba,oper -d /home/oem -s /bin/bash -c "Oracle EM Software Owner" oem passwd oracle passwd oem
--//创建软件安装的目录 mkdir -p /opt/oracle chown -R oracle:oinstall /opt/oracle chmod 775 /opt/oracle
mkdir -p /opt/oraInventory chown -R oracle:oinstall /opt/oraInventory chmod 775 /opt/oraInventory
mkdir -p /opt/middleware chown -R oem:oinstall /opt/middleware chmod 775 /opt/middleware
mkdir -p /opt/oem chown -R oem:oinstall /opt/oem chmod 775 /opt/oem
--//放入系统安装光盘,安装RPM包 rpm -ivh sysstat-7.0.2-12.el5.x86_64.rpm rpm -ivh libaio-devel-0.3.106-5.i386.rpm rpm -ivh libaio-devel-0.3.106-5.x86_64.rpm rpm -ivh unixODBC-libs-2.2.11-10.el5.i386.rpm rpm -ivh unixODBC-libs-2.2.11-10.el5.x86_64.rpm rpm -ivh unixODBC-2.2.11-10.el5.i386.rpm rpm -ivh unixODBC-2.2.11-10.el5.x86_64.rpm rpm -ivh unixODBC-devel-2.2.11-10.el5.i386.rpm rpm -ivh unixODBC-devel-2.2.11-10.el5.x86_64.rpm rpm -ivh compat-db-4.2.52-5.1.i386.rpm rpm -ivh compat-db-4.2.52-5.1.x86_64.rpm yum install binutils-devel-2.20.51.0.2-5.36.el6.i686.rpm yum install compat-libcap1-1.10-1.i686.rpm yum install compat-libcap1-1.10-1.x86_64.rpm
vi /etc/sysctl.conf fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.core.rmem_default = 4194304 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048586 net.ipv4.ip_local_port_range = 9000 65500 net.ipv4.tcp_wmem = 1048586 1048586 1048586 net.ipv4.tcp_rmem = 4194304 4194304 4194304
/sbin/sysctl -p
vi /etc/security/limits.conf oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 oracle hard stack 10240
oem soft nproc 2047 oem hard nproc 16384 oem soft nofile 1024 oem hard nofile 65536 oem hard stack 10240
vi /etc/pam.d/login session required pam_limits.so session required /lib64/securety/pam_limits.so
vi /etc/profile if [ \$USER = "oracle" ] ; then if [ \$SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi umask 022 fi
su - oracle vi ~/.bash_profile export TMP=/tmp export TMPDIR=$TMP export ORACLE_HOSTNAME=em-12c export ORACLE_BASE=/opt/oracle export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 export ORACLE_SID=orcl export ORACLE_UNQNAME=orcl export ORACLE_TERM=xterm export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib # export NLS_LANG="Simplified Chinese_china".ZHS16GBK export NLS_LANG=american_america.ZHS16GBK
source ~/.bash_profile
--//安装db
--//安装完成之后,修改数据库参数以满足EM12C的要求 alter system set processes = 300 scope=spfile; alter system set session_cached_cursors=200 scope=spfile; alter system set sga_target=2G scope=spfile; alter system set shared_pool_size=600M scope=spfile; alter system set job_queue_processes=20 scope=spfile;
--//移除数据库自带的DB control export ORACLE_HOME=/opt/oracle/product/11.2.0/dbhome_1 export ORACLE_SID=orcl emca -deconfig dbcontrol db -repos drop orcl 1521 110110 110110 y
--//Drop掉sysman、sysman_mds、sysman_opss三个用户 select * from global_name;
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;
(# @?/rdbms/admin/catsnmp.sql)
创建用户OEM的表空间 create tablespace oem datafile '/opt/oracle/oradata/orcl/oem.dbf' size 5g autoextend on next 1g maxsize unlimited logging extent management local segment space management auto;
创建oem用户 create user oem identified by oem default tablespace oem temporary tablespace temp;
授权oem为DBA角色 grant dba to oem;
使用操作系统oem帐号登录安装OEM-注意附带主机名以传递参数给安装程序 ./runInstaller ORACLE_HOSTNAME=em-12c 上传截图后 不晓得为什么那么小了 哈哈 …… 未完待续
|