RAC Install for Linux As 5

本文提供了一个详细的RAC安装步骤指南,包括磁盘分区、用户组配置、操作系统参数调整、SSH配置、集群软件安装等关键环节,并针对安装过程中可能出现的问题提供了相应的解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

RAC安装:
1.检查双机中可用的磁盘和盘符:

#fdisk -l

以下是本机中可以使用的磁盘
Disk /dev/sdd: 6442 MB, 6442450944 bytes
Disk /dev/sde: 536.8 GB, 536870912000 bytes
Disk /dev/sdg: 536.8 GB, 536870912000 bytes
Disk /dev/sdh: 536.8 GB, 536870912000 bytes
Disk /dev/sdi: 536.8 GB, 536870912000 bytes

2.准备磁盘

我们对/dev/sdd 的6G磁盘进行划分,划分成出2块256M的磁盘作为votedisk和ocr盘
一次输入下列命令:
操作如下:
[root@nccpxdb3 ~]# fdisk /dev/sdd
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1019, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-1019, default 1019): +256M

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (43-1019, default 43):
Using default value 43
Last cylinder or +size or +sizeM or +sizeK (43-1019, default 1019): +256M

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@nccpxdb3 ~]# fdisk -l /dev/sdd

Disk /dev/sdd: 6442 MB, 6442450944 bytes
199 heads, 62 sectors/track, 1019 cylinders
Units = cylinders of 12338 * 512 = 6317056 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1          42      259067   83  Linux
/dev/sdd2              43          84      259098   83  Linux

把划分好的磁盘和剩余的磁盘绑定成raw设备
raw /dev/raw/raw1 /dev/sdd1
raw /dev/raw/raw2 /dev/sdd2
raw /dev/raw/raw3 /dev/sde
raw /dev/raw/raw4 /dev/sdg
raw /dev/raw/raw5 /dev/sdh
raw /dev/raw/raw6 /dev/sdi

登陆到另外一个重复执行raw的绑定操作

执行:partprobe (信息同步)

raw /dev/raw/raw1 /dev/sdd1
raw /dev/raw/raw2 /dev/sdd2
raw /dev/raw/raw3 /dev/sde
raw /dev/raw/raw4 /dev/sdg
raw /dev/raw/raw5 /dev/sdh
raw /dev/raw/raw6 /dev/sdi

4.创建Oracle的安装用户和组

groupadd -g 600 dba
useradd -u 601 -g 600 oracle
登陆另外一个节点重复4的操作:
groupadd -g 600 dba
useradd -u 601 -g 600 oracle


5.设置raw设备的属主
编辑:/etc/udev/rules.d/60-raw.rules
###config raw after reboot
ACTION=="add", KERNEL=="sdd1", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sdd2", RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", KERNEL=="sde", RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION=="add", KERNEL=="sdg", RUN+="/bin/raw /dev/raw/raw4 %N"
ACTION=="add", KERNEL=="sdh", RUN+="/bin/raw /dev/raw/raw5 %N"
ACTION=="add", KERNEL=="sdi", RUN+="/bin/raw /dev/raw/raw6 %N"

###config owner and group after reboot
ACTION=="add", KERNEL=="raw1", WNER=="oracle", GROUP=="dba", MODE=="0660"
ACTION=="add", KERNEL=="raw2", WNER=="oracle", GROUP=="dba", MODE=="0660"
ACTION=="add", KERNEL=="raw3", WNER=="oracle", GROUP=="dba", MODE=="0660"
ACTION=="add", KERNEL=="raw4", WNER=="oracle", GROUP=="dba", MODE=="0660"
ACTION=="add", KERNEL=="raw5", WNER=="oracle", GROUP=="dba", MODE=="0660"
ACTION=="add", KERNEL=="raw6", WNER=="oracle", GROUP=="dba", MODE=="0660"

配置好后执行:
/sbin/start_udev
检查属主和权限是否正确
crw-rw----  1 oracle dba  162, 1 Dec 24 10:51 raw1
crw-rw----  1 oracle dba  162, 2 Dec 24 10:51 raw2
crw-rw----  1 oracle dba  162, 3 Dec 24 10:51 raw3
crw-rw----  1 oracle dba  162, 4 Dec 24 10:51 raw4
crw-rw----  1 oracle dba  162, 5 Dec 24 10:51 raw5
crw-rw----  1 oracle dba  162, 6 Dec 24 10:51 raw6
另外一个节点重复5里的操作


6.配置操作系统的参数:
vi /etc/sysctl.conf   添加
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

执行
sysctl -p

vi /etc/security/limits.conf 添加
oracle              soft    nproc   2047
oracle               hard    nproc   16384
oracle               soft    nofile  1024
oracle               hard    nofile  65536

