搜索
首页数据库mysql教程在 OEL5 x86_64 上安装 Oracle 10g R2 RAC

Oracle 10g R2 RAC Install On OEL5 x86_64

1.安装操作系统需求包
binutils-2.17.50.0.6-2 (x86_64)
compat-db-4.2.52-5.1 (x86_64)
compat-libstdc++-296-2.96-138 (i386)
compat-libstdc++-33-3.2.3-61(x86_64)
compat-libstdc++-33-3.2.3-61 (i386)
control-center-2.16.0-14 (x86_64)
gcc-4.1.1-52 (x86_64)
gcc-c++-4.1.1-52 (x86_64)
glibc-2.5-12 (x86_64)
glibc-2.5-12 (i686)
glibc-common-2.5-12 (x86_64)
glibc-devel-2.5-12 (x86_64)
glibc-devel-2.5-12 (i386)
glibc-headers-2.5-12 (x86_64)
ksh-20060214-1.4 (x86_64)
libaio-0.3.106-3.2 (x86_64)
libgcc-4.1.1-52 (i386)
libgcc-4.1.1-52 (x86_64)
libgnome-2.16.0-6 (x86_64)
libgnomeui-2.16.0-5 (x86_64)
libgomp-4.1.1-52 (x86_64)
libstdc++-4.1.1-52 (x86_64)
libstdc++-devel-4.1.1-52 (x86_64)
libXp-1.0.0-8 (i386)
libXtst-1.0.1-3.1(i386)
make-3.81-1.1 (x86_64)
sysstat-7.0.0-3 (x86_64)

注:rpm -qa|grep XXX
    rpm -Uvh XXX

2.停不必要的服务[RHEL5U1]
chkconfig acpid           off
chkconfig anacron         off
chkconfig apmd            off
chkconfig auditd          off
chkconfig autofs          off
chkconfig avahi-daemon    off
chkconfig bluetooth       off
chkconfig cpuspeed        off
chkconfig cups            off
chkconfig firstboot       off
chkconfig gpm             off
chkconfig haldaemon       off
chkconfig hidd            off
chkconfig ip6tables       off
chkconfig iptables        off
chkconfig irqbalance      off
chkconfig isdn            off
chkconfig mcstrans        off
chkconfig mdmonitor       off
chkconfig microcode_ctl   off
chkconfig netfs           off
chkconfig pcscd           off
chkconfig readahead_early off
chkconfig restorecond     off
chkconfig rhnsd           off
chkconfig rpcgssd         off
chkconfig rpcidmapd       off
chkconfig sendmail        off
chkconfig setroubleshoot  off
chkconfig smartd          off
chkconfig xfs             off
chkconfig yum-updatesd    off

3.修改系统配置参数/etc/sysctl.conf
echo "kernel.shmall = 2097152">>/etc/sysctl.conf
echo "kernel.shmmax = 4294967295">>/etc/sysctl.conf
echo "kernel.shmmni = 4096">>/etc/sysctl.conf
echo "kernel.sem = 250 32000 100 128">>/etc/sysctl.conf
echo "net.ipv4.ip_local_port_range = 9000 65500">>/etc/sysctl.conf
echo "net.core.rmem_default = 262144">>/etc/sysctl.conf
echo "net.core.rmem_max = 2097152">>/etc/sysctl.conf
echo "net.core.wmem_default = 262144">>/etc/sysctl.conf
echo "net.core.wmem_max = 1048576">>/etc/sysctl.conf
echo "fs.file-max = 262144">>/etc/sysctl.conf

让参数生效
sysctl -p

注:
shmall 是全部允许使用的共享内存大小,shmmax 是单个段允许使用的大小。这两个可以设置为内存的 90%。
例如 16G 内存,16*1024*1024*1024*90% = 15461882265,shmall 的大小为 15461882265/4k(getconf PAGESIZE可得到) = 3774873。

5.创建Oracle用户和组
groupadd -g 600 oinstall
groupadd -g 601 dba
groupadd -g 602 oper
useradd -u 600 -g oinstall -G dba,oper oracle -d /home/oracle
passwd oracle

6.创建ORACLE安装目录变更属主
mkdir -p /oracle/product/10.2.0/crs
mkdir -p /oracle/product/10.2.0/db
chown -R oracle:oinstall /oracle

7.修改ORACLE用户默认限制
echo "oracle           soft    nproc   2047">>/etc/security/limits.conf
echo "oracle           hard    nproc   16384">>/etc/security/limits.conf
echo "oracle           soft    nofile  4096">>/etc/security/limits.conf
echo "oracle           hard    nofile  65536">>/etc/security/limits.conf

echo "session    required     /lib/security/pam_limits.so">>/etc/pam.d/login
echo "session    required     pam_limits.so">>/etc/pam.d/login

