文章目录
  1. 1. 前提
  2. 2. 环境
  3. 3. 安装必需的软件包
    1. 3.1. 禁用iptables和SELinux
    2. 3.2. 修改/etc/hosts文件
    3. 3.3. 配置SSH和X11转发
  4. 4. 安装Oracle数据库12c
    1. 4.1. 创建目录和部署安装文件
    2. 4.2. 创建安装用目录(按照OFA标准)
    3. 4.3. 修改ulimit值:最大文件描述符数为4096
    4. 4.4. 修改ulimit值:最大用户进程数为16384
    5. 4.5. 增大tmpfs到4GB
    6. 4.6. 作为oracle用户配置~/.bash_profile
    7. 4.7. 开始安装Oracle数据库
      1. 4.7.1. Configure Security Updates
      2. 4.7.2. Select Installation Option
      3. 4.7.3. Server Class
      4. 4.7.4. Grid Installation Options
      5. 4.7.5. Select Install Type
      6. 4.7.6. Select Product Languages
      7. 4.7.7. Select Database Edition
      8. 4.7.8. Specify Installation Location
      9. 4.7.9. Create Inventory
      10. 4.7.10. Select Configuration Type
      11. 4.7.11. Specify Database Identifiers
      12. 4.7.12. Specify Configuration Options
      13. 4.7.13. Specify Database Storage Options
      14. 4.7.14. Specify Management Options
      15. 4.7.15. Specify Recovery Options
      16. 4.7.16. Specify Schema Passwords
      17. 4.7.17. Specify Operating System groups
      18. 4.7.18. Summary
      19. 4.7.19. Install Product
      20. 4.7.20. Execute Configuration scripts
    8. 4.8. Database Configuration Assistant
      1. 4.8.1. Finish
    9. 4.9. 数据库安装后设置
      1. 4.9.1. 数据库参数修改和监听服务查看
      2. 4.9.2. 开机自动启动数据库(可选)
  5. 5. 安装Oracle Enterprise Manager 12c R4
    1. 5.1. 安装前检查
    2. 5.2. 创建目录和部署安装文件
    3. 5.3. 开始安装EM
      1. 5.3.1. My Oracle Support Details
      2. 5.3.2. Software Updates
      3. 5.3.3. Prerequisite Checks
      4. 5.3.4. Installation Types
      5. 5.3.5. Installation Details
      6. 5.3.6. Select Plug-ins
      7. 5.3.7. WebLogic Server Configuration Details
      8. 5.3.8. Database Connection Details
      9. 5.3.9. Enterprise Manager Configuration Details
      10. 5.3.10. Port Configuration Details
      11. 5.3.11. Review
      12. 5.3.12. Installation Progress Details
      13. 5.3.13. Finish

前提

安装Oracle Enterprise Manager 12c的基本测试环境。该环境中,组成完整OEM的下列组件将全部安装在一个主机(Oracle Linux)中。

  • Oracle Management Repository(OMR,也就是Oracle数据库)
  • Oracle Management Services(OMS,也就是Weblogic服务器)
  • Oracle Enterprise Manager Cloud Control(也就是管理用的Web UI)

环境

  • VM: Virtualbox 5.0.0.0
  • OS: Oracle Linux 6.5 64bit

    • IP: 192.168.56.7
    • Hostname: oem.example.com
    • Memory: 4GB
    • CPU: 2.6GHz, 2 core
    • Network: 2 Adapters (Host-Only Adapter + NAT Network)
    • HDD: 64GB
  • DB: Oracle Database 12c Release 1(12.1.0.2.0) - Enterprise Edition for Linux x86-64

  • EM: Oracle Enterprise Manager Cloud Control 12c Release 4 (12.1.0.4) for Linux x86-64

安装必需的软件包

需要连接外网,从Oracle Public Yum仓库来安装oracle-rdbms-server-12cR1-preinstall

先下载repo文件。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
[root@oem ~]# cd /etc/yum.repos.d/
[root@oem yum.repos.d]# wget http://public-yum.oracle.com/public-yum-ol6.repo
--2015-07-31 11:04:04-- http://public-yum.oracle.com/public-yum-ol6.repo
Resolving cn-proxy.jp.oracle.com... 146.56.234.217
Connecting to cn-proxy.jp.oracle.com|146.56.234.217|:80... connected.
Proxy request sent, awaiting response... 200 OK
Length: 5284 (5.2K) [text/plain]
Saving to: “public-yum-ol6.repo”
100%[======================================>] 5,284 --.-K/s in 0.007s
2015-07-31 11:04:05 (767 KB/s) - “public-yum-ol6.repo” saved [5284/5284]
[root@oem yum.repos.d]#

题外话,如果使用了代理服务器的话,需要先设置一下wget的代理服务器:

1
2
3
[root@oem yum.repos.d]# vim /etc/wgetrc
#http_proxy = http://proxy.yoyodyne.com:18023/
http_proxy = http://myproxy.example.com:80/

还需要设置一下Yum的代理服务器:

1
2
[root@oem yum.repos.d]# vim /etc/yum.conf
proxy=http://myproxy.example.com:80

确保目录下只有一个*.repo文件,测试一下Yum是否正常工作:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[root@oem yum.repos.d]# ls
public-yum-ol6.repo
[root@oem yum.repos.d]# yum repolist
Loaded plugins: refresh-packagekit, security
ol6_UEK_latest | 1.2 kB 00:00
ol6_UEK_latest/primary | 22 MB 00:38
ol6_UEK_latest 463/463
ol6_latest | 1.4 kB 00:00
ol6_latest/primary | 51 MB 01:25
ol6_latest 31965/31965
repo id repo name status
ol6_UEK_latest Latest Unbreakable Enterprise Kernel for Oracle Linux 6Ser 463
ol6_latest Oracle Linux 6Server Latest (x86_64) 31,965
repolist: 32,428
[root@oem yum.repos.d]#

