以前安装总结的,现把它贴出来,虽然10g现在慢慢越少了,但也有不少生产库跑10g的。
1.
vi /etc/hosts
10.168.39.243 orcldb1
10.168.39.245 orcldb2
192.168.39.243 orcldb1-priv
192.168.39.245 orcldb2-priv
10.168.39.242 orcldb1-vip
10.168.39.244 orcldb2-vip
2.
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba -d /oracle oracle
useradd -g oinstall -G dba oracle
passwd oracle
id oracle
mkdir -p /oracle/product/10.2.0/crs_1
mkdir -p /oracle/product/10.2.0/db_1
mkdir -p /oraInventory
chown -R oracle:oinstall /oracle
chown -R oracle:oinstall /oraInventory
chmod -R 775 /oracle
chmod -R 775 /oraInventory
su - oracle
vi.bash_prifole
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK; export NLS_LANG
ORA_NLS33=$ORACLE_HOME/common/nls/admin/data; export ORA_NLS33
ORACLE_SID=orcl1; export ORACLE_SID
CRS_HOME=/oracle/product/10.2.0/crs_1; export CRS_HOME
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$CRS_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib; export LD_LIBRARY_PATH
export TNS_NAMES=$ORACLE_HOME/network/admin
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib; export CLASSPATH
stty erase ^H
su - root
vi /etc/sysctl.conf
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
vi /etc/rc.local
modprobe hangcheck-timer hangcheck-tick=30 hangcheck_margin=180
crontab -e
08 01 * * * /usr/sbin/ntpdate -u 10.168.192.10
08 13 * * * /usr/sbin/ntpdate -u 10.168.192.33
安装RPM包
RAW绑定
节点1:
Disk /dev/sdb: 107.3 GB, 107374182400 byte
Disk /dev/sdc: 1073 MB, 1073741824 bytes
Disk /dev/sdd: 1073 MB, 1073741824 bytes
Disk /dev/sde: 1073 MB, 1073741824 bytes
Disk /dev/sdf: 1073 MB, 1073741824 bytes
Disk /dev/sdg: 1073 MB, 1073741824 bytes
Disk /dev/sdh: 429.4 GB, 429496729600 bytes
Disk /dev/sdi: 429.4 GB, 429496729600 bytes
节点2:
Disk /dev/sdb: 107.3 GB, 107374182400 bytes
Disk /dev/sdc: 1073 MB, 1073741824 bytes
Disk /dev/sdd: 1073 MB, 1073741824 bytes
Disk /dev/sde: 1073 MB, 1073741824 bytes
Disk /dev/sdf: 1073 MB, 1073741824 bytes
Disk /dev/sdg: 1073 MB, 1073741824 bytes
Disk /dev/sdh: 429.4 GB, 429496729600 bytes
Disk /dev/sdi: 429.4 GB, 429496729600 bytes
/etc/sysconfig/rawdevices
/dev/raw/raw1 /dev/sdc
/dev/raw/raw2 /dev/sdd
/dev/raw/raw3 /dev/sde
/dev/raw/raw4 /dev/sdf
/dev/raw/raw5 /dev/sdg
/dev/raw/raw6 /dev/sdh
/dev/raw/raw7 /dev/sdi
UDEV
vi /etc/udev/rules.d/60-raw.rules
KERNEL=="raw[1-2]",OWNER="root",GROUP="oinstall",MODE="640"
KERNEL=="raw[3-9]",OWNER="oracle",GROUP="oinstall",MODE="660"
chkconfig --list rawdevices
service rawdevices restart
ll /dev/raw看权限改了没
互相ping PIP和私网IP
两个节点
su - oracle
mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa ##########输入与oracle不同的口令或者空
ssh-keygen -t dsa ##########输入与oracle不同的口令或者空
节点1
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
ssh orcldb2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh orcldb2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
scp ~/.ssh/authorized_keys orcldb2:~/.ssh/authorized_keys
两机相互执行,看看是否还需要输入密码
ssh orcldb1 date
ssh orcldb2 date
ssh orcldb1-priv date
ssh orcldb2-priv date
住:创建oracle用户尽量别-d 指定路径。要不权限问题ssh怎么都不通。
切换至node2 执行
ssh orcldb1 date
ssh orcldb2 date
ssh orcldb1-priv date
ssh orcldb2-priv date
安装集群软件
./runInstaller -ignoreSysPrereqs
接着图形化界面略过,到最后执行root.sh之前安装补丁p4679769,linux 下使用多路径时,需要安装该补丁。
clsfmt.bin这个文件覆盖到两个节点$CRS_HOME/bin下
执行./clsfmt ocr /dev/raw/raw1 测试
具体也可参考http://blog.csdn.net/tianlesoft/article/details/6039210
执行root.sh之前两个节点修改vipca和srvctl
if [ "$arch" = "i686" -o "$arch" = "ia64" ]
then
LD_ASSUME_KERNEL=2.4.19
export LD_ASSUME_KERNEL
fi
#End workaround
在fi 后新添加一行:
unset LD_ASSUME_KERNEL
找到如下内容:
LD_ASSUME_KERNEL=2.4.19
export LD_ASSUME_KERNEL
同样在其后新增加一行:
unset LD_ASSUME_KERNEL
CSS is active on all nodes.
Waiting for the Oracle CRSD and EVMD to start
Oracle CRS stack installed and running under init(1M)
Running vipca(silent) for configuring nodeapps
Error 0(Native: listNetInterfaces:[3])
[Error 0(Native: listNetInterfaces:[3])]
./oifcfg setif -global eth2/10.168.39.224:public
./oifcfg setif -global eth3/192.168.39.0:cluster_interconnect
./oifcfg getif
执行vipca