内存宽裕的话就给个2G
硬盘给个50G
网卡要双网卡,一个对内,一个对外
建议外网卡用host-only,内网卡用内部网络
2、安装好之后,进行配置
配置之前要对网络规划好,以免因为IP或hoshname造成的错误
这里是我的网络配置:
实例名称 | 公用IP(pub) | 专用IP(pri) | 虚拟IP(vip) |
rac1 | 192.168.56.101 | 192.168.1.1 | 192.168.56.103 |
rac2 | 192.168.56.102 | 192.168.1.2 | 192.168.56.104 |
下面就一步一步来配置了
增加主机名和对应的IP,一定要细心,并提前规划好网络
1、[root@localhost ~]# vim /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
#Public IP
192.168.56.101 rac1.localdomain rac1
192.168.56.102 rac2.localdomain rac2
#Private IP
192.168.1.1 rac1-priv.localdomain rac1-priv
192.168.1.2 rac2-priv.localdomain rac2-priv
#Virtual IP
192.168.56.103 rac1-vip.localdomain rac1-vip
192.168.56.104 rac2-vip.localdomain rac2-vip
~
~
"/etc/hosts" 21L, 486C written
2 、修改节点1主机名
[root@localhost ~]# vim /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=rac1.localdomain
3 配置网卡1和2的IP
[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
# Intel Corporation 82540EM Gigabit Ethernet Controller
DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.56.101
NETMASK=255.255.255.0
HWADDR=08:00:27:AD:07:21
ONBOOT=yes
[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth1
# Intel Corporation 82540EM Gigabit Ethernet Controller
DEVICE=eth1
BOOTPROTO=static
IPADDR=192.168.1.1
HWADDR=08:00:27:7F:B9:9C
ONBOOT=yes
查看IP,发现网卡1和网卡2已经修改好
[root@localhost ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:AD:07:21
inet addr:192.168.56.101 Bcast:192.168.56.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fead:721/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:915 errors:0 dropped:0 overruns:0 frame:0
TX packets:730 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:81297 (79.3 KiB) TX bytes:112301 (109.6 KiB)
Base address:0xd010 Memory:f0000000-f0020000
eth1 Link encap:Ethernet HWaddr 08:00:27:7F:B9:9C
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe7f:b99c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:31 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:7490 (7.3 KiB)
Base address:0xd040 Memory:f0820000-f0840000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1233 errors:0 dropped:0 overruns:0 frame:0
TX packets:1233 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3950000 (3.7 MiB) TX bytes:3950000 (3.7 MiB)
退出再登录,发现主机名已经修改过来了
[root@localhost ~]# exit
logout
Last login: Sat May 24 10:38:27 2014 from 192.168.56.1
[root@rac1 ~]#
修改系统内核参数,打开发现两个参数(已标红)存在且比官方文档要求的大,就不做修改
[root@rac1 ~]# vim /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 0
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename
# Useful for debugging multi-threaded applications
kernel.core_uses_pid = 1
# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1
# Controls the maximum size of a message, in bytes
kernel.msgmnb = 65536
# Controls the default maxmimum size of a mesage queue
kernel.msgmax = 65536
# Controls the maximum shared segment size, in bytes
kernel.shmmax = 68719476736
# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 4294967296
#add
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
"/etc/sysctl.conf" 52L, 1241C written
[root@rac1 ~]# /sbin/sysctl –p 使刚刚修改的参数生效
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
[root@rac1 ~]#
修改SHELL限制
[root@rac1 ~]# vim /etc/security/limits.conf
添加
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
打开[root@rac1 ~]# vim /etc/pam.d/login
添加
session required pam_loginuid.so 有的话就不添加了
打开[root@rac1 ~]# vim /etc/profile
最后添加
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
关闭SELINUX
[root@rac1 ~]# vim /etc/selinux/config
SELINUX=disabled
关闭NTP,即时间同步
[root@rac1 ~]# service ntpd stop
Shutting down ntpd: [FAILED] 这里失败是因为我一开始就没开
[root@rac1 ~]# chkconfig ntpd off
[root@rac1 ~]# mv /etc/ntp.conf /etc/ntp.conf.orig
[root@rac1 ~]# rm /var/run/ntpd.p如果没开,这里也不存在这个文件,没关系
创建用户组和用户
[root@rac1 ~]# groupadd -g 501 oinstall
[root@rac1 ~]# groupadd -g 502 dba
[root@rac1 ~]# groupadd -g 503 oper
[root@rac1 ~]# useradd -u 502 -g oinstall -G dba,oper oracle
[root@rac1 ~]# passwd oracle、
创建安装目录
[root@rac1 ~]# mkdir -p /u01/app/oracle/product/10.2.0/db_1
[root@rac1 ~]# mkdir -p /u01/crs/oracle/product/10.2.0/crs
[root@rac1 ~]# chown -R oracle:oinstall /u01/app/oracle
[root@rac1 ~]# chmod -R 755 /u01/app/oracle
[root@rac1 ~]# chown -R oracle:oinstall /u01/crs/oracle
[root@rac1 ~]# chmod -R 755 /u01/crs/oracle
配置环境变量
[oracle@rac1 ~]$ more .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
TMP=/tmp; export TMP
TMPDIR=$TMP;export TMPDIR
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORA_CRS_HOME=/u01/crs/oracle/product/10.2.0/crs; export ORA_CRS_HOME
ORACLE_SID=RAC1; export ORACLE_SID
到这里就创建和配置完成
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29598413/viewspace-1171876/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29598413/viewspace-1171876/