安装oracle-rdbms-server-12cR1-preinstall

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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
[root@oem yum.repos.d]# yum install oracle-rdbms-server-12cR1-preinstall
Loaded plugins: refresh-packagekit, security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package oracle-rdbms-server-12cR1-preinstall.x86_64 0:1.0-14.el6 will be installed
--> Processing Dependency: gcc-c++ for package: oracle-rdbms-server-12cR1-preinstall-1.0-14.el6.x86_64
--> Processing Dependency: compat-libcap1 for package: oracle-rdbms-server-12cR1-preinstall-1.0-14.el6.x86_64
--> Processing Dependency: ksh for package: oracle-rdbms-server-12cR1-preinstall-1.0-14.el6.x86_64
--> Processing Dependency: libaio-devel for package: oracle-rdbms-server-12cR1-preinstall-1.0-14.el6.x86_64
--> Processing Dependency: compat-libstdc++-33 for package: oracle-rdbms-server-12cR1-preinstall-1.0-14.el6.x86_64
--> Processing Dependency: libstdc++-devel for package: oracle-rdbms-server-12cR1-preinstall-1.0-14.el6.x86_64
--> Running transaction check
---> Package compat-libcap1.x86_64 0:1.10-1 will be installed
---> Package compat-libstdc++-33.x86_64 0:3.2.3-69.el6 will be installed
---> Package gcc-c++.x86_64 0:4.4.7-16.el6 will be installed
--> Processing Dependency: gcc = 4.4.7-16.el6 for package: gcc-c++-4.4.7-16.el6.x86_64
--> Processing Dependency: libstdc++ = 4.4.7-16.el6 for package: gcc-c++-4.4.7-16.el6.x86_64
---> Package ksh.x86_64 0:20120801-28.el6 will be installed
---> Package libaio-devel.x86_64 0:0.3.107-10.el6 will be installed
---> Package libstdc++-devel.x86_64 0:4.4.7-16.el6 will be installed
--> Running transaction check
---> Package gcc.x86_64 0:4.4.7-4.el6 will be updated
---> Package gcc.x86_64 0:4.4.7-16.el6 will be an update
--> Processing Dependency: cpp = 4.4.7-16.el6 for package: gcc-4.4.7-16.el6.x86_64
--> Processing Dependency: libgomp = 4.4.7-16.el6 for package: gcc-4.4.7-16.el6.x86_64
--> Processing Dependency: libgcc >= 4.4.7-16.el6 for package: gcc-4.4.7-16.el6.x86_64
---> Package libstdc++.x86_64 0:4.4.7-4.el6 will be updated
---> Package libstdc++.x86_64 0:4.4.7-16.el6 will be an update
--> Running transaction check
---> Package cpp.x86_64 0:4.4.7-4.el6 will be updated
---> Package cpp.x86_64 0:4.4.7-16.el6 will be an update
---> Package libgcc.x86_64 0:4.4.7-4.el6 will be updated
---> Package libgcc.x86_64 0:4.4.7-16.el6 will be an update
---> Package libgomp.x86_64 0:4.4.7-4.el6 will be updated
---> Package libgomp.x86_64 0:4.4.7-16.el6 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
oracle-rdbms-server-12cR1-preinstall x86_64 1.0-14.el6 ol6_latest 17 k
Installing for dependencies:
compat-libcap1 x86_64 1.10-1 ol6_latest 17 k
compat-libstdc++-33 x86_64 3.2.3-69.el6 ol6_latest 183 k
gcc-c++ x86_64 4.4.7-16.el6 ol6_latest 4.7 M
ksh x86_64 20120801-28.el6 ol6_latest 759 k
libaio-devel x86_64 0.3.107-10.el6 ol6_latest 13 k
libstdc++-devel x86_64 4.4.7-16.el6 ol6_latest 1.6 M
Updating for dependencies:
cpp x86_64 4.4.7-16.el6 ol6_latest 3.7 M
gcc x86_64 4.4.7-16.el6 ol6_latest 10 M
libgcc x86_64 4.4.7-16.el6 ol6_latest 102 k
libgomp x86_64 4.4.7-16.el6 ol6_latest 133 k
libstdc++ x86_64 4.4.7-16.el6 ol6_latest 294 k
Transaction Summary
================================================================================
Install 7 Package(s)
Upgrade 5 Package(s)
Total download size: 22 M
Is this ok [y/N]: y
Downloading Packages:
(1/12): compat-libcap1-1.10-1.x86_64.rpm | 17 kB 00:00
(2/12): compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm | 183 kB 00:00
(3/12): cpp-4.4.7-16.el6.x86_64.rpm | 3.7 MB 00:05
(4/12): gcc-4.4.7-16.el6.x86_64.rpm | 10 MB 00:16
(5/12): gcc-c++-4.4.7-16.el6.x86_64.rpm | 4.7 MB 00:08
(6/12): ksh-20120801-28.el6.x86_64.rpm | 759 kB 00:01
(7/12): libaio-devel-0.3.107-10.el6.x86_64.rpm | 13 kB 00:00
(8/12): libgcc-4.4.7-16.el6.x86_64.rpm | 102 kB 00:00
(9/12): libgomp-4.4.7-16.el6.x86_64.rpm | 133 kB 00:00
(10/12): libstdc++-4.4.7-16.el6.x86_64.rpm | 294 kB 00:00
(11/12): libstdc++-devel-4.4.7-16.el6.x86_64.rpm | 1.6 MB 00:02
(12/12): oracle-rdbms-server-12cR1-preinstall-1.0-14.el6 | 17 kB 00:00
--------------------------------------------------------------------------------
Total 578 kB/s | 22 MB 00:38
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : libgcc-4.4.7-16.el6.x86_64 1/17
Updating : libstdc++-4.4.7-16.el6.x86_64 2/17
Installing : libstdc++-devel-4.4.7-16.el6.x86_64 3/17
Installing : compat-libstdc++-33-3.2.3-69.el6.x86_64 4/17
Updating : cpp-4.4.7-16.el6.x86_64 5/17
Installing : ksh-20120801-28.el6.x86_64 6/17
Installing : libaio-devel-0.3.107-10.el6.x86_64 7/17
Updating : libgomp-4.4.7-16.el6.x86_64 8/17
Updating : gcc-4.4.7-16.el6.x86_64 9/17
Installing : gcc-c++-4.4.7-16.el6.x86_64 10/17
Installing : compat-libcap1-1.10-1.x86_64 11/17
Installing : oracle-rdbms-server-12cR1-preinstall-1.0-14.el6.x86_64 12/17
Cleanup : gcc-4.4.7-4.el6.x86_64 13/17
Cleanup : libstdc++-4.4.7-4.el6.x86_64 14/17
Cleanup : libgcc-4.4.7-4.el6.x86_64 15/17
Cleanup : cpp-4.4.7-4.el6.x86_64 16/17
Cleanup : libgomp-4.4.7-4.el6.x86_64 17/17
Verifying : compat-libcap1-1.10-1.x86_64 1/17
Verifying : libgomp-4.4.7-16.el6.x86_64 2/17
Verifying : gcc-c++-4.4.7-16.el6.x86_64 3/17
Verifying : gcc-4.4.7-16.el6.x86_64 4/17
Verifying : libaio-devel-0.3.107-10.el6.x86_64 5/17
Verifying : libstdc++-4.4.7-16.el6.x86_64 6/17
Verifying : compat-libstdc++-33-3.2.3-69.el6.x86_64 7/17
Verifying : ksh-20120801-28.el6.x86_64 8/17
Verifying : oracle-rdbms-server-12cR1-preinstall-1.0-14.el6.x86_64 9/17
Verifying : cpp-4.4.7-16.el6.x86_64 10/17
Verifying : libstdc++-devel-4.4.7-16.el6.x86_64 11/17
Verifying : libgcc-4.4.7-16.el6.x86_64 12/17
Verifying : libgomp-4.4.7-4.el6.x86_64 13/17
Verifying : libgcc-4.4.7-4.el6.x86_64 14/17
Verifying : cpp-4.4.7-4.el6.x86_64 15/17
Verifying : gcc-4.4.7-4.el6.x86_64 16/17
Verifying : libstdc++-4.4.7-4.el6.x86_64 17/17
Installed:
oracle-rdbms-server-12cR1-preinstall.x86_64 0:1.0-14.el6
Dependency Installed:
compat-libcap1.x86_64 0:1.10-1
compat-libstdc++-33.x86_64 0:3.2.3-69.el6
gcc-c++.x86_64 0:4.4.7-16.el6
ksh.x86_64 0:20120801-28.el6
libaio-devel.x86_64 0:0.3.107-10.el6
libstdc++-devel.x86_64 0:4.4.7-16.el6
Dependency Updated:
cpp.x86_64 0:4.4.7-16.el6 gcc.x86_64 0:4.4.7-16.el6
libgcc.x86_64 0:4.4.7-16.el6 libgomp.x86_64 0:4.4.7-16.el6
libstdc++.x86_64 0:4.4.7-16.el6
Complete!
[root@oem yum.repos.d]#

