没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
For personal use only in study and research; not for
commercial use
For personal use only in study and research; not for
commercial use
ORACLE 11G RAC 安装配置(自整理)
测试配置缓环境:Red Hat Enterprise Linux 5.8
一、关闭防火墙
[root@rac01 ~]# service iptables stop
[root@rac01 ~]# chkconfig iptables off
[root@rac01 ~]# chkconfig iptables –list
iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@rac01 ~]# vi /etc/selinux/config
# 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=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
二、修改 hosts 文件(所有节点)
[root@rac01 ~]# vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
172.18.3.211 rac01.svc.com rac01
172.18.3.212 rac02.svc.com rac02
10.10.10.211 rac01-priv.svc.com rac01-priv
10.10.10.212 rac02-priv.svc.com rac02-priv
172.18.3.213 rac01-vip.svc.com rac01-vip
172.18.3.214 rac02-vip.svc.com rac02-vip
172.18.3.215 rac-scan.svc.com rac-scan
172.18.3.216 rac-scan.svc.com rac-scan
172.18.3.217 rac-scan.svc.com rac-scan
三、添加组和用户
创建组:
[root@rac01 ~]# groupadd -g 1000 oinstall
[root@rac01 ~]# groupadd -g 1001 asmadmin
[root@rac01 ~]# groupadd -g 1002 dba
[root@rac01 ~]# groupadd -g 1003 asmdba
[root@rac01 ~]# groupadd -g 1004 asmoper
创建 grid 用户:
[root@rac01 ~]# useradd -u 1000 -g oinstall -G asmadmin,asmdba,asmoper,dba -d /home/grid -m
grid
为 grid 用户设密码:
[root@rac01 ~]#passwd grid
创建 oracle 用户:
如果 oracle 用户不存在,则:
[root@rac01 ~]# useradd -u 1001 -g oinstall -G dba,asmdba -d /home/oracle -m oracle
如果 oracle 用户已经存在,则:
[root@rac01 ~]# usermod -g oinstall -G dba,asmdba –u 1001 oracle
为 oracle 用户设密码:
[root@rac01 ~]# passwd oracle
检测 nobody 用户
[root@rac01 ~]# id nobody
如果不存在,则:
[root@rac01 ~]# useradd nobody
四、配 SSH 互信
为 ssh 和 scp 创建连接
ls -l /usr/local/bin/ssh
ls -l /usr/local/bin/scp
不存在则创建
[root@rac01 ~]# /bin/ln -s /usr/bin/ssh /usr/local/bin/ssh
[root@rac01 ~]# /bin/ln -s /usr/bin/scp /usr/local/bin/scp
为 grid 用户配置 SSH:
在每个节点上:
[root@rac01 ~]# su – grid
[grid@rac01 ~]# mkdir ~/.ssh
[grid@rac01 ~]#cd .ssh
[grid@rac01 ~]# ssh-keygen -t rsa
[grid@rac01 ~]# ssh-keygen -t dsa
在节点 1 上:
[grid@rac01 ~]# touch authorized_keys
[grid@rac01 ~]# ssh rac01 cat /home/grid/.ssh/id_rsa.pub >> authorized_keys
[grid@rac01 ~]# ssh rac02 cat /home/grid/.ssh/id_rsa.pub >> authorized_keys
[grid@rac01 ~]# ssh rac01 cat /home/grid/.ssh/id_dsa.pub >> authorized_keys
[grid@rac01 ~]# ssh rac02 cat /home/grid/.ssh/id_dsa.pub >> authorized_keys
[grid@rac01 ~]# scp authorized_keys rac02:/home/grid/.ssh/
分别在每个节点上:
[grid@rac01 ~]# ssh rac01 date
[grid@rac01 ~]# ssh rac02 date
[grid@rac01 ~]# ssh-agent $SHELL
[grid@rac01 ~]# ssh-add
为 oracle 用户配置 SSH:
在每个节点上:
[root@rac01 ~]# su – oracle
[oracle@rac01 ~]# mkdir ~/.ssh
[oracle@rac01 ~]#cd .ssh
[oracle@rac01 ~]# ssh-keygen -t rsa
[oracle@rac01 ~]# ssh-keygen -t dsa
在节点 1 上:
[oracle@rac01 ~]# touch authorized_keys
[oracle@rac01 ~]# ssh rac01 cat /home/oracle/.ssh/id_rsa.pub >> authorized_keys
[oracle@rac01 ~]# ssh rac02 cat /home/oracle/.ssh/id_rsa.pub >> authorized_keys
[oracle@rac01 ~]# ssh rac01 cat /home/oracle/.ssh/id_dsa.pub >> authorized_keys
[oracle@rac01 ~]# ssh rac02 cat /home/oracle/.ssh/id_dsa.pub >> authorized_keys
[oracle@rac01 ~]# scp authorized_keys rac02:/home/oracle/.ssh/
分别在每个节点上:
[oracle@rac01 ~]# ssh rac01 date
[oracle@rac01 ~]# ssh rac02 date
[oracle@rac01 ~]# ssh-agent $SHELL
[oracle@rac01 ~]# ssh-add
五、配置 NTP
[root@rac01 ~]#vi /etc/ntp.conf
...
#server 0.centos.pool.ntp.org
#server 1.centos.pool.ntp.org
#server 2.centos.pool.ntp.org
server 172.18.3.115
#server 127.127.1.0 # local clock
#fudge 127.127.1.0 stratum 10
[root@rac01 ~]# vi /etc/sysconfig/ntpd
# Drop root to id 'ntp:ntp' by default.
OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid"
# Set to 'yes' to sync hw clock after successful ntpdate
SYNC_HWCLOCK=yes
# Additional options for ntpdate
NTPDATE_OPTIONS=""
启动
[root@rac01 ~]# chkconfig ntpd on
[root@rac01 ~]# service ntpd start
[root@rac01 ~]# ntpdate -d -u 172.18.3.115
启用 name service cache daemon
[root@rac01 ~]# chkconfig --level 35 nscd on
[root@rac01 ~]# service nscd restart
六、配置内核参数:
[root@rac01 ~]# vi /etc/sysctl.conf
# for oracle 11g
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2147483648
kernel.shmmax = 68719476736
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
使修改参数立即生效:
[root@rac01 ~]# /sbin/sysctl -p
[root@rac01 ~]# /etc/security/limits.conf
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
[root@rac01 ~]# /etc/pam.d/login
session required pam_limits.so
[root@rac01 ~]# /etc/profile
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
七、对硬盘进行分区:
以下操作在节点 1 完成:
[root@rac01 ~]# fdisk /dev/sdb
Command (m for help): p
Disk /dev/sdb: 8589 MB, 8589934592 bytes
剩余47页未读,继续阅读
资源评论
春哥111
- 粉丝: 1w+
- 资源: 5万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于Vue+NodeJS的学生社团管理系统(前后端代码)
- 基于SSM+JSP的快递管理系统(前后端代码)
- 全球火点数据-modis-2015-2023年
- YOLOv8完整网络结构图详细visio
- LCD1602电子时钟程序
- 西北太平洋热带气旋【灾害风险统计】及【登陆我国次数评估】数据集-1980-2023
- 全球干旱数据集【自校准帕尔默干旱程度指数scPDSI】-190101-202312-0.5x0.5
- 基于Python实现的VAE(变分自编码器)训练算法源代码+使用说明
- 全球干旱数据集【标准化降水蒸发指数SPEI-12】-190101-202312-0.5x0.5
- C语言小游戏-五子棋-详细代码可运行
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功