echo "if [ $USER = "oracle" ]; then">>/etc/profile
echo "   if [ $SHELL = "/bin/ksh" ]; then">>/etc/profile
echo "      ulimit -p 16384">>/etc/profile
echo "      ulimit -n 65536">>/etc/profile
echo "   else">>/etc/profile
echo "      ulimit -u 16384 -n 65536">>/etc/profile
echo "   fi">>/etc/profile
echo "fi">>/etc/profile

8.配置ORACLE环境变量
1)ORACLE用户.bash_profile
su - oracle
echo "export ORACLE_BASE=/oracle">>~/.bash_profile
echo "export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db">>~/.bash_profile
echo "export ORA_CRS_HOME=$ORACLE_BASE/product/10.2.0/crs">>~/.bash_profile
echo "export ORACLE_SID=racdb1 # The Second Node is Named racdb2">>~/.bash_profile
echo "export PATH=$PATH:$ORA_CRS_HOME/bin:$ORACLE_HOME/bin:$ORACLE_HOME/dcm/bin:$ORACLE_HOME/webcache/bin:$ORACLE_HOME/opmn/bin">>~/.bash_profile
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:/usr/lib:/usr/local/lib">>~/.bash_profile
echo "export TMPDIR=/tmp">>~/.bash_profile
echo "export TMP=/tmp">>~/.bash_profile

2)ROOT用户.bash_profile">>~/.bash_profile
su -
echo "export ORACLE_BASE=/oracle">>~/.bash_profile
echo "export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db">>~/.bash_profile
echo "export ORA_CRS_HOME=$ORACLE_BASE/product/10.2.0/crs">>~/.bash_profile
echo "export PATH=$PATH:$ORA_CRS_HOME/bin">>~/.bash_profile

9.配置/etc/hosts网络文件
cp /etc/hosts /etc/hosts.back
echo "192.168.56.101      rac1">>/etc/hosts
echo "192.168.56.111      rac1-vip">>/etc/hosts
echo "10.10.10.101        rac1-priv">>/etc/hosts
echo "192.168.56.102      rac2">>/etc/hosts
echo "192.168.56.112      rac2-vip">>/etc/hosts
echo "10.10.10.102        rac2-priv">>/etc/hosts

10.节点间建立SSH 用户等效项
1)在各节点创建RAS与DSA密钥
su - oracle
mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa
注:三次回车。
ssh-keygen -t dsa
注:三次回车。

2)在欲进行RAC安装OUI的节点上,添加密钥到授权密钥文件authorized_keys中
$ssh rac1 cat ~/.ssh/id_rsa.pub>>~/.ssh/authorized_keys
$ssh rac1 cat ~/.ssh/id_dsa.pub>>~/.ssh/authorized_keys
$ssh rac2 cat ~/.ssh/id_rsa.pub>>~/.ssh/authorized_keys
$ssh rac2 cat ~/.ssh/id_dsa.pub>>~/.ssh/authorized_keys
$chmod 600 ~/.ssh/authorized_keys

3)拷贝副本到其它节点对应目录下并授权
节点一:
$scp ~/.ssh/authorized_keys rac2:/home/oracle/.ssh/
节点二:
$chmod 600 ~/.ssh/authorized_keys

4)在OUI节点上测试SSH等效性
$ssh rac1 hostname
$ssh rac2 hostname
注:如果无需输入密码就出现主机名,说明SSH配置成功。


11.配置hangcheck timer内核模块
echo "options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180">>/etc/modprobe.conf
echo "modprobe hangcheck_timer">>/etc/rc.d/rc.local

12.配置两节点LINUX操作系统时间同步
1)在节点一进行如下操作
cp /etc/ntp.conf /etc/ntp.conf.back
echo "restrict 10.1.120.0 mask 255.255.255.0 nomodify notrap">>/etc/ntp.conf
service ntpd start

2)在节点二进行如下操作
#crontab -e
1-59 * * * * ntpdate 10.1.120.201


13.在其中一个节点配置集群注册表OCR、表决磁盘voting共享LV
1)创建一个分区
fdisk /dev/sdd
n
p
t
8e
w

2)创建一个pv
pvcreate  /dev/sdd1
pvscan

3)创建一个vg
vgcreate crsvg /dev/sdd1
vgscan
注:vgcreate datavg /dev/sdc1 /dev/sdd1 /dev/sde1

4)创建db所需的lv
lvcreate -L 300M -n lvocr1 crsvg
lvcreate -L 300M -n lvocr2 crsvg
lvcreate -L 120M -n lvvoting1 crsvg
lvcreate -L 120M -n lvvoting2 crsvg
lvcreate -L 120M -n lvvoting3 crsvg
lvcreate -L 20M -n  lvasmpwd crsvg
lvscan