安装完之后,会自动创建oracle用户和oinstall用户组。现在最好给oracle用户设置一下密码:

1
2
3
4
5
6
7
8
[root@oem ~]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: it is too simplistic/systematic
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
[root@oem ~]#

禁用iptables和SELinux

为了简化安装过程,先禁用iptables:

1
2
3
4
5
6
7
8
[root@oem ~]# service iptables stop && service ip6tables stop && chkconfig iptables off && chkconfig ip6tables off
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
ip6tables: Setting chains to policy ACCEPT: filter [ OK ]
ip6tables: Flushing firewall rules: [ OK ]
ip6tables: Unloading modules: [ OK ]
[root@oem ~]#

再禁用SELinux:

1
2
3
4
5
6
7
8
9
10
11
12
[root@oem ~]# vim /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
#SELINUX=enforcing
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted

此时最好重启一下系统,如果不想马上重启的话,可以使用下面的命令临时禁用SELinux:

1
2
3
4
[root@oem ~]# setenforce 0
[root@oem ~]# getenforce
Permissive
[root@oem ~]#

修改/etc/hosts文件

几乎所有Oracle的产品,包括Enterprise Manager在内,都会依赖/etc/hosts文件的配置内容来保证主机名(短主机名和完整主机名)是可以被ping到的。所以在/etc/hosts文件中一定要使用服务器的公共IP。

本文使用下面的配置:

1
2
3
[root@oem ~]# vim /etc/hosts
127.0.0.1 localhost localhost.localdomain
192.168.56.7 oem.example.com oem

配置SSH和X11转发

如果是在远程连接的情况下来安装EM(比如使用VNC服务等),Oracle Universal Installer (OUI) GUI需要使用X11会话来运行。所以首先需要配置SSH来支持X11转发(默认就是开启的,只需要确认一下即可):

1
2
3
4
5
6
[root@oem ~]# vim /etc/ssh/sshd_config
#X11Forwarding no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
[root@oem ~]#

