刚开始使用ORACLE linux 6.2,后来发现这套linux对显示卡和磁盘阵列的驱动都不到位,运行起来诸多麻烦。测试到了建立数据库的那一步,还是决定弃用oracle linux6.2,重新安装redhat linux6.2,安装完成后,显示卡驱动,磁盘驱动速度有很大的提升。
然后安装了REDHAT 6.2,效果是比oracle linux6.2要快一点,但还是有问题,就是oracle不再提供asmlib for linux 6,只能通过udev的方式来访问存储,这个问题就需要慢慢去研究,同时在测试环境里进行着测试.但考虑到生产环境需求比较紧急,所以还是采用redhat 5.6 来支撑生产环境的rac.
[@more@]
在www.redhat.com网站上注册一个用户,然后下载redhat linux 5.6的安装介质。
将安装介质刻录到光盘上,然后设置pc server的bios,使得可以从光盘启动。重新启动pc服务器,进行redhat linux 5.6的安装。
关于redhat linux的安装,这里就不详细描述。
配置网络的时候,主要两台计算机需要对。例如rac1主机的eth0是public的,则rac2
的eth0一定也是public。例如下面的例子
[root@rac1 ~]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1C:C4:DD:EC:5C
inet addr:10.20.30.40 Bcast:10.20.30.255 Mask:255.255.255.0
。。。。。。
eth1 Link encap:Ethernet HWaddr 00:1C:C4:DD:EC:5A
inet addr:10.90.12.231 Bcast:10.90.12.255 Mask:255.255.255.0
。。。。。。
[root@rac2 ~]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1C:C4:DF:0C:30
inet addr:10.20.30.42 Bcast:10.20.30.255 Mask:255.255.255.0
。。。。。。
eth1 Link encap:Ethernet HWaddr 00:1C:C4:DF:0C:2E
inet addr:10.90.12.232 Bcast:10.90.12.255 Mask:255.255.255.0
。。。。。。
10.20.30.* 是private ip,在eth0上
10.90.12.* 是public ip,在eth1上。
节点1:
#hostname dnlgl1
Dnlgl1#more /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=dnlgl1
节点2:
#hostname dnlgl2
Dnlgl1#more /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=dnlgl2
Two_nodes# more /etc/hosts
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
10.90.12.231 dnlgl1
10.90.12.232 dnlgl1-vip
172.10.10.1 dnlgl1-priv
10.90.12.233 dnlgl2
10.90.12.234 dnlgl2-vip
172.10.10.2 dnlgl2-priv
10.90.12.235 scan_vip
#more /etc/resolv.conf
nameserver 10.90.20.50
编辑/etc/xinetd.d/telnet,修改文件中的disable=yes为disable=no,允许telnet服务。修改后的文件内容如下:
#more /etc/xinetd.d/telnet
# default: on
# description: The telnet server serves telnet sessions; it uses
# unencrypted username/password pairs for authentication.
service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
disable = no
}
注释掉 /etc/pam.d/login文件的’auth{user_...pam_securetty.so’那一行。注释后的内容如下:
#more /etc/pam.d/login
#%PAM-1.0
#auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
auth include system-auth
。。。。。。
编辑/etc/securetty,增加pts/1…..,修改完成后的内容如下:
[root@rac1 ~]# more /etc/securetty
。。。。。。
tty10
tty11
pts/0
pts/1
pts/2
pts/3
pts/4
pts/5
pts/6
pts/7
pts/8
pts/9
pts/10
pts/11
pts/12
#service xinetd restart
使用cecurecrt工具,进行远程telnet,成功。
修改/etc/selinux/config文件中的SELINUNX=disabled,然后重新启动.
如果不想重新启动,则执行setenforce 0
Setenforce 1设置SELinux为enforcing模式
Setenforce 0设置SELinux为permissive模式
检查selinux的状态
#sestatus –v
SELinux status: disabled
在图形管理界面,关闭防火墙。
配置ntp客户端
Vi /etc/ntp.conf
server 10.150.192.1
restrict 10.150.192.1 mask 255.255.255.255 nomodify notrap noquery
server 10.150.192.2
restrict 10.150.192.2 mask 255.255.255.255 nomodify notrap noquery
启动ntpd服务
Service ntpd start
Chkconfig ntpd on
[root@rac1 setup]# ntpstat
synchronised to local net at stratum 11
time correct to within 11 ms
polling server every 1024 s
[root@rac1 setup]# date
Wed Aug 1 15:28:03 CST 2012
[root@rac1 setup]# service ntpd stop
Shutting down ntpd: [ OK ]
[root@rac1 setup]# ntpdate 10.150.192.2 使用ntpdate更新时间时,需要先停止ntpd服务
1 Aug 15:25:08 ntpdate[4786]: step time server 10.150.192.2 offset -193.859194 sec
[root@rac1 setup]# date
Wed Aug 1 15:25:10 CST 2012
重新启动ntpd服务,否则,后面grid安装的时候将会报错。重新ntpd的命令如下:
#service ntpd start
[root@rac1 rules.d]# vi /etc/sysconfig/ntpd
# Drop root to id 'ntp:ntp' by default.
OPTIONS="-u ntp:ntp -p /var/run/ntpd.pid -g -x"
到这里redhat linux 5.6的操作系统的基本配置完成。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/32980/viewspace-1059547/ ,如需转载,请注明出处,否则将追究法律责任。