vi /etc/pam.d/login 添加
session    required     /lib/security/pam_limits.so

禁用iptables
屏蔽下边文件里的内容

/etc/pam.d/other ;
执行:
service iptables stop
chkconfig iptables off

登陆另外一个节点重复6的操作


7.准备好你要用的vip(一对) 配置hosts文件(注意这个ip地址目前在主机上不能生效!)

# 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.128.164   nccpxdb3
192.168.128.165   nccpxdb4
### Virtual ip  ####
192.168.128.168   nccpxdb3-vip
192.168.128.169   nccpxdb4-vip                        
#### private ip ####
192.168.1.3       nccpxdb3-priv
192.168.1.4       nccpxdb4-priv 

测试一下:

ping nccpxdb3-priv
ping nccpxdb4-priv
ping nccpxdb3
ping nccpxdb4

确保以上地址pingable

登陆另外一个节点重复7的操作

8.配置ssh
8.1
login as oracle
8.2
mkdir ~/.ssh
chmod 700 ~/.ssh

8.3
/usr/bin/ssh-keygen -t rsa
回车默认就可以了
8.4
/usr/bin/ssh-keygen -t dsa
回车默认就可以了
8.6
touch ~/.ssh/authorized_keys
登录另外一个节点重复8.1--8.6的操作
8.7
cd ~/.ssh/
ssh nccpxdb3 cat /home/oracle/.ssh/id_rsa.pub >> authorized_keys

ssh nccpxdb3 cat /home/oracle/.ssh/id_dsa.pub >> authorized_keys
ssh nccpxdb4 cat /home/oracle/.ssh/id_rsa.pub >> authorized_keys

ssh nccpxdb4 cat /home/oracle/.ssh/id_dsa.pub >> authorized_keys

登录另外一个节点重复8.7的操作


8.8
scp authorized_keys nccpxdb4:/home/oracle/.ssh/
8.9
登录另外一个节点
scp authorized_keys nccpxdb3:/home/oracle/.ssh/
8.10
chmod 600 ~/.ssh/authorized_keys
登录另外一个节点
chmod 600 ~/.ssh/authorized_keys


9.enable ssh on
/usr/bin/ssh-agent $SHELL
/usr/bin/ssh-add


10.测试ssh是否生效

ssh nccpxdb3 date
ssh nccpxdb4 date
登录另外一个节点重复10里的操作

11.创建目录,配置环境变量
mkdir - p /u01/app/oracle/product/10.2.0/
mkdir - p /u01/app/oracle/product/10.2.0/crs
mkdir - p /u01/app/oracle/product/10.2.0/db_1


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

#####ORACLE ENV

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORA_CRS_HOME=$ORACLE_BASE/product/10.2.0/crs
export ORACLE_TERM=xterm
export ORACLE_SID=icpdb1
export NLS_LANG="AMERICAN_AMERICA.ZHS16GBK"
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_ASM_HOME=$ORACLE_BASE/product/10.2.0/asm
export PATH=$PATH:$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:$ORA_ASM_HOME/bin

12.打开linux5的图形界面和ftp

12.1
vi /etc/rc.d/rc.local
添加 service vsftpd start


For XDMCP connection to Red Hat 5 EL
12.2 XDM Configuration
1. Change runlevel to 5
Open/etc/inittab and set the initial runlevel to 5 as following:
id:5:initdefault:

12.3 Enable XDMCP

For GDM:

Open /etc/gdm/custom.conf and set the Enable entry to 1 in the [xdmcp] section as following.
[xdmcp]
Enable=1

For KDM:

Open /usr/share/config/kdm/Xaccess and remove the initial "#" character for the following line:
#* #any host can get a login window ==>
* #any host can get a login window
Open /usr/share/config/kdm/kdmrc and set the Enable entry to true in the [xdmcp] section as following.
[Xdmcp]
Enable=true

12.4. Firewall (TCP/UDP Ports) Configuration
Open UDP port 177 from the PC to the remote host direction.
Open incoming TCP ports 6000~6010 from the remote host to your PC.
12.5. Reboot the remote host and start Xmanager


13.开始安装吧,使用xmanager登录节点1(注意我们的安装操作在节点1上进行)
  
13.1
/home/oracle/media/crs/clusterware/rootpre/rootpre.sh
13.2
./runInstaller

y

next

next
 确认:
 name:OraCrs10g_home
 path:/u01/app/oracle/product/10.2.0/crs
 选择language
 zh ,en
next

next

add
 nccpxdb4
 nccpxdb4-priv
 nccpxdb4-vip
next

edit
 eth0   public
 eth1   private
 eth2   not user

next