还需要安装xauth 和 xorg-x11-apps包:

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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
[root@oem ~]# rpm -qa | grep -i xauth
xorg-x11-xauth-1.0.2-7.1.el6.x86_64
[root@oem ~]# rpm -qa | grep -i xorg-x11-apps
[root@oem ~]# yum -y install xorg-x11-apps xauth
Loaded plugins: refresh-packagekit, security
Setting up Install Process
Package 1:xorg-x11-xauth-1.0.2-7.1.el6.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package xorg-x11-apps.x86_64 0:7.7-6.el6 will be installed
--> Processing Dependency: libXaw.so.7()(64bit) for package: xorg-x11-apps-7.7-6.el6.x86_64
--> Running transaction check
---> Package libXaw.x86_64 0:1.0.11-2.el6 will be installed
--> Processing Dependency: libXpm.so.4()(64bit) for package: libXaw-1.0.11-2.el6.x86_64
--> Running transaction check
---> Package libXpm.x86_64 0:3.5.10-2.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
xorg-x11-apps x86_64 7.7-6.el6 ol6_latest 276 k
Installing for dependencies:
libXaw x86_64 1.0.11-2.el6 ol6_latest 178 k
libXpm x86_64 3.5.10-2.el6 ol6_latest 50 k
Transaction Summary
================================================================================
Install 3 Package(s)
Total download size: 503 k
Installed size: 1.2 M
Downloading Packages:
(1/3): libXaw-1.0.11-2.el6.x86_64.rpm | 178 kB 00:00
(2/3): libXpm-3.5.10-2.el6.x86_64.rpm | 50 kB 00:00
(3/3): xorg-x11-apps-7.7-6.el6.x86_64.rpm | 276 kB 00:00
--------------------------------------------------------------------------------
Total 256 kB/s | 503 kB 00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : libXpm-3.5.10-2.el6.x86_64 1/3
Installing : libXaw-1.0.11-2.el6.x86_64 2/3
Installing : xorg-x11-apps-7.7-6.el6.x86_64 3/3
Verifying : xorg-x11-apps-7.7-6.el6.x86_64 1/3
Verifying : libXpm-3.5.10-2.el6.x86_64 2/3
Verifying : libXaw-1.0.11-2.el6.x86_64 3/3
Installed:
xorg-x11-apps.x86_64 0:7.7-6.el6
Dependency Installed:
libXaw.x86_64 0:1.0.11-2.el6 libXpm.x86_64 0:3.5.10-2.el6
Complete!
[root@oem ~]#

为保险起见,这时最好重启一下系统。

安装Oracle数据库12c

本章开始在Oracle Linux 6U5上安装Oracle Database 12c Release 1(12.1.0.2.0)。

创建目录和部署安装文件

Oracle数据库12c可以从这里下载到。

以root用户创建保存安装文件的目录:

1
2
[root@oem ~]# mkdir -p /u01/stage
[root@oem ~]# chown oracle:oinstall -R /u01/*

切换回oracle用户,创建目录:

1
[oracle@oem ~]$ mkdir /u01/stage/db12c

将下载好的数据库安装文件拷贝到/u01/stage/db12c目录,并解压:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[oracle@oem ~]$ ll /u01/stage/db12c/
total 2625088
-rwxrwx--- 1 oracle oinstall 1673544724 Jul 28 16:47 linuxamd64_12102_database_1of2.zipls
-rwxrwx--- 1 oracle oinstall 1014530602 Jul 28 16:30 linuxamd64_12102_database_2of2.zip
[oracle@oem ~]$ cd /u01/stage/db12c/
[oracle@oem db12c]$ ls
linuxamd64_12102_database_1of2.zip linuxamd64_12102_database_2of2.zip
[oracle@oem db12c]$ unzip linuxamd64_12102_database_1of2.zip
[oracle@oem db12c]$ unzip linuxamd64_12102_database_2of2.zip
[oracle@oem db12c]$ ll
total 2625092
drwxr-xr-x 7 oracle oinstall 4096 Jul 7 2014 database
-rwxrwx--- 1 oracle oinstall 1673544724 Jul 28 16:47 linuxamd64_12102_database_1of2.zip
-rwxrwx--- 1 oracle oinstall 1014530602 Jul 28 16:30 linuxamd64_12102_database_2of2.zip
[oracle@oem db12c]$

创建安装用目录(按照OFA标准)

Optimal Flexible Architecture (OFA) 标准是为管理Oracle安装而定义的一套目录推荐命名标准。OFA提供了与Oracle Universal Installer相一致的挂载点,目录,文件名的命名规范。

以root用户执行以下命令来创建所需的各个目录:

1
2
3
[root@oem ~]# mkdir -p /u01/app/oracle/product/12.1.0/dbhome_1
[root@oem ~]# chown -R oracle:oinstall /u01/*
[root@oem ~]# chmod -R 775 /u01/*
注意: /u01这个目录的拥有者应该是root。

修改ulimit值:最大文件描述符数为4096

安装完oracle-rdbms-server-12cR1-preinstall之后,会在/etc/security/limits.d自动生成配置文件oracle-rdbms-server-12cR1-preinstall.conf。以root用户修改里面的值如下:

1
2
3
[root@oem limits.d]# vim oracle-rdbms-server-12cR1-preinstall.conf
#oracle soft nofile 1024
oracle soft nofile 4096

修改完之后,切换到oracle用户,查看ulimit值是否生效:

1
2
3
4
[root@oem limits.d]# su - oracle
[oracle@oem ~]$ ulimit -n
4096
[oracle@oem ~]$

修改ulimit值:最大用户进程数为16384

安装完oracle-rdbms-server-12cR1-preinstall之后,会在/etc/security/limits.d自动生成配置文件90-nproc.conf。以root用户修改里面的值如下:

1
2
3
4
5
6
7
8
9
[root@oem ~]# cd /etc/security/limits.d/
[root@oem limits.d]# vim 90-nproc.conf
# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.
#* soft nproc 1024
* - nproc 16384
root soft nproc unlimited

切换为oracle用户,查看修改结果:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[oracle@oem db12c]$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 31446
max locked memory (kbytes, -l) 134217728
max memory size (kbytes, -m) unlimited
open files (-n) 4096 ##看这里!!!!
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 16384 ##看这里!!!!
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
[oracle@oem db12c]$