5)重启所有节点,加载共享磁盘信息
#reboot
6)配置lv关联至raw
cp /etc/sysconfig/rawdevices /etc/sysconfig/rawdevices.back
echo "/dev/raw/raw1  /dev/crsvg/lvocr1">>/etc/sysconfig/rawdevices
echo "/dev/raw/raw2  /dev/crsvg/lvocr2">>/etc/sysconfig/rawdevices
echo "/dev/raw/raw3  /dev/crsvg/lvvoting1">>/etc/sysconfig/rawdevices
echo "/dev/raw/raw4  /dev/crsvg/lvvoting2">>/etc/sysconfig/rawdevices
echo "/dev/raw/raw5  /dev/crsvg/lvvoting3">>/etc/sysconfig/rawdevices
echo "/dev/raw/raw6  /dev/crsvg/lvasmpwd">>/etc/sysconfig/rawdevices
/sbin/service rawdevices restart

7)配置raw属主
cp /etc/rc.local /etc/rc.local.back
echo "chown oracle:dba /dev/raw/raw[0-9]">>/etc/rc.local
echo "chmod 660 /dev/raw/raw[0-9]">>/etc/rc.local

dd if=/dev/zero of=/dev/raw/raw1 bs=8192k count=3000
dd if=/dev/zero of=/dev/raw/raw2 bs=8192k count=3000
dd if=/dev/zero of=/dev/raw/raw3 bs=8192k count=1200
dd if=/dev/zero of=/dev/raw/raw4 bs=8192k count=1200
dd if=/dev/zero of=/dev/raw/raw5 bs=8192k count=1200
dd if=/dev/zero of=/dev/raw/raw6 bs=8192k count=200

8)查看相前raw的信息
raw -qa

9)重启所有节点,加载raw映射信息
#reboot

14.主节点安装开始
$export LANG=en_US
$export DISPLAY=192.168.108.1:0.0 --本机IP地址,将图形界面引到本机
$ ./runInstaller -ignoreSysPrereqs

15.BUG
1)在最后的节点运行root.sh脚本时报如下错误——
Oracle CRS stack installed and running under init(1M)
Running vipca(silent) for configuring nodeapps
/home/oracle/crs/oracle/product/10/crs/jdk/jre//bin/java: error while loading
shared libraries: libpthread.so.0: cannot open shared object file:
No such file or directory

解决办法:
在安装最后,,运行root.sh脚本之前,修改下列文件
/bin/vipca
/bin/srvctl
/bin/srvctl
/bin/srvctl
中的内容
***VIPCA*********************************************************************
if [ "$arch" = "i686" -o "$arch" = "ia64" -o "$arch" = "x86_64" ]
then
  LD_ASSUME_KERNEL=2.4.19
  export LD_ASSUME_KERNEL
fi
#增加如下内容
unset LD_ASSUME_KERNEL         *****************************************************************************
***SRVCTL********************************************************************
LD_ASSUME_KERNEL=2.4.19
export LD_ASSUME_KERNEL
#增加如下内容
unset LD_ASSUME_KERNEL          *****************************************************************************
修改完成后,在二节点上手动运行./vipca,配置完成后关闭图形界面。

2)在最后节点运行vipca时,报如下错误——
Error 0(Native: listNetInterfaces:[3])
[Error 0(Native: listNetInterfaces:[3])]

解决办法:
/bin # ./oifcfg setif -global eth0/192.168.56.0:public
/bin # ./oifcfg setif -global eth1/172.10.10.0:cluster_interconnect

/bin # ./oifcfg getif
 eth0 192.168.56.0 global public
 eth1 172.10.10.0 global cluster_interconnect

/bin # ./oifcfg iflist
eth0 192.168.56.0
eth1 172.10.10.0

15.禁止/启用 CRS跟随操作系统自动启动
/etc/init.d/init.crs disable
/etc/init.d/init.crs enable

注:启动CRS crsctl start crs
    亦可以——
        /etc/init.d/init.cssd start
        /etc/init.d/init.crs start

在 OEL5 x86_64 上安装 Oracle 10g R2 RAC

声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
如何向新的MySQL用户授予权限如何向新的MySQL用户授予权限May 09, 2025 am 12:16 AM

TograntpermissionstonewMySQLusers,followthesesteps:1)AccessMySQLasauserwithsufficientprivileges,2)CreateanewuserwiththeCREATEUSERcommand,3)UsetheGRANTcommandtospecifypermissionslikeSELECT,INSERT,UPDATE,orALLPRIVILEGESonspecificdatabasesortables,and4)

