安装环境:
CentOS release 6.5 (Final) RAM:2GB SWAP:4GB DISK:40GB
Minimum RAM |
|
[root@orcl ~]# grep MemTotal /proc/meminfo
MemTotal: 1907580 kB
Red Hat Enterprise Linux 6.4:2.6.32-358.el6.x86_64或更高版本
--建议关闭透明大页
禁用透明HugePages |
Oracle建议您禁用Transparent HugePages并使用标准HugePages来提高性能。 |
Oracle建议禁用Transparent HugePages,因为它们可能会导致访问内存的延迟,从而导致Oracle RAC环境中的节点重新启动,或Oracle Database单实例的性能问题或延迟。建议使用标准的HugePages for Linux。
--/tmp目录
Disk space allocated to the |
At least 1 GB of space in the |
[root@orcl ~]# df -h /tmp
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 36G 11G 24G 32% /
--swap
Swap space allocation relative to RAM (Oracle Database) |
Between 1 GB and 2 GB: 1.5 times the size of the RAM |
Swap space allocation relative to RAM (Oracle Restart) |
Between 8 GB and 16 GB: Equal to the size of the RAM |
[root@orcl ~]# grep SwapTotal /proc/meminfo
SwapTotal: 4194296 kB
[root@orcl ~]# df -h /dev/shm
Filesystem Size Used Avail Use% Mounted on
tmpfs 932M 72K 932M 1% /dev/shm
--存储检查
Minimum local disk storage space for Oracle software | For Linux x86-64: |
Packages for Red Hat Enterprise Linux 6 |
The following packages (or later versions) must be installed: bc |
[root@orcl ~]# ping orcl
PING orcl (192.168.48.10) 56(84) bytes of data.
64 bytes from orcl (192.168.48.10): icmp_seq=1 ttl=64 time=0.068 ms
64 bytes from orcl (192.168.48.10): icmp_seq=2 ttl=64 time=0.025 ms
检查是否启用
[root@orcl ~]# cat /sys/kernel/mm/redhat_transparent_hugepage/enabled
[always] madvise never
always表示正在使用透明大页
如何禁用请查文档。
注:当第一次安装Oracle软件时,OUI会创建oraInst.loc文件,该文件标识oracle inventory组的名称(默认为oinstall),以及Oracle inventory的目录
如
inventory_loc=central_inventory_location
inst_group=group
检测:
[root@orcl ~]# more /etc/oraInst.loc
/etc/oraInst.loc: No such file or directory
创建Oracle Inventory用户组:
[root@orcl ~]# /usr/sbin/groupadd -g 54321 oinstall
Oracle用户必须将Oracle Inventory组作为其主组,以便每个Oracle软件安装所有者都可以写入oraInventory,并能够正确设置OCR和Oracle Clusterware资源权限。数据库软件所有者还必须具有OSDBA组和(如果有)OSOPER,OSBACKUPDBA,OSDGDBA,OSRACDBA和OSKMDBA组作为辅助组。
创建组:
[root@orcl ~]# /usr/sbin/groupadd -g 54321 oinstall
[root@orcl ~]# /usr/sbin/groupadd -g 54322 dba --SYSDBA权限
[root@orcl ~]# groupadd -g 54323 oper --可选
[root@orcl ~]# /usr/sbin/groupadd -g 54324 backupdba --授予SYSBACKUP权限,以在rman或sqlplus执行备份恢复
[root@orcl ~]# # /usr/sbin/groupadd -g 54325 dgdba --授予SYSDG权限,执行dataguard操作
[root@orcl ~]# # /usr/sbin/groupadd -g 54326 kmdba --授予SYSKM权限,执行透明数据加密操作
创建用户:
[root@orcl ~]# /usr/sbin/useradd -u 54321 -g oinstall -G dba,backupdba,dgdba,kmdba oracle
[root@orcl ~]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: it is based on a dictionary word
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
--将oracle用户默认文件模式创建掩码(umask)为022,以确保用户执行软件安装时创建的文件具有644权限。
[oracle@orcl ~]$ vi .bash_profile
umask 022
[oracle@orcl ~]$ umask -验证
0022 --显示为0022 22 022则为正确配置
--检查oracle用户资源限制
Resource Shell Limit | Resource | Soft Limit | Hard Limit |
---|---|---|---|
Open file descriptors |
nofile |
at least 1024 |
at least 65536 |
Number of processes available to a single user |
nproc |
at least 2047 |
at least 16384 |
Size of the stack segment of the process |
stack |
at least 10240 KB |
at least 10240 KB, and at most 32768 KB |
Maximum locked memory limit | memlock | at least 90 percent of the current RAM when HugePages memory is enabled and at least 3145728 KB (3 GB) when HugePages memory is disabled | at least 90 percent of the current RAM when HugePages memory is enabled and at least 3145728 KB (3 GB) when HugePages memory is disabled |
[root@orcl ~]# vi /etc/security/limits.conf
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle soft memlock 3145728
oracle hard memlock 3145728
--设置远程终端显示
[oracle@orcl ~]$ export DISPLAY=192.168.48.11:0.0
--X11转发设置
要确保X11转发不会导致安装失败,需要为oracle用户创建用户级SSH客户端配置文件:
新用户创建可能没有.ssh文件夹,可以执行如下命令:
[oracle@orcl ~]$ ssh orcl --orcl为hostname
The authenticity of host 'orcl (192.168.48.10)' can't be established.
RSA key fingerprint is 3c:3d:00:37:82:8f:38:84:16:cd:cf:d5:c4:47:20:39.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'orcl,192.168.48.10' (RSA) to the list of known hosts.
oracle@orcl's password:
Last login: Thu Apr 4 22:07:12 2019 from 192.168.48.11
[oracle@orcl .ssh]$ vi config
Host *
ForwardX11 no
--创建oracle vault用户
注:如果打算默认使用oracle database vault,则必须创建oracle database vault用户并进行配置
oracle database vault会安装数据库基础审计策略,该策略涵盖存储在oracel vault表中的访问控制配置信息,存储在oracle catalog中的信息(回滚段,表空间等),系统权限的使用以及oracle label security
--设置Oracle环境变量
[oracle@orcl ~]$ vi .bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/18c/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
[root@orcl ~]# mkdir -p /u01/app/oracle
[root@orcl ~]# mkdir -p /u01/app/oracle/product/18c/dbhome_1
[root@orcl ~]# chown -R oracle:oinstall /u01/app
[oracle@orcl ~]$ cd $ORACLE_HOME
[oracle@orcl dbhome_1]$ unzip -q /tmp/database/linuxx64_12201_database.zip
[oracle@orcl database]$ ./runInstaller
Starting Oracle Universal Installer...
接着就是一路点下去即可,碰到检测不过的地方run&fix