choose
 external redundancy
 ocr:/dev/raw/raw1

next
 external redundancy
 votedisk /dev/raw/raw2
 
next

install
 
  
**************************************************************************************
这里可能会出现一个错:
INFO: Exclude file list /tmp/OraInstall2009-12-24_12-17-52PM/installExcludeFile.lst does not exist or is empty. The file is ignored.
WARNING: Error while copying directory /u01/app/oracle/product/10.2.0/crs with exclude file list 'null' to nodes 'nccpxdb4'. [PRKC-1002 : All the submitted commands did not execute successfully]
原因:
2个操作系统的时间不一致导致
解决办法:
1.可以忽略继续
2.配置ntp或者手工修改一下时间 date -s 12/24/2009  date -s 00:00:00

**************************************************************************************
修改:

on nccpxdb3上:
execute :
/u01/app/oracle/oraInventory/orainstRoot.sh
/u01/app/oracle/product/10.2.0/crs/root.sh

Before execute root.sh on nccpxdb4 modify
1./u01/app/oracle/product/10.2.0/crs/bin/vipca
把这几行屏蔽如下:
       #if [ "$arch" = "i686" -o "$arch" = "ia64" -o "$arch" = "x86_64" ]
       # then
       #     LD_ASSUME_KERNEL=2.4.19
       #    export LD_ASSUME_KERNEL
       #  fi
       #End workaround
2./u01/app/oracle/product/10.2.0/crs/bin/srvctl

#Remove this workaround when the bug 3937317 is fixed
#LD_ASSUME_KERNEL=2.4.19
#export LD_ASSUME_KERNEL


execute on nccpxdb4:
/u01/app/oracle/oraInventory/orainstRoot.sh
/u01/app/oracle/product/10.2.0/crs/root.sh

**************************************************************************************
这里可能会出现错:
Error 0(Native: listNetInterfaces:[3])
  [Error 0(Native: listNetInterfaces:[3])]
原因:
主机上有3块网卡,有一块crs识别不出来的
 
解决办法:
[root@node2 bin]# ./oifcfg iflist

eth1  10.10.17.0

virbr0  192.168.122.0

eth0  192.168.100.0

[root@node2 bin]# ./oifcfg setif -global eth0/192.168.128.0:public

[root@node2 bin]# ./oifcfg setif -global eth1/192.168.1.0:cluster_interconnect

[root@node2 bin]# ./oifcfg getif
eth0  192.168.128.0  global  public
eth1  192.168.1.0  global  cluster_interconnect

**************************************************************************************

回到图形界面点
 ok
**************************************************************************************

这里Oracle Cluster Uitlity 会报错,我们不理会他,这个是Oracle的bug 
**************************************************************************************
next

finish


14.配置vip
使用root用户

进入目录:/u01/app/oracle/product/10.2.0/crs/bin
1./u01/app/oracle/product/10.2.0/crs/bin/vipca
把这几行屏蔽如下:
       #if [ "$arch" = "i686" -o "$arch" = "ia64" -o "$arch" = "x86_64" ]
       # then
       #     LD_ASSUME_KERNEL=2.4.19
       #    export LD_ASSUME_KERNEL
       #  fi
       #End workaround
2./u01/app/oracle/product/10.2.0/crs/bin/srvctl

#Remove this workaround when the bug 3937317 is fixed
#LD_ASSUME_KERNEL=2.4.19
#export LD_ASSUME_KERNEL


执行./vipca


next

next

  modify :
    ip alis name: nccpxdb3-vip  ipaddress: 192.168.128.168
      ip alis name: nccpxdb4-vip  ipaddress: 192.168.128.169
     
next

finish

 ok

exit

使用 ifconfig 看看vip 是否生效

ping nccpxdb3-vip
ping nccpxdb4-vip

       
15 打个小的补丁
否则10.2.0.4无法安装,会提示 error in writing ......./rt.jar [invalid distance code] 的错误
补丁编号:4679769 不要照着readme做!!
用root 先备份
cp /u01/app/oracle/product/10.2.0/crs/bin/clsfmt.bin /u01/app/oracle/product/10.2.0/crs/bin/clsfmt.bin.bak
cp .....4679769/clsfmt.bin /u01/app/oracle/product/10.2.0/crs/bin/
chown oracle:dba /u01/app/oracle/product/10.2.0/crs/bin/clsfmt.bin
chmod 750 /u01/app/oracle/product/10.2.0/crs/bin/clsfmt.bin

16.打10.2.0.4的 crs补丁

./runInstaller

next
  name:OraCrs10g_home
 path:/u01/app/oracle/product/10.2.0/crs

next

next

next

install

  千万别exit了之,一定别忘记执行下边的内容:时间比较不长,您高低忍一会
 