如何在MySQL中添加用户:逐步指南如何在MySQL中添加用户:逐步指南May 09, 2025 am 12:14 AM

toadduserInmysqleffectection andsecrely,theTheSepsps:1)USEtheCreateuserStattoDaneWuser,指定thehostandastrongpassword.2)GrantNectalRevileSaryPrivilegesSustate,usiveleanttatement,AdheringTotheTeprinciplelastPrevilegege.3)

mysql:添加具有复杂权限的新用户mysql:添加具有复杂权限的新用户May 09, 2025 am 12:09 AM

toaddanewuserwithcomplexpermissionsinmysql,loldtheSesteps:1)创建eTheEserWithCreateuser'newuser'newuser'@''localhost'Indedify'pa ssword';。2)GrantreadAccesstoalltablesin'mydatabase'withGrantSelectOnMyDatabase.to'newuser'@'localhost';。3)GrantWriteAccessto'

mysql:字符串数据类型和coltrationsmysql:字符串数据类型和coltrationsMay 09, 2025 am 12:08 AM

MySQL中的字符串数据类型包括CHAR、VARCHAR、BINARY、VARBINARY、BLOB、TEXT,排序规则(Collations)决定了字符串的比较和排序方式。1.CHAR适合固定长度字符串,VARCHAR适合可变长度字符串。2.BINARY和VARBINARY用于二进制数据,BLOB和TEXT用于大对象数据。3.排序规则如utf8mb4_unicode_ci忽略大小写,适合用户名;utf8mb4_bin区分大小写,适合需要精确比较的字段。

MySQL:我应该在Varchars上使用什么长度?MySQL:我应该在Varchars上使用什么长度?May 09, 2025 am 12:06 AM

最佳的MySQLVARCHAR列长度选择应基于数据分析、考虑未来增长、评估性能影响及字符集需求。1)分析数据以确定典型长度;2)预留未来扩展空间;3)注意大长度对性能的影响;4)考虑字符集对存储的影响。通过这些步骤,可以优化数据库的效率和扩展性。

mysql blob:有什么限制吗?mysql blob:有什么限制吗?May 08, 2025 am 12:22 AM

mysqlblobshavelimits:tinyblob(255bytes),blob(65,535 bytes),中间布洛布(16,777,215个比例),andlongblob(4,294,967,967,295 bytes).tousebl观察性:1)考虑performance impactsandSandStorelargeblobsextern; 2)管理backbackupsandreplication carecration; 3)usepathsinst

MySQL:自动化用户创建的最佳工具是什么?MySQL:自动化用户创建的最佳工具是什么?May 08, 2025 am 12:22 AM

自动化在MySQL中创建用户的最佳工具和技术包括:1.MySQLWorkbench,适用于小型到中型环境,易于使用但资源消耗大;2.Ansible,适用于多服务器环境,简单但学习曲线陡峭;3.自定义Python脚本,灵活但需确保脚本安全性;4.Puppet和Chef,适用于大规模环境,复杂但可扩展。选择时需考虑规模、学习曲线和集成需求。

mysql:我可以在斑点内搜索吗?mysql:我可以在斑点内搜索吗?May 08, 2025 am 12:20 AM

是的,YouCansearchInIdeAblobInMysqlusingsPecificteChniques.1)转换theblobtoautf-8StringWithConvertFunctionWithConvertFunctionandSearchusiseLike.2)forCompresseBlyblobs,useuncompresseblobs,useuncompressbeforeconversion.3)acpperformance impperformance imperformance imptactsanddataEccoding.4)

See all articles

热AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover

AI Clothes Remover

用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool

Undress AI Tool

免费脱衣服图片

Clothoff.io

Clothoff.io

AI脱衣机

Video Face Swap

Video Face Swap

使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热工具

Atom编辑器mac版下载

Atom编辑器mac版下载

最流行的的开源编辑器

SublimeText3 英文版

SublimeText3 英文版

推荐:为Win版本,支持代码提示!

适用于 Eclipse 的 SAP NetWeaver 服务器适配器

适用于 Eclipse 的 SAP NetWeaver 服务器适配器

将Eclipse与SAP NetWeaver应用服务器集成。

PhpStorm Mac 版本

PhpStorm Mac 版本

最新(2018.2.1 )专业的PHP集成开发工具

MinGW - 适用于 Windows 的极简 GNU

MinGW - 适用于 Windows 的极简 GNU

这个项目正在迁移到osdn.net/projects/mingw的过程中,你可以继续在那里关注我们。MinGW:GNU编译器集合(GCC)的本地Windows移植版本,可自由分发的导入库和用于构建本地Windows应用程序的头文件;包括对MSVC运行时的扩展,以支持C99功能。MinGW的所有软件都可以在64位Windows平台上运行。