增大tmpfs到4GB

默认的tmpfs的值过小,Oracle数据库启动时可能会报错(ORA-00838,ORA-00845)。为了防止这种错误,先增大tmpfs的值到4GB。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[root@oem ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_oem-lv_root 50G 12G 35G 26% /
tmpfs 2.0G 292K 2.0G 1% /dev/shm
/dev/sda1 477M 55M 397M 13% /boot
/dev/mapper/vg_oem-lv_home 9.4G 23M 8.9G 1% /home
D_DRIVE 320G 284G 36G 89% /media/sf_D_DRIVE
[root@oem ~]# mount -t tmpfs shmfs -o size=4000m /dev/shm
[root@oem ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_oem-lv_root 50G 12G 35G 26% /
tmpfs 3.5G 0 3.5G 0% /dev/shm
/dev/sda1 477M 55M 397M 13% /boot
/dev/mapper/vg_oem-lv_home 9.4G 23M 8.9G 1% /home
D_DRIVE 320G 284G 36G 89% /media/sf_D_DRIVE
shmfs 4.0G 0 4.0G 0% /dev/shm
[root@oem ~]#

同时修改/etc/fstab文件,使配置永久生效:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[root@oem ~]# vim /etc/fstab
#
# /etc/fstab
# Created by anaconda on Thu Jul 30 15:08:36 2015
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_oem-lv_root / ext4 defaults 1 1
UUID=cb150940-32dd-4b63-9047-2fb7f9ab2b09 /boot ext4 defaults 1 2
/dev/mapper/vg_oem-lv_home /home ext4 defaults 1 2
/dev/mapper/vg_oem-lv_swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs size=4000m 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0

重启系统后,应该能看到如下的内容:

1
2
3
4
5
6
7
[root@oem ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_oem-lv_root 50G 12G 35G 26% /
tmpfs 4.0G 148K 4.0G 1% /dev/shm
/dev/sda1 477M 55M 397M 13% /boot
/dev/mapper/vg_oem-lv_home 9.4G 23M 8.9G 1% /home
[root@oem ~]#

作为oracle用户配置~/.bash_profile

以oracle用户,在~/.bash_profile的末尾加入如下配置内容:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Oracle variables
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=oem.example.com; export ORACLE_HOSTNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1; export ORACLE_HOME
AGENT_HOME=$ORACLE_BASE/product/agentr4/agent_inst; export AGENT_HOME
OMS_HOME=$ORACLE_BASE/product/MiddlewareR4/oms; export OMS_HOME
ORACLE_INSTANCE=/u01/app/oracle/product/gc_inst/WebTierIH1; export ORACLE_INSTANCE
ORACLE_SID=omr; export ORACLE_SID
ORACLE_UNQNAME=omr; export ORACLE_UNQNAME
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

并使之生效:

1
[oracle@oem ~]$ source .bash_profile

开始安装Oracle数据库

1
2
3
4
5
6
7
8
[oracle@oem ~]$ cd /u01/stage/db12c/database/
[oracle@oem database]$ ./runInstaller
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 500 MB. Actual 35581 MB Passed
Checking swap space: must be greater than 150 MB. Actual 3967 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-07-31_01-36-56PM. Please wait ...[oracle@oem database]$

Configure Security Updates

不选择I wish to receive security updates via My Oracle Support,点击Next

Configure Security Updates

Select Installation Option

勾选Create and configure a database,点击Next

Select Installation Option

Server Class

勾选Server Class,点击Next

Server Class

Grid Installation Options

勾选Single instance database installation,点击Next

Grid Installation Options

Select Install Type

勾选Advanced install,点击Next

Select Install Type

Select Product Languages

如果要支持多语言的话,勾选对应的语言,本文加入了Simplified Chinese 支持,点击Next

Select Product Languages

Select Database Edition

保持默认选择(Enterprise Edition (6.4GB)),直接点击Next

Select Database Edition

Specify Installation Location

保持默认选择:

  • Oracle base: /u01/app/oracle
  • Software location: /u01/app/oracle/product/12.1.0/dbhome_1

直接点击Next

Specify Installation Location

Create Inventory

保持默认选择:

  • Inventory Directory: /u01/app/oraInventory
  • oraInventory Group Name: oinstall

直接点击Next

Create Inventory

Select Configuration Type

保持默认选择(General Purpose / Transaction Processing),直接点击Next

Select Configuration Type

Specify Database Identifiers

设置:

  • Global database name: omr.example.com
  • Oracle system identifier (SID): omr

同时一定不要勾选Create as Container database。点击Next

Specify Database Identifiers

Specify Configuration Options

由于是测试环境的内存容量有限,所以将内存先设置为1024

Specify Configuration Options - Memory

字符集选择可以支持任何语言的Use Unicode (AL32UTF8)。点击Next

Specify Configuration Options - Character sets

Specify Database Storage Options

保持默认选择(File System)。点击Next

Specify Database Storage Options

Specify Management Options

保持默认选择(先不注册到EM中)。点击Next

Specify Management Options

Specify Recovery Options

保持默认选择(先不启用数据库恢复)。点击Next

Specify Recovery Options

Specify Schema Passwords

选择Use the same password for all accounts,并设置密码,点击Next

Specify Schema Passwords

Specify Operating System groups

全部都选择dba,点击Next

Specify Operating System groups

Summary

最后检查一遍配置,没有问题的话,点击Install

Summary

Install Product

开始漫长的安装过程,请耐心等待。。。

Install Product

Execute Configuration scripts

这时需要以root用户执行两个脚本:

Execute Configuration scripts

打开一个终端,切换到root用户,执行以下命令:

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
[oracle@oem ~]$ su -
Password:
[root@oem ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@oem ~]# /u01/app/oracle/product/12.1.0/dbhome_1/root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/12.1.0/dbhome_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /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 script.
Now product-specific root actions will be performed.
[root@oem ~]#

Database Configuration Assistant

看到下面的画面时,说明数据库已经安装完成。

Database Configuration Assistant

Finish

这时可以关闭安装向导。

Finish

顺便说一下,此时如果想删除数据库的话,可以执行$ORACLE_HOME/deinstall/deinstall脚本,简单一个命令就可以搞定了。

数据库安装后设置

数据库参数修改和监听服务查看

以root用户修改/etc/oratab文件,将restart标志位设置为Y:

1
2
3
[root@oem ~]# vim /etc/oratab
#omr:/u01/app/oracle/product/12.1.0/dbhome_1:N
omr:/u01/app/oracle/product/12.1.0/dbhome_1:Y

以oracle用户,创建Oracle数据库的redo日志文件夹:

1
[oracle@oem ~]$ mkdir /u01/app/oracle/product/redo_logs/

接着,登录到数据库中,先从spfile创建一个pfile:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[oracle@oem ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Fri Jul 31 14:49:34 2015
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> create pfile from spfile;
File created.
SQL>

然后,修改数据库参数并创建redo文件:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
SQL> ALTER SYSTEM SET processes=300 SCOPE=SPFILE;
System altered.
SQL> ALTER SYSTEM SET session_cached_cursors=200 SCOPE=SPFILE;
System altered.
SQL> ALTER SYSTEM SET db_securefile=PERMITTED SCOPE=BOTH;
System altered.
SQL> ALTER DATABASE ADD LOGFILE GROUP 4 ('/u01/app/oracle/product/redo_logs/log1a.rdo') SIZE 300M REUSE;
Database altered.
SQL> ALTER DATABASE ADD LOGFILE GROUP 5 ('/u01/app/oracle/product/redo_logs/log2a.rdo') SIZE 300M REUSE;
Database altered.
SQL> ALTER DATABASE ADD LOGFILE GROUP 6 ('/u01/app/oracle/product/redo_logs/log3a.rdo') SIZE 300M REUSE;
Database altered.

重启数据库,使配置生效:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
SQL> SHUTDOWN IMMEDIATE;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> STARTUP;
ORACLE instance started.
Total System Global Area 1073741824 bytes
Fixed Size 2932632 bytes
Variable Size 713031784 bytes
Database Buffers 352321536 bytes
Redo Buffers 5455872 bytes
Database mounted.
Database opened.
SQL>

确认一下HTTPS的端口是否是5500,并退出sqlplus:

1
2
3
4
5
6
7
8
9
SQL> SELECT dbms_xdb_config.gethttpsport FROM dual;
GETHTTPSPORT
------------
5500
SQL> EXIT
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

最后确认LISTNER的状态,看看监听服务是否正常:

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
[oracle@oem ~]$ lsnrctl status
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 31-JUL-2015 14:59:40
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oem.example.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date 31-JUL-2015 14:28:04
Uptime 0 days 0 hr. 31 min. 36 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/oem/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oem.example.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=oem.example.com)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/omr/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "omr.example.com" has 1 instance(s).
Instance "omr", status READY, has 1 handler(s) for this service...
Service "omrXDB.example.com" has 1 instance(s).
Instance "omr", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@oem ~]$

可以看到数据库服务omr.example.com已经就绪。

开机自动启动数据库(可选)

其实到上一步骤为止,Oracle的数据库安装已经完成。
如果还需要在开机时自动启动数据服务的话,可以按照下面的步骤实现。

首先以root用户创建一个自启动脚本:

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
30
31
32
33
[root@oem ~]# vim /etc/init.d/dbora
#!/bin/sh
# chkconfig: 345 99 10
# description: Oracle auto start-stop script.
#
# Set ORA_HOME to be equivalent to the $ORACLE_HOME
# from which you wish to execute dbstart and dbshut;
#
# Set ORA_OWNER to the user id of the owner of the
# Oracle database in ORA_HOME.
ORA_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
ORA_OWNER=oracle
if [ ! -f ${ORA_HOME}/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
'start')
# Start the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - ${ORA_OWNER} -c "${ORA_HOME}/bin/dbstart $ORA_HOME"
touch /var/lock/subsys/dbora
;;
'stop')
# Stop the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - ${ORA_OWNER} -c "${ORA_HOME}/bin/dbshut $ORA_HOME"
rm -f /var/lock/subsys/dbora
;;
esac

以root用户修改脚本权限,并加入到开机启动服务列表中:

1
2
3
4
5
[root@oem ~]# chmod 750 /etc/init.d/dbora
[root@oem ~]# chkconfig dbora on
[root@oem ~]# chkconfig --list|grep dbora
dbora 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@oem ~]#