***************************************************************************************************************
 The installer has detected that your Cluster Ready Services (CRS) installation is distributed across the following nodes:

 nccpxdb3
 nccpxdb4

Because the software consists of local identical copies distributed across each of the nodes in the cluster, it is possible to patch your CRS installation in a rolling manner, one node at a time.

To complete the installation of this patchset, you must perform. the following tasks on each node:

 1. Log in as the root user.
 2. As the root user, perform. the following tasks:

  a. Shutdown the CRS daemons by issuing the following command:
    /u01/app/oracle/product/10.2.0/crs/bin/crsctl stop crs
  b. Run the shell script. located at:
    /u01/app/oracle/product/10.2.0/crs/install/root102.sh
   This script. will automatically start the CRS daemons on the
   patched node upon completion.

 3. After completing this procedure, proceed to the next node and repeat.
***************************************************************************************************************
 
exit

yes


16.安装Oracle介质

./runInstaller

next

 product_language (zh,en)
 choose
  custom
 
next
 name:OraDb10g_home1
 path:/u01/app/oracle/product/10.2.0/db_1
 

next
 select all
next
  choose your compnent
  
next

next

 dba
 dba

next

install database Software Only

next

install

**************************************************************************************
这里可能会出现一个错:
INFO: Exclude file list /tmp/OraInstall2009-12-24_12-17-52PM/installExcludeFile.lst does not exist or is empty. The file is ignored.
WARNING: Error while copying directory /u01/app/oracle/product/10.2.0/crs with exclude file list 'null' to nodes 'nccpxdb4'. [PRKC-1002 : All the submitted commands did not execute successfully]
原因:
2个操作系统的时间不一致导致
解决办法:
1.可以忽略继续
2.配置ntp或者手工修改一下时间 date -s 12/24/2009  date -s 00:00:00

**************************************************************************************

16 安装10.2.0.4的patch
./runInstall

next
 name:OraDB10g_home1
 path:/u01/app/oracle/product/10.2.0/db_1
 
next

next

next

install

两个节点分别执行:
/u01/app/oracle/product/10.2.0/db_1/root.sh

17.配置共用监听
图形启动netca
next

next

next

next


18.配置ASM
dbca

next
 configure automatic storage management
 
next

 select all

next

  password
 
  create initlization parameters file(pfile)
 
next

 ok

create new

change disk discovery path
 /dev/raw/raw*

 Disk Group Nmae :DG1  external
  /dev/raw/raw3
  /dev/raw/raw4
 Disk Group Nmae :DG2 external
  /dev/raw/raw5
  /dev/raw/raw6
finish
 
 YES
 
Create DATABASE

next

 select all

next
 customer database
 
next
 globale name :icpdb
 sid          :icpdb
 
next

 password

 ASM
next

  select all disk group

next
剩下的忘记了没写过程

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/598601/viewspace-623678/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/598601/viewspace-623678/

python+opencv简谱识别音频生成系统源码含GUI界面+详细运行教程+数据 一、项目简介 提取简谱中的音乐信息,依据识别到的信息生成midi文件。 Extract music information from musical scores and generate a midi file according to it. 二、项目运行环境 python=3.11.1 第三方库依赖 opencv-python=4.7.0.68 numpy=1.24.1 可以使用命令 pip install -r requirements.txt 来安装所需的第三方库。 三、项目运行步骤 3.1 命令行运行 运行main.py。 输入简谱路径:支持图片或文件夹,相对路径或绝对路径都可以。 输入简谱主音:它通常在第一页的左上角“1=”之后。 输入简谱速度:即每分钟拍数,同在左上角。 选择是否输出程序中间提示信息:请输入Y或N(不区分大小写,下同)。 选择匹配精度:请输入L或M或H,对应低/中/高精度,一般而言输入L即可。 选择使用的线程数:一般与CPU核数相同即可。虽然python的线程不是真正的多线程,但仍能起到加速作用。 估算字符上下间距:这与简谱中符号的密集程度有关,一般来说纵向符号越稀疏,这个值需要设置得越大,范围通常在1.0-2.5。 二值化算法:使用全局阈值则跳过该选项即可,或者也可输入OTSU、采用大津二值化算法。 设置全局阈值:如果上面选择全局阈值则需要手动设置全局阈值,对于.\test.txt中所提样例,使用全局阈值并在后面设置为160即可。 手动调整中间结果:若输入Y/y,则在识别简谱后会暂停代码,并生成一份txt文件,在其中展示识别结果,此时用户可以通过修改这份txt文件来更正识别结果。 如果选择文件夹的话,还可以选择所选文件夹中不需要识别的文件以排除干扰
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值