在Docker中分分钟拥有Oracle EMCC 13.5环境
【摘要】 一、从Docker Hub或阿里云镜像下载小麦苗上传的镜像文件小麦苗的Docker Hub的地址:https://hub.docker.com/u/lhrbestEMCC 13.5下载的地址:https://hub.docker.com/r/lhrbest/lhremcc135/tags?page=1&ordering=last_updated注意:1、保证磁盘空间至少100G2、内存需要...
一、从Docker Hub或阿里云镜像下载小麦苗上传的镜像文件
- 小麦苗的Docker Hub的地址:https://hub.docker.com/u/lhrbest
- EMCC 13.5下载的地址:https://hub.docker.com/r/lhrbest/lhremcc135/tags?page=1&ordering=last_updated
注意:
1、保证磁盘空间至少100G
2、内存需要至少8G
3、配置swap到8G
# 从Docker hub下载,网络不好时,一般比较慢
docker pull lhrbest/lhremcc135:1.0
# 可以选择从阿里云下载
docker pull registry.cn-hangzhou.aliyuncs.com/lhrbest/lhremcc135:1.0
# 从阿里云下载后可以tag成如下形式
docker tag registry.cn-hangzhou.aliyuncs.com/lhrbest/lhremcc135:1.0 lhrbest/lhremcc135:1.0
镜像大概21G左右,解压后大约50G左右,所以请保留充足的空间,至少100G才能运行(不说了,Oracle的产品就是这么耗磁盘空间,耗内存)。执行过程如下:
[root@docker35 ~]# docker images | grep emcc
lhrbest/lhremcc135 1.0 d5eb85007b8a 7 weeks ago 51.4GB
registry.cn-hangzhou.aliyuncs.com/lhrbest/lhremcc135 1.0 d5eb85007b8a 7 weeks ago 51.4GB
[root@docker35 ~]#
二、创建容器并启动EMCC 13.5环境
# 1、创建容器
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/lhremcc135:1.0 init
# 2、进入容器
docker exec -it lhremcc135 bash
接下来需要等待,因为环境启动比较慢。
检查环境是否启动:
[root@docker35 ~]# 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/lhremcc135:1.0 init
f27dfe96e56cccf75c9931cf66e263b00ec0cee816060c43d8ac58f51a0c7966
[root@docker35 ~]#
[root@docker35 ~]# docker ps | grep emcc
f27dfe96e56c lhrbest/lhremcc135:1.0 "init" 5 minutes ago Up 5 minutes 0.0.0.0:31521->1521/tcp, 0.0.0.0:3135->3389/tcp, 0.0.0.0:35500->5500/tcp, 0.0.0.0:35501->5501/tcp, 0.0.0.0:37803->7803/tcp lhremcc135
[root@docker35 ~]#
[root@docker35 ~]# docker exec -it lhremcc135 bash
[root@lhremcc135 /]# su - oracle
Last login: Thu Jul 8 15:27:55 CST 2021 on pts/0
[oracle@lhremcc135 ~]$ lsnrctl status
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 08-JUL-2021 15:28:42
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 08-JUL-2021 15:25:43
Uptime 0 days 0 hr. 3 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/19c/dbhome_1/network/admin/listener.ora
Listener Log File /opt/oracle/diag/tnslsnr/lhremcc135/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=lhremcc135)(PORT=1521)))
Services Summary...
Service "lhrsdb" has 1 instance(s).
Instance "lhrsdb", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@lhremcc135 ~]$
[oracle@lhremcc135 ~]$ sas
SQL*Plus: Release 19.0.0.0.0 - Production on Thu Jul 8 15:28:56 2021
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SYS@lhrsdb> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
SYS@lhrsdb> show parameter sga
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
allow_group_access_to_sga boolean FALSE
lock_sga boolean FALSE
pre_page_sga boolean TRUE
sga_max_size big integer 3G
sga_min_size big integer 0
sga_target big integer 3G
unified_audit_sga_queue_size integer 1048576
SYS@lhrsdb> show parameter pga
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
pga_aggregate_limit big integer 4G
pga_aggregate_target big integer 1G
数据库已经启动,接下来,查询EMS是否启动,若未启动,则需要手动启动:
[oracle@lhremcc135 ~]$ . oraenv
ORACLE_SID = [lhrsdb] ? OMS
The Oracle base has been changed from /opt/oracle to oms13c1
[oracle@lhremcc135 ~]$
[oracle@lhremcc135 ~]$ emctl status oms
Oracle Enterprise Manager Cloud Control 13c Release 5
Copyright (c) 1996, 2021 Oracle Corporation. All rights reserved.
WebTier is Down
Oracle Management Server is Down
JVMD Engine is Down
[oracle@lhremcc135 ~]$
[oracle@lhremcc135 ~]$ emctl start oms
Oracle Enterprise Manager Cloud Control 13c Release 5
Copyright (c) 1996, 2021 Oracle Corporation. All rights reserved.
Starting Oracle Management Server...
WebTier Successfully Started
Oracle Management Server Successfully Started
JVMD Engine Successfully Started
[oracle@lhremcc135 ~]$ emctl status oms
Oracle Enterprise Manager Cloud Control 13c Release 5
Copyright (c) 1996, 2021 Oracle Corporation. All rights reserved.
WebTier is Up
Oracle Management Server is Up
JVMD Engine is Up
接下来查询EM AGENT是否启动:
[oracle@lhremcc135 ~]$ emctl status agent
Oracle Enterprise Manager Cloud Control 13c Release 5
Copyright (c) 1996, 2021 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
Agent Version : 13.5.0.0.0
OMS Version : 13.5.0.0.0
Protocol Version : 12.1.0.1.0
Agent Home : /u01/app/oracle/middleware/agent/agent_inst
Agent Log Directory : /u01/app/oracle/middleware/agent/agent_inst/sysman/log
Agent Binaries : /u01/app/oracle/middleware/agent/agent_13.5.0.0.0
Core JAR Location : /u01/app/oracle/middleware/agent/agent_13.5.0.0.0/jlib
Agent Process ID : 935
Parent Process ID : 686
Agent URL : https://lhremcc135:3872/emd/main/
Local Agent URL in NAT : https://lhremcc135:3872/emd/main/
Repository URL : https://lhremcc135:4903/empbs/upload
Started at : 2021-07-08 15:27:04
Started by user : oracle
Operating System : Linux version 3.10.0-1127.10.1.el7.x86_64 (amd64)
Number of Targets : 35
Last Reload : (none)
Last successful upload : 2021-07-08 15:42:00
Last attempted upload : 2021-07-08 15:42:00
Total Megabytes of XML files uploaded so far : 0.07
Number of XML files pending upload : 0
Size of XML files pending upload(MB) : 0
Available disk space on upload filesystem : 34.55%
Collection Status : Collections enabled
Heartbeat Status : Ok
Last attempted heartbeat to OMS : 2021-07-08 15:41:48
Last successful heartbeat to OMS : 2021-07-08 15:41:48
Next scheduled heartbeat to OMS : 2021-07-08 15:42:48
---------------------------------------------------------------
Agent is Running and Ready
所有软件启动正常。
三、尽情使用吧
emcc登录地址
https://192.168.66.35:37803/em
用户名:sysman
密码:lhr666666
接下来的操作,大家都懂得,麦老师就不多说了。
怎么样,是不是很爽,是不是非常方便呢,文末记得点赞哈。
【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)