最后,以root用户创建一些软链接,将自启动脚本加入到Oracle Linux 的启动进程中:

1
2
3
[root@oem ~]# ln -s /etc/init.d/dbora /etc/rc.d/rc0.d/K01dbora
[root@oem ~]# ln -s /etc/init.d/dbora /etc/rc.d/rc3.d/S96dbora
[root@oem ~]# ln -s /etc/init.d/dbora /etc/rc.d/rc5.d/S96dbora

这时可以重启一下系统,验证一下数据库服务有没有随系统自动启动。

安装Oracle Enterprise Manager 12c R4

本章开始利用Oracle Universal Installer (OUI)在Oracle Linux 6U5上安装如下组件:

  • Oracle Enterprise Manager 12c Release 4 (12.1.0.4)
  • Oracle Management Service
  • Oracle Management Agent

安装文件可以从这里下载到。

安装前检查

以root用户先查看一下必须的软件包是否已经安装完成:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[root@oem ~]# yum list make binutils gcc libaio glib-common libstdc++ libXtst systat glibc-devel glibc libaio glibc-devel.i686
Loaded plugins: refresh-packagekit, security
Installed Packages
binutils.x86_64 2.20.51.0.2-5.36.el6 @anaconda-OracleLinuxServer-201311252058.x86_64/6.5
gcc.x86_64 4.4.7-16.el6 @ol6_latest
glibc.x86_64 2.12-1.132.el6 @anaconda-OracleLinuxServer-201311252058.x86_64/6.5
glibc-devel.x86_64 2.12-1.132.el6 @anaconda-OracleLinuxServer-201311252058.x86_64/6.5
libXtst.x86_64 1.2.1-2.el6 @anaconda-OracleLinuxServer-201311252058.x86_64/6.5
libaio.x86_64 0.3.107-10.el6 @anaconda-OracleLinuxServer-201311252058.x86_64/6.5
libstdc++.x86_64 4.4.7-16.el6 @ol6_latest
make.x86_64 1:3.81-20.el6 @anaconda-OracleLinuxServer-201311252058.x86_64/6.5
Available Packages
binutils.x86_64 2.20.51.0.2-5.43.el6 ol6_latest
glibc.i686 2.12-1.166.el6_7.1 ol6_latest
glibc.x86_64 2.12-1.166.el6_7.1 ol6_latest
glibc-devel.i686 2.12-1.166.el6_7.1 ol6_latest
glibc-devel.x86_64 2.12-1.166.el6_7.1 ol6_latest
libXtst.i686 1.2.2-2.1.el6 ol6_latest
libXtst.x86_64 1.2.2-2.1.el6 ol6_latest
libaio.i686 0.3.107-10.el6 ol6_latest
libstdc++.i686 4.4.7-16.el6 ol6_latest
[root@oem ~]#

