5.1.2.9. 设置用户资源限制
因为所有进程都是以Oracle身份运行的,需定义Oracle用户能够使用的系统资源数量。首先编辑配置文件:
vi /etc/security/limits.conf
增加内容:
grid soft nproc 16384 grid hard nproc 16394 grid soft nofile 65536 grid hard nofile 65536 oracle soft nofile 65536 oracle hard nofile 65536 oracle soft nproc 16384 oracle hard nproc 16384
5.1.2.10. 配置SSH用户等价(此项可不做)
在安装grid软件和oracle数据库软件时,系统会自动做SSH用户等价操作。自动做SSH用户等价操作此处不做说明。
手动配置SSH用户等价具体实施的话命令如下:
? 在主节点rcahadb1上以grid,oracle用户身份生成用户的公匙和私匙 [root@rcahadb1 ~]$ ping rcahadb2
[root@rcahadb1 ~]$ ping rcahadb2-priv
[root@rcahadb1 ~]$ su - grid [grid@rcahadb1 ~]$ mkdir ~/.ssh
[grid@rcahadb1 ~]$ ssh-keygen -t rsa [grid@rcahadb1 ~]$ ssh-keygen -t dsa
[root@rcahadb1 ~]$ su - oracle [oracle@rcahadb1 ~]$ mkdir ~/.ssh [oracle@rcahadb1 ~] ssh-keygen -t rsa [oracle@rcahadb1 ~] ssh-keygen -t dsa
? 在副节点rcahadb2上以grid,oracle执行相同的操作,确保通信无阻 [root@rcahadb2 ~]$ ping rcahadb1
[root@rcahadb2 ~]$ ping rcahadb1-priv
17 / 64
[root@rcahadb2 ~]$ su - grid [grid@rcahadb2 ~]$ mkdir ~/.ssh
[grid@rcahadb2 ~]$ ssh-keygen -t rsa [grid@rcahadb2 ~]$ ssh-keygen -t dsa
[root@rcahadb2 ~]$ su - oracle [oracle@rcahadb2 ~]$ mkdir ~/.ssh
[oracle@rcahadb2 ~]$ ssh-keygen -t rsa [oracle@rcahadb2 ~]$ ssh-keygen -t dsa
? 在主节点rcahadb1上grid,oracle用户执行以下操作
[grid@rcahadb1 ~]$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys [grid@rcahadb1 ~]$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
[grid@rcahadb1 ~]$ ssh rcahadb2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys [grid@rcahadb1 ~]$ ssh rcahadb2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys [grid@rcahadb1 ~]$ scp ~/.ssh/authorized_keys rcahadb2:~/.ssh/authorized_keys
[oracle@rcahadb1 ~]$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys [oracle@rcahadb1 ~]$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
[oracle@rcahadb1 ~]$ ssh rcahadb2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys [oracle@rcahadb1 ~]$ ssh rcahadb2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys [oracle@rcahadb1 ~]$ scp ~/.ssh/authorized_keys rcahadb2:~/.ssh/authorized_keys ? 主节点rcahadb1上分别grid,oracle用户执行检验操作 [grid@rcahadb1 ~]$ exec /usr/bin/ssh-agent $SHELL [grid@rcahadb1 ~]$/usr/bin/ssh-add [grid@rcahadb1 ~]$ ssh rcahadb1 date [grid@rcahadb1 ~]$ ssh rcahadb2 date
[grid@rcahadb1 ~]$ ssh rcahadb1-priv date [grid@rcahadb1 ~]$ ssh rcahadb2-priv date
[oracle@rcahadb1 ~]$ exec /usr/bin/ssh-agent $SHELL [oracle@rcahadb1 ~]$/usr/bin/ssh-add [oracle@rcahadb1 ~]$ ssh rcahadb1 date [oracle@rcahadb1 ~]$ ssh rcahadb2 date
[oracle@rcahadb1 ~]$ ssh rcahadb1-priv date [oracle@rcahadb1 ~]$ ssh rcahadb2-priv date
? 在副节点rcahadb2上分别grid,oracle用户执行检验操作 [grid@rcahadb1 ~]$ exec /usr/bin/ssh-agent $SHELL [grid@rcahadb1 ~]$ /usr/bin/ssh-add [grid@rcahadb1 ~]$ ssh rcahadb1 date [grid@rcahadb1 ~]$ ssh rcahadb2 date [grid@rcahadb1 ~]$ ssh rcahadb1-pri date [grid@rcahadb1 ~]$ ssh rcahadb2-pri date
18 / 64
[oracle@rcahadb1 ~]$ exec /usr/bin/ssh-agent $SHELL [oracle@rcahadb1 ~]$ /usr/bin/ssh-add [oracle@rcahadb1 ~]$ ssh rcahadb1 date [oracle@rcahadb1 ~]$ ssh rcahadb2 date [oracle@rcahadb1 ~]$ ssh rcahadb1-pri date [oracle@rcahadb1 ~]$ ssh rcahadb2-pri date
5.1.2.11. OS Kernel配置
修改操作系统相关参数,在所有节点执行; #vi /etc/sysctl.conf
增加内容:
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128 fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 4194304 net.core.rmem_max = 4194304
net.core.wmem_default = 4194304 net.core.wmem_max = 4194304 kernel.panic = 60
fs.aio-max-nr = 1048576
net.ipv4.tcp_syncookies = 1
生效: sysctl -p
5.1.2.12. 分区大于2T配置
[root@rcahadb1 grid]# parted /dev/emcpowerj (parted) mklabel gpt
(parted) mkpart primary 0 4096000 (parted) quit
5.1.2.13. 多路径设备配置
1、EMC自带多路径权限配置
19 / 64
[root@rcahadb1] vi /etc/udev/rules.d/50-udev.rules
SUBSYSTEM==\id\
SUBSYSTEM==\id\
SUBSYSTEM==\id\
SUBSYSTEM==\id\
SUBSYSTEM==\id\
[root@rcahadb1] start_udev
[root@rcahadb1] ll /dev/emcpower*
2、Linux自带多路径权限配置
从linux 6.4中自带的权限模板复制到udev配置文件所在目录
# cp /usr/share/doc/device-mapper-1.02.77/12-dm-permissions.rules /etc/udev/rules.d/
在12-dm-permissions.rules中增加多路径设备权限设置 [root@rcahadb1]# vi 12-dm-permissions.rules
ENV{DM_NAME}==\\
ENV{DM_NAME}==\\
ENV{DM_NAME}==\\
ENV{DM_NAME}==\\
ENV{DM_NAME}==\\
重启udev服务
[root@rcahadb1]# /sbin/start_udev
验证权限是否正确
[root@rcahadb1]# ll /dev/mapper/mpath* [root@rcahadb1]# ll /dev/dm-*
2.3.3. 磁盘分区
略。
20 / 64