Oracle EMCC 13.5安装过程
下载EMCC软件
https://www.oracle.com/enterprise-manager/downloads/cloud-control-downloads.html
https://www.oracle.com/enterprise-manager/downloads/linux-x86-64-13c-rel5-downloads.html
Directions
- Download all the files including .bin in same directory. No need to unzip the downloaded software.
- As the install user who will be installing the product, set the execute permission for the .bin file. Example: chmod +x em13500_linux64.bin
- Installation guides and general Enterprise Manager documentation can be found here.
1 2 3 4 5 6 7 8 9 | [root@docker35 soft]# ll total 8363828 -rw-r--r-- 1 root root 1897494675 May 17 14:42 em13500_linux64-2.zip -rw-r--r-- 1 root root 2130750885 May 17 14:43 em13500_linux64-3.zip -rw-r--r-- 1 root root 1454982045 May 17 14:42 em13500_linux64-4.zip -rw-r--r-- 1 root root 1494500710 May 17 14:42 em13500_linux64-5.zip -rw-r--r-- 1 root root 1586801533 May 17 14:40 em13500_linux64.bin [root@docker35 soft]# du -sh . 8.0G . |
安装的产品
As part of a new Enterprise Manager system, the installation wizard does the following:
Installs Oracle WebLogic Server 12c Release 2 (12.2.1.4.0).
Installs Java Development Kit (JDK) 1.8.0_261.
Installs Oracle Management Service 13c Release 5.
Installs Oracle Management Agent 13c Release 5 in the agent base directory you specify (outside the middleware home).
Installs Oracle JRF 12c Release 2 (12.2.1.4.0).
Installs Oracle Web Tier 12c Release 2 (12.2.1.4.0).
Creates a plug-in directory and installs the following default plug-ins.
Oracle Database Plug-in
Oracle Fusion Middleware Plug-in
Note:
Starting with 13c Release 1, as part of the Oracle Fusion Middleware Plug-in deployment, one Java Virtual Machine Diagnostics (JVMD) Engine is installed by default on the OMS. For every additional OMS you deploy, you receive one JVMD Engine by default with that OMS.
JVMD enables administrators to diagnose performance problems in Java applications in the production environment. By eliminating the need to reproduce problems, it reduces the time required to resolve these problems, thus improving application availability and performance.
While JVMD Engine is installed by default on the OMS host, you will still need JVMD Agents to be manually deployed on the targeted JVMs. For instructions to deploy the JVMD Agent, see Installing JVM Diagnostic Agents.
Oracle Exadata Plug-in
Oracle Cloud Framework Plug-in
Oracle System Infrastructure Plug-in
Any other additional plug-ins you choose to deploy
Creates an Oracle WebLogic domain called
GCDomain.
For this WebLogic Domain, a default user account,weblogic
, is used as the administrative user. In advanced installation, you can choose to change this if you want.Creates a Node Manager user account called
nodemanager.
A Node Manager enables you to start, shut down, or restart an Oracle WebLogic Server instance remotely, and is recommended for applications with high availability requirements.Note:
On Microsoft Windows, a Node Manager service is NOT created. This is an expected behavior.
Configures an Oracle Management Service Instance Base location (
gc_inst
) outside the Oracle Middleware home (Middleware home), for storing all configuration details related to the OMS. In advanced installation, you can choose to change this location if you want.For example, if the Middleware home is
/u01/software/em13c/oraclehome,
then the instance base location is/u01/software/em13c/gc_inst.
You can choose to change this, if you want, in the installer. However, you can change it for only advanced installation and not for simple installation.Configures Oracle Management Repository in the existing, certified Oracle Database. If the database instance is created using the database template offered by Oracle, then this step is skipped.
Note:
The existing, certified Oracle Database must be one of the certified databases listed in the Enterprise Manager certification matrix available on My Oracle Support, or a database instance created with a preconfigured Oracle Management Repository (Management Repository) using the database templates offered by Oracle.
To access the Enterprise Manager certification matrix, follow the steps outlined in Accessing the Enterprise Manager Certification Matrix.
For information about creating a database instance with a preconfigured Management Repository using the database templates offered by Oracle, refer to Creating a Database Instance with Preconfigured Repository Using Database Templates.
The database can be on a local or remote host, and if it is on a remote host, it must be monitored by Oracle Management Agent. However, Oracle Real Application Clusters (Oracle RAC) databases must only be on a shared disk.
Runs the following configuration assistants to configure the installed components for simple as well as advanced installation:
Plug-ins Prerequisites Check
Repository Configuration
Note:
If you use a database instance that was created with a preconfigured Management Repository using the database templates offered by Oracle, then Repository Out-of-Box Configuration is run instead of Repository Configuration.
- MDS Schema Configuration
Note:
If you use a database instance that was created with a preconfigured Management Repository using the database templates offered by Oracle, then MDS Schema Configuration is not run.
OMS Configuration
Plug-ins Deployment and Configuration
Start Oracle Management Service
Agent Configuration Assistant
兼容性:
Oracle Management Service 13c Release 5 can communicate only with the following Oracle Management Agents versions you may have deployed from earlier Enterprise Manager Cloud Control versions: 13.4.0.0.0 and 13.3.0.0.0.
Table 5-2 Compatibility Between OMS and Management Agents Across 13c and 12c Releases
- | Oracle Management Agent 12c Release 5 (12.1.0.5) | Oracle Management Agent 13c Release 1 | Oracle Management Agent 13c Release 2 | Oracle Management Agent 13c Release 3 | Oracle Management Agent 13c Release 4 |
---|---|---|---|---|---|
Oracle Management Service 13c Release 5 | No | No | No | Yes | Yes |
系统条件
端口
The following are the default ports used for installation:
Enterprise Manager Cloud Control
Table 2-2 Default Port for Enterprise Manager Grid Control
- Upload Port Console Port HTTP Port The first available free port from the range 4889 to 4898 is selected. The first available free port from the range 7788 - 7798 is selected. HTTPS Port 1159If 1159 is not available, then the first available free port from the range 4899 to 4908 is selected. The first available free port from the range 7799 - 7809 is selected. Oracle Management Agent
The default upload port for Management Agent is 3872. The same port is used for both HTTP and HTTPS. If 3872 is not available, then the first available free port from the range 1830 to 1849 is selected.
Administration Server
The default HTTPS port for Admin Server is 7101. If 7101 is not available, then the first available free port from the range 7101 to 7200 is selected.
Node Manager
The default HTTPS port is the first available free port from the range 7401 to 7500 is selected.
Managed Server
The default HTTP port is the first available free port from the range 7201 to 7300 is selected.
The default HTTPS port is the first available free port from the range 7301 to 7400 is selected.
JVM Diagnostics Managed Server
If SLB is not configured, then the aforementioned HTTP and HTTPS upload ports of Enterprise Manager Cloud Control are used. If SLB is configured, then the ports configured for JVM Diagnostics on the SLB are used. Alternatively, in addition to the SLB configuration, if the HTTP upload port is enabled for Enterprise Manager Cloud Control, then the HTTP upload port also can be used by the JVM Diagnostics Agents for communicating with the JVM Diagnostics Engine.
Oracle HTTP Server
The default HTTP port for Oracle HTTP Server is 9788. If 9788 is not available, then the first available free port from the range 9751 to 9800 is selected.
The default HTTPS port for Oracle HTTP Server is 9899. If 9899 is not available, then the first available free port from the range 9851 to 9900 is selected.
Java Object Cache (JOC)
The default JOC port is 23456. If 23456 is not available, no alternate port is used, so ensure that port 23456 is free.
安装
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | docker rm -f lhremcc135 docker run -d --name lhremcc135 -h lhremcc135 \ -p 31521:1521 -p 35500:5500 -p 35501:5501 -p 37803:7803 -p 3135:3389 \ -v /sys/fs/cgroup:/sys/fs/cgroup \ --privileged=true \ lhrbest/oracle19clhr_rpm_db_12.2.0.3:2.0 init -- 依赖包参考:https://docs.oracle.com/en/enterprise-manager/cloud-control/enterprise-manager-cloud-control/13.5/embsc/package-kernel-parameter-and-library-requirements-enterprise-manager-cloud-control.html#GUID-874AED88-DC4A-466D-BC2D-7CB4E579D629 yum install -y binutils compat-libcap1 compat-libstdc \ compat-libstdc gcc gcc-c glibc glibc \ glibc-devel libaio libaio-devel libgcc \ libgcc libstdc libstdc libstdc++-devel dejavu-serif-fonts \ ksh make sysstat numactl numactl-devel \ motif for x86_643 motif-devel redhat-lsb \ redhat-lsb-core OpenSSL |
修改系统参数
① 避免端口被占用,修改最小端口到11000。
1 2 3 4 5 | [root@lhremcc135 /]# cat /proc/sys/net/ipv4/ip_local_port_range 9000 65500 [root@lhremcc135 /]# echo 11000 65000 > /proc/sys/net/ipv4/ip_local_port_range [root@lhremcc135 /]# cat /proc/sys/net/ipv4/ip_local_port_range 11000 65000 |
修改/etc/sysctl.conf 文件,修改如下内容
1 2 3 4 5 6 7 8 9 10 | [root@cos73emcc133lhr ~]# vi /etc/sysctl.conf net.ipv4.ip_local_port_range = 11000 65000 [root@cos73emcc133lhr ~]# sysctl -p 然后重启网络。 [root@cos73emcc133lhr ~]# service network restart |
修改nproc Kernel Parameter
1 | echo "nproc 4098" >> /etc/security/limits.conf |
② 修改kernel.shmmax内核参数
如果OMS(Oracle Management Server)和OMR(Management Repository)在不同的主机上,那么OMS的主机kernel.shmmax参数设置为小于4G或者4294967295。直接修改/etc/sysctl.conf文件修改,然后运行sysctl -p生效即可。
如果OMS和Management Repository(database)在同一个主机上,那么kernel.shmmax参数以Oracle数据库文档要求的为准。
这里我们将OMS和OMR都放在一台机器上。
③ 修改参数禁用Address Space Layout Randomization (ASLR)
kernel.randomize_va_space=0
kernel.exec-shield=0
参考:ORA-00445: Background Process "xxxx" Did Not Start After 120 Seconds (文档 ID 1345364.1)
[root@cos73emcc133lhr ~]# sysctl -p
创建OEM安装目录
1 2 3 4 | mkdir -p /u01/app/oracle/middleware/oms mkdir -p /u01/app/oracle/middleware/agent chown -R oracle.oinstall /u01 |
注意:请确保/u01目录的剩余空间足以安装EMCC。EMCC 13.3软件安装完成后,大约需要26G的空间;而agent大约需要2G的空间。
在安装过程中,/tmp目录至少需要12G的空间,或者至少有一个目录的空闲空间有12G,需要存放临时解压文件,安装完成后会释放该空间。
数据库准备(OMR)
OMR:Oracle Management Repository
OEM 13c只支持从版本12.1.0.2.0开始的OMR数据库,这里使用19c的数据库。
注意:不能安装EM,即DC。
EMCC 13.3可以监控11g的数据库,例如11g的rac。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | -- 安装好数据库之后,要对相应的参数做一定的修改,否则会在安装的时候报错。 alter database add logfile group 4 size 200M; alter database add logfile group 5 size 200M; alter system set session_cached_cursors=400 scope=spfile; alter system set open_cursors=600 scope=spfile; alter system set processes=800 scope=spfile; alter system set memory_max_target=8G scope=spfile; alter system set memory_target=8G scope=spfile; alter system set sga_max_size=6G scope=spfile; alter system set sga_target=6G scope=spfile; alter system set pga_aggregate_target=2G scope=spfile; alter system set shared_pool_size=1G scope=spfile; alter system set log_buffer=8M scope=spfile; alter system set "_allow_insert_with_update_check"=true; alter system set parallel_min_servers=0; alter system set parallel_max_servers=8; EXEC DBMS_AUTO_TASK_ADMIN.DISABLE(); EXEC DBMS_AUTO_TASK_ADMIN.DISABLE(client_name => 'auto optimizer stats collection',operation => NULL,window_name => NULL); vi /etc/fstab tmpfs /dev/shm tmpfs defaults,size=8G 0 0 mount -o remount,size=8G /dev/shm |
注意:OS的内存我设置了16G,数据库的内存我设置了8G,否则会报错。等OMS安装成功后,再把OS和数据库的内存缩小。
开始安装EMCC(Enterprise Manager Cloud Control)
1 2 | chmod +x em13500_linux64.bin /soft/em13500_linux64.bin |
密码:lhr666666
redo建议300Mb/组,我们这个环境是200Mb,忽略这个问题。
1 2 3 4 5 6 7 8 9 10 | SYS@lhrsdb> select * from v$log; GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARCHIV STATUS FIRST_CHANGE# FIRST_TIME NEXT_CHANGE# NEXT_TIME CON_ID ---------- ---------- ---------- ---------- ---------- ---------- ------ -------------------------------- ------------- ------------------- ------------ ------------------- ---------- 1 1 7 209715200 512 1 YES INACTIVE 2038647 2020-08-24 10:39:22 2150624 2021-05-17 17:21:45 0 2 1 5 209715200 512 1 YES INACTIVE 2015094 2020-08-24 10:31:22 2038636 2020-08-24 10:39:09 0 3 1 6 209715200 512 1 YES INACTIVE 2038636 2020-08-24 10:39:09 2038647 2020-08-24 10:39:22 0 4 1 8 209715200 512 1 NO CURRENT 2150624 2021-05-17 17:21:45 1.8447E+19 0 5 1 0 209715200 512 1 YES UNUSED 0 0 0 |
密码: lhr666666
开始安装,大概5小时左右。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | [root@lhremcc135 ~]# /u01/app/oracle/middleware/oms/allroot.sh Starting to execute allroot.sh ......... Starting to execute /u01/app/oracle/middleware/oms/root.sh ...... Check /u01/app/oracle/middleware/oms/install/root_lhremcc135_2021-05-17_21-57-17.log for the output of root script Finished product-specific root actions. /etc exist Finished execution of /u01/app/oracle/middleware/oms/root.sh ...... Starting to execute /u01/app/oracle/middleware/agent/agent_13.5.0.0.0/root.sh ...... Finished product-specific root actions. /etc exist Finished execution of /u01/app/oracle/middleware/agent/agent_13.5.0.0.0/root.sh ...... |
修改/etc/oratab文件
修改/etc/oratab文件,加入以下内容:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | cat >> /etc/oratab <<"EOF" OMS:/u01/app/oracle/middleware/oms:N AGENT:/u01/app/oracle/middleware/agent/agent_13.5.0.0.0:N EOF . oraenv 输入:OMS emctl status oms emctl status oms -details . oraenv 输入:AGENT emctl status agent -- 通过如下命令可查看OMS的详细内容: emctl status oms -details -sysman_pwd lhr666666 |
EMCC访问地址
https://192.168.66.35:37803/em
用户名:sysman
密码:lhr666666
OMS启动日志:
/u01/app/oracle/middleware/gc_inst/em/EMGC_OMS1/sysman/log/emctl.log, emoms.trc, emoms_pbs.trc
OMS启动和关闭:
emctl start oms
emctl stop oms
设置开机启动
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 1、修改/etc/oratab,将N修改为Y 2、修改/etc/rc.d/rc.local cat >> /etc/rc.d/rc.local <<"EOF" mount -o remount,size=4G /dev/shm export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1 su oracle -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME" export OMS_HOME=/u01/app/oracle/middleware/oms su oracle -c "$OMS_HOME/bin/emctl start oms" export AGENT_HOME=/u01/app/oracle/middleware/agent/agent_13.5.0.0.0 su oracle -c "$AGENT_HOME/bin/emctl start agent" EOF chmod +x /etc/rc.d/rc.local |