安装上面Available Packages中列出的所有必须软件包:

1
[root@oem ~]# yum install binutils.x86_64 glibc.i686 glibc.x86_64 glibc-devel.i686 glibc-devel.x86_64 libXtst.i686 libXtst.x86_64 libaio.i686 libstdc++.i686

创建目录和部署安装文件

以oracle用户,创建EM安装文件保存目录,并将安装文件拷贝到该目录中:

1
2
3
4
5
6
7
8
[oracle@oem ~]$ mkdir -p /u01/stage/em12104
[oracle@oem ~]$ cd /u01/stage/em12104/
[oracle@oem em12104]$ ll
total 6640900
-rwxrwx--- 1 oracle oinstall 2195693096 Jul 30 15:34 em12104_linux64_disk1.zip
-rwxrwx--- 1 oracle oinstall 1877449643 Jul 30 13:13 em12104_linux64_disk2.zip
-rwxrwx--- 1 oracle oinstall 2727123784 Jul 30 13:41 em12104_linux64_disk3.zip
[oracle@oem em12104]$

依次解压缩安装文件:

1
2
3
4
5
6
7
8
[oracle@oem em12104]$ unzip em12104_linux64_disk1.zip
[oracle@oem em12104]$ unzip em12104_linux64_disk2.zip
[oracle@oem em12104]$ unzip em12104_linux64_disk3.zip
[oracle@oem em12104]$ ls
bipruntime install plugins stage
em12104_linux64_disk1.zip jdk release_notes.pdf wls
em12104_linux64_disk2.zip libskgxn response WT.zip
em12104_linux64_disk3.zip oms runInstaller

以oracle用户创建oms和agent的安装目录:

1
2
[oracle@oem em12104]$ mkdir -p /u01/app/oracle/product/MiddlewareR4
[oracle@oem em12104]$ mkdir -p /u01/app/oracle/product/agentr4

开始安装EM

以oracle用户,启动OUI图形界面开始安装:

1
2
3
4
5
6
7
8
[oracle@oem em12104]$ cd /u01/stage/em12104/
[oracle@oem em12104]$ ./runInstaller
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 400 MB. Actual 14266 MB Passed
Checking swap space: must be greater than 150 MB. Actual 3958 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-07-31_03-52-55PM. Please wait ...[oracle@oem em12104]$

My Oracle Support Details

不选择I wish to receive security updates via My Oracle Support,点击Next

My Oracle Support Details

Software Updates

选择Skip,点击Next

Software Updates

Prerequisite Checks

等待所有检查通过,点击Next

Prerequisite Checks

Installation Types

Create a new Enterprise Manager System下,选择Advanced,点击Next

Installation Types

Installation Details

设置如下:

  • Middleware Home Location: /u01/app/oracle/product/MiddlewareR4
  • Agent Base directory: /u01/app/oracle/product/agentr4
  • Host Name: oem.example.com (注意,必须是FQDN)

点击Next

Installation Details

Select Plug-ins

除了默认的选择之外,选择如下三个插件:

  • Oracle Cloud Application
  • Oracle Consolidation Planning and Chargeback
  • Oracle Virtualization

然后点击Next

Select Plug-ins

WebLogic Server Configuration Details

输入WebLogic GCDomain的密码,以及Node Manager密码。其他保持默认选择,点击Next

注意:密码不能以数字开头!

WebLogic Server Configuration Details

Database Connection Details

输入数据库的连接信息:

  • Database Host Name: oem.example.com
  • Port: 1521
  • Service/SID: omr
  • SYS Password: yourpassword

Deployment Size选择SMALL。关于Deployment Size各个选项的含义,可以参考以下说明:

  • Small < 100 agents < 1000 targets
  • Medium < 1000 agents < 10,000 targets
  • Large > 1000 agents > 10,000 targets

点击Next

Database Connection Details

安装向导可能还会检查出一些错误的数据库设置,这时按照向导中的提示选择自动修复即可:

Database Connection Details - Error

可能还会有一些警告出现。这是一些可能会影响EM的运行性能的警告,不会对EM的正常启动造成影响,所以可以暂时忽略,可以在安装完之后再修改数据库配置文件。

