oracle 10g rac 安装图解
规划:所用linux系统以虚拟化方式安装在esx上,配置有内网的yum源,各分配有16G存储,下面为简单拓扑图
一,下载软件 1,地址:
http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201linx8664soft.html
10201_database_linux_x86_64.cpio.gz 10201_clusterware_linux_x86_64.cpio.gz
2,地址:http://www.oracle.com/technology/software/tech/linux/asmlib/rhel5.html oracleasm-2.6.18-164.el5-2.0.5-1.el5.x86_64.rpm oracleasmlib-2.0.4-1.el5.x86_64.rpm oracleasm-support-2.1.3-1.el5.x86_64.rpm 二,安装环境
1,系统:centos 5.4 x86_64 2,外部存储:linux下的iscsi 3, iscsi服务器配置
#下载iSCSI Enterprise Target
wget
http://nchc.dl.sourceforge.net/sourceforge/iscsitarget/iscsitarget-0.4.17.tar.gz #解压缩
tar -zxvf iscsitarget-0.4.17.tar.gz cd iscsitarget-0.4.17 #编译、安装
make make install #配置服务
chkconfig --level 2345 iscsi-target on service iscsi-target start
#配置第一个iSCSI设备 #在/opt/下生成64G大的空洞设备文件 #请将opt修改为实际的目录,并根据实际情况设置设备文件大小
#生成空洞文件速度很快的,且在真正使用之前不占用磁盘实际空间
dd if=/dev/zero of=/opt/iscsi.[配置文件中Target的名称].img bs=1G count=64 seek=64
#cout是从什么开始,一般设置为0 #生成256G的例子 dd if=/dev/zero
of=/opt/iscsi/iqn.2009-04.com.haoyuan-inc:storage.disk.oracle.01.img bs=1G count=0 seek=256 vim /etc/ietd.conf #编辑Target名称, 例如:iqn.2009-04.com.haoyuan-inc:storage.disk.share.01 #编辑LUN段内容,
例如:Lun 0 Path=/opt/iscsi.iqn.2009-04.com.haoyuan-inc:storage.disk.share.01.image,Type=fileio
#不要设置XXXUser,允许任何人访问 #重启iscsi-target
service iscsi-target restart
三,安装准备 1,检查必须软件
yum install jdk binutils elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc gcc-c++ libaio libaio-devel libgcc
libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel libXp libXp-devel
#其中jdk是我在yum服务器中添加的
2,修改内核参数 编辑/etc/sysctl.conf
kernel.shmall = 2097152 kernel.shmmax = 2147483648 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 = 262144 net.core.rmem_max = 262144 net.core.wmem_default = 262144 net.core.wmem_max = 262144 #生效
/sbin/sysctl -p
3,修改系统shell限制
vi /etc/security/limits.conf oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536
4,配置 Hangcheck 计时器所有 RHEL 版本: cat >> /etc/rc.d/rc.local <
/sbin/insmod hangcheck-timer hangcheck_tick=30 hangcheck_margin=180
EOF
5,添加相应用户和组
/usr/sbin/groupadd oinstall /usr/sbin/groupadd dba
/usr/sbin/useradd -m -g oinstall -G dba oracle passwd oracle
6,配置网络
每个机器需要两块网卡,一个设置为公共IP,一个设置为私有IP,另外另需配置一虚拟IP, 虚拟IP不用手工添加到系统,只需预先定义好,一般是和公共IP在同一子网。
cat /etc/hosts
# Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 HY_472 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6 # public address 10.0.40.11 rac1 10.0.40.12 rac2 # private address
10.0.10.11 rac1-priv 10.0.10.12 rac2-priv # virtual address 10.0.40.111 rac1-vip 10.0.40.112 rac2-vip
7,配置ssh rac1
su oracle
$mkdir ~/.ssh $chmod 755 ~/.ssh
$/usr/bin/ssh-keygen -t rsa $/usr/bin/ssh-keygen -t dsa
rac2
su oracle $mkdir ~/.ssh
$chmod 755 ~/.ssh
$/usr/bin/ssh-keygen -t rsa $/usr/bin/ssh-keygen -t dsa
rac1
$cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys $cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
$ssh oracle@rac2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys $ssh oracle@rac2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys $chmod 644 ~/.ssh/authorized_keys rac2
$cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys $cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
$ssh oracle@rac1 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys $ssh oracle@rac1 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys $chmod 644 ~/.ssh/authorized_keys #建立等效性 rac1,rac2
$ssh rac1 $ssh rac1-priv $ssh rac2 $ssh rac2-priv
8,配置时间同步 rac1、rac2 #vi /etc/crontab
17 18 * * * /usr/sbin/ntpdate repo.haoyuan-inc.com > /dev/null 9,修改系统版本 rac1,rac2
vi /etc/redhat-release #将CentOS release 5 (Final) 修改成redhat 4
四、配置ASM