前一阵刚刚才测试环境下装完Solaris 8下的ORACLE RAC。结果发现这次采购的F490硬件居然不支持Solaris 8。只好将操作系统升级到Solaris 10。
前面已经对Solaris 8下的安装进行了比较详细的描述,这里只是简单记录一下Solaris 10下的安装步骤。和8类似的步骤会简单带过。
首先是建立用户:
在第一个节点:
root@ahrac1 # groupadd oinstall
root@ahrac1 # groupadd dba
root@ahrac1 # mkdir -p /export/home/oracle
root@ahrac1 # useradd -g oinstall -G dba -d /export/home/oracle oracle
root@ahrac1 # chown oracle:oinstall /export/home/oracle
root@ahrac1 # mkdir /data
root@ahrac1 # chown oracle:oinstall /data
root@ahrac1 # passwd oracle
root@ahrac1 # id nobody
uid=60001(nobody) gid=60001(nobody)
root@ahrac1 # id oracle
uid=101(oracle) gid=101(oinstall)
root@ahrac1 # more /etc/group
root::0:
other::1:root
bin::2:root,daemon
sys::3:root,bin,adm
adm::4:root,daemon
uucp::5:root
mail::6:root
tty::7:root,adm
lp::8:root,adm
nuucp::9:root
staff::10:
daemon::12:root
sysadmin::14:
smmsp::25:
gdm::50:
webservd::80:
nobody::60001:
noaccess::60002:
nogroup::65534:
test::100:
oinstall::101:
dba::102:oracle
在节点二:
root@ahrac2 # groupadd -g 101 oinstall
root@ahrac2 # groupadd -g 102 dba
root@ahrac2 # mkdir -p /export/home/oracle
root@ahrac2 # useradd -u 101 -g oinstall -G dba -d /export/home/oracle oracle
root@ahrac2 # chown oracle:oinstall /export/home/oracle
root@ahrac2 # mkdir /data
root@ahrac2 # chown oracle:oinstall /data
root@ahrac2 # id nobody
uid=60001(nobody) gid=60001(nobody)
root@ahrac2 # passwd oracle
设置两个节点的环境变量,注意节点二的环境变量中的ORACLE_SID是tradedb2:
root@ahrac1 # su - oracle
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
$ vi .profile
umask 022
ORACLE_SID=tradedb1
export ORACLE_SID
ORACLE_BASE=/data/oracle
export ORACLE_BASE
ORACLE_HOME=/data/oracle/product/10.2/database
export ORACLE_HOME
NLS_LANG='SIMPLIFIED CHINESE_CHINA.ZHS16GBK'
export NLS_LANG
PATH=$PATH:$ORACLE_HOME/bin
export PATH
DISPLAY=172.25.6.201:1.0
export DISPLAY
再上一篇文章中,介绍了通过rcp的方式配置远端访问方式,这篇给出配置ssh的方式。首先在两个节点上执行下面的操作,产生ssh命令所需的key文件:
root@ahrac1 # su - oracle
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
$ mkdir .ssh
$ chmod 700 .ssh
IXDBA.NET技术社区
$ /usr/bin/ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/export/home/oracle/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /export/home/oracle/.ssh/id_rsa.
Your public key has been saved in /export/home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
64:0a:45:ce:a6:de:8b:f7:ba:b3:15:87:38:46:f6:c7 oracle@ahrac1
$ /usr/bin/ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/export/home/oracle/.ssh/id_rsa):
/export/home/oracle/.ssh/id_rsa already exists.
Overwrite (yes/no)? no
$ /usr/bin/ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/export/home/oracle/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /export/home/oracle/.ssh/id_dsa.
Your public key has been saved in /export/home/oracle/.ssh/id_dsa.pub.