Database Connection Details - Warning

Enterprise Manager Configuration Details

输入SYSMAN和OMA Agent Registration的密码。其他的选项保持默认值,点击Next

注意:密码不能以数字开始,而且在安装完成后登陆EM的用户名就是sysman(不区分大小写)。

Enterprise Manager Configuration Details

Port Configuration Details

保持默认值,点击Next

Port Configuration Details

Review

检查所有设置,确认无误的话,点击Install

Review

Installation Progress Details

开始漫长的安装过程,请耐心等待。

Installation Progress Details

最后需要以root用户运行一个脚本:

Execute Configuration scripts

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
30
31
32
33
34
35
36
37
38
[root@oem ~]# /u01/app/oracle/product/MiddlewareR4/oms/allroot.sh
Starting to execute allroot.sh .........
Starting to execute /u01/app/oracle/product/MiddlewareR4/oms/root.sh ......
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/MiddlewareR4/oms
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]: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying coraenv to /usr/local/bin ...
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.
/etc exist
Creating /etc/oragchomelist file...
/u01/app/oracle/product/MiddlewareR4/oms
Finished execution of /u01/app/oracle/product/MiddlewareR4/oms/root.sh ......
Starting to execute /u01/app/oracle/product/agentr4/core/12.1.0.4.0/root.sh ......
Finished product-specific root actions.
/etc exist
Finished execution of /u01/app/oracle/product/agentr4/core/12.1.0.4.0/root.sh ......
[root@oem ~]#

Finish

安装结束。

Finish

在安装结束画面中会显示下面的信息:

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
This information is also available at:
/u01/app/oracle/product/MiddlewareR4/oms/install/setupinfo.txt
See below for information pertaining to your Enterprise Manager installation:
Use the following URL to access:
1. Enterprise Manager Cloud Control URL: https://oem.example.com:7802/em
2. Admin Server URL: https://oem.example.com:7102/console
The following details need to be provided during the additional OMS install:
1. Admin Server Hostname: oem.example.com
2. Admin Server Port: 7102
You can find the details on ports used by this deployment at : /u01/app/oracle/product/MiddlewareR4/oms/install/portlist.ini
NOTE:
An encryption key has been generated to encrypt sensitive data in the Management Repository. If this key is lost, all encrypted data in the Repository becomes unusable.
A backup of the OMS configuration is available in /u01/app/oracle/product/gc_inst/em/EMGC_OMS1/sysman/backup on host oem.example.com. See Cloud Control Administrators Guide for details on how to back up and recover an OMS.
NOTE: This backup is valid only for the initial OMS configuration. For example, it will not reflect plug-ins installed later, topology changes like the addition of a load balancer, or changes to other properties made using emctl or emcli. Backups should be created on a regular basis to ensure they capture the current OMS configuration. Use the following command to backup the OMS configuration:
/u01/app/oracle/product/MiddlewareR4/oms/bin/emctl exportconfig oms -dir <backup dir>

也就是说,可以从下面的URL访问到EM了:

https://oem.example.com:7802/em

至此,EM的全部安装过程结束。

(END)

文章目录
  1. 1. 前提
  2. 2. 环境
  3. 3. 安装必需的软件包
    1. 3.1. 禁用iptables和SELinux
    2. 3.2. 修改/etc/hosts文件
    3. 3.3. 配置SSH和X11转发
  4. 4. 安装Oracle数据库12c
    1. 4.1. 创建目录和部署安装文件
    2. 4.2. 创建安装用目录(按照OFA标准)
    3. 4.3. 修改ulimit值:最大文件描述符数为4096
    4. 4.4. 修改ulimit值:最大用户进程数为16384
    5. 4.5. 增大tmpfs到4GB
    6. 4.6. 作为oracle用户配置~/.bash_profile
    7. 4.7. 开始安装Oracle数据库
      1. 4.7.1. Configure Security Updates
      2. 4.7.2. Select Installation Option
      3. 4.7.3. Server Class
      4. 4.7.4. Grid Installation Options
      5. 4.7.5. Select Install Type
      6. 4.7.6. Select Product Languages
      7. 4.7.7. Select Database Edition
      8. 4.7.8. Specify Installation Location
      9. 4.7.9. Create Inventory
      10. 4.7.10. Select Configuration Type
      11. 4.7.11. Specify Database Identifiers
      12. 4.7.12. Specify Configuration Options
      13. 4.7.13. Specify Database Storage Options
      14. 4.7.14. Specify Management Options
      15. 4.7.15. Specify Recovery Options
      16. 4.7.16. Specify Schema Passwords
      17. 4.7.17. Specify Operating System groups
      18. 4.7.18. Summary
      19. 4.7.19. Install Product
      20. 4.7.20. Execute Configuration scripts
    8. 4.8. Database Configuration Assistant
      1. 4.8.1. Finish
    9. 4.9. 数据库安装后设置
      1. 4.9.1. 数据库参数修改和监听服务查看
      2. 4.9.2. 开机自动启动数据库(可选)
  5. 5. 安装Oracle Enterprise Manager 12c R4
    1. 5.1. 安装前检查
    2. 5.2. 创建目录和部署安装文件
    3. 5.3. 开始安装EM
      1. 5.3.1. My Oracle Support Details
      2. 5.3.2. Software Updates
      3. 5.3.3. Prerequisite Checks
      4. 5.3.4. Installation Types
      5. 5.3.5. Installation Details
      6. 5.3.6. Select Plug-ins
      7. 5.3.7. WebLogic Server Configuration Details
      8. 5.3.8. Database Connection Details
      9. 5.3.9. Enterprise Manager Configuration Details
      10. 5.3.10. Port Configuration Details
      11. 5.3.11. Review
      12. 5.3.12. Installation Progress Details
      13. 5.3.13. Finish