Solaris10下Silent模式安裝Oracle1106RAC環境(一)
主機環境基本上和前面文章中描述的SOLARIS10安裝Oracle1106rac的環境基本完全一致,最主要的區別在於沒有了VOLUMN CLUSTER MANAGER,於是這裡打算使用Oracle的ASM。由於安裝操作沒有什麼區別,所以這次安裝選擇了SILENT靜默模式來安裝RAC。
首先設定作業系統環境資訊。
根據Oracle的metalink產品驗證列表,Solaris10支援Oracle11g for Sparc 64bit。
首先驗證系統硬體是否滿足需要,在兩臺伺服器上分別執行上面的檢查語句:
root@ser1 # /usr/sbin/prtconf | grep "Memory size"
Memory size: 32768 Megabytes
root@ser1 # /usr/sbin/swap -s
total: 176224k bytes allocated + 29520k reserved = 205744k used, 58981880k available
root@ser1 # df -k /tmp
Filesystem kbytes used avail capacity Mounted on
swap 58980232 40 58980192 1% /tmp
root@ser1 # df -k /
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d10 73621232 4388386 68496634 7% /
檢查作業系統版本和包資訊:
root@ser1 # uname -r
5.10
root@ser1 # pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibC SUNWlibm SUNWlibms SUNWsprot SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt
system SUNWarc Lint Libraries (usr)
system SUNWbtool CCS tools bundled with SunOS
system SUNWhea SunOS Header Files
system SUNWi1of ISO-8859-1 (Latin-1) Optional Fonts
system SUNWlibC Sun Workshop Compilers Bundled libC
system SUNWlibm Math & Microtasking Library Headers & Lint Files (Usr)
system SUNWlibms Math & Microtasking Libraries (Usr)
system SUNWsprot Solaris Bundled tools
system SUNWtoo Programming Tools
system SUNWxwfnt X Window System platform. required fonts
ERROR: information for "SUNWi1cs" was not found
ERROR: information for "SUNWi15cs" was not found
缺少兩個包SUNWi1cs和SUNWi15cs,根據以往安裝經驗,不安裝這兩個包也可以順利安裝Oracle,由於是測試資料庫,所以先忽略這兩個包。
檢查系統的patch安裝情況:
root@ser1 # /usr/sbin/patchadd -p | grep 127111
Patch: 127111-11 Obsoletes: 118557-09 118562-14 118843-01 121290-03 123398-02 123564-01 125016-02 125043-01 125122-01 125196-05 125202-01 125251-02 125380-02 125382-01 126432-01 126665-01 127716-01 127730-04 127741-01 127745-01 127747-01 127749-03 127750-01 127753-02 127757-01 Requires: 118833-36 118918-24 119578-30 120011-14 120900-04 125369-13 125476-02 126540-02 126897-02 Incompatibles: Packages: SUNWcsu SUNWcsr SUNWcsl FJSVhea SUNWcakr SUNWckr SUNWcsd SUNWesu SUNWtoo SUNWusb SUNWopenssl-libraries SUNWnfsckr SUNWcslr SUNWhea SUNWnisu SUNWypr SUNWypu SUNWzoneu SUNWfmd FJSVfmd SUNWmdb FJSVmdb SUNWmdbr FJSVmdbr SUNWpiclu SUNWnfssu SUNWcpc SUNWcpr SUNWefc SUNWdrcr SUNWdrr SUNWbtool SUNWarcr SUNWnxge SUNWdtrc SUNWcry SUNWcryr SUNWcstl SUNWpsu SUNWdcar SUNWdtrp
如果不需要安裝PRO*C和OCI之類的開發工具,Solaris10只需要保證補丁127111的版本大於127111-02即可。如果需要安裝這些開發工具,還需要檢查下面幾個補丁:117837-05、117846-08和118682-01
下面為兩個節點分別建立Oracle使用者和相應的組。首先在節點1上:
root@ser1 # groupadd oinstall
root@ser1 # groupadd dba
root@ser1 # mkdir -p /export/home/oracle
root@ser1 # useradd -g oinstall -G dba -d /export/home/oracle oracle
root@ser1 # mkdir /data
root@ser1 # chown -R oracle:oinstall /export/home/oracle
root@ser1 # chown -R oracle:oinstall /data
root@ser1 # passwd oracle
New Password:
Re-enter new Password:
passwd: password successfully changed for oracle
root@ser1 # id oracle
uid=100(oracle) gid=100(oinstall)
root@ser1 # 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:
postgres::90:
nobody::60001:
noaccess::60002:
nogroup::65534:
oinstall::100:
dba::101:oracle
root@ser1 # id nobody
uid=60001(nobody) gid=60001(nobody)
根據上面的結果在節點2上建立使用者和組:
root@ser2 # groupadd -g 100 oinstall
root@ser2 # groupadd -g 101 dba
root@ser2 # mkdir -p /export/home/oracle
root@ser2 # useradd -u 100 -g oinstall -G dba -d /export/home/oracle oracle
root@ser2 # chown -R oracle:oinstall /export/home/oracle
root@ser2 # mkdir /data
root@ser2 # chown -R oracle:oinstall /data
root@ser2 # passwd oracle
New Password:
Re-enter new Password:
passwd: password successfully changed for oracle
root@ser2 # id nobody
uid=60001(nobody) gid=60001(nobody)
下面分別為兩個節點的使用者建立環境變數,編輯.profile檔案為節點1新增下面的內容。
umask 022
ORACLE_SID=rac11g1
export ORACLE_SID
ORACLE_BASE=/data/oracle
export ORACLE_BASE
ORACLE_HOME=/data/oracle/product/11.1/database
export ORACLE_HOME
NLS_LANG='SIMPLIFIED CHINESE_CHINA.ZHS16GBK'
export NLS_LANG
PATH=$PATH:$ORACLE_HOME/bin
export PATH
DISPLAY=172.25.8.201:1.0
export DISPLAY
同樣的操作在節點2上執行,將ORACLE_SID的變數替換為rac11g2。
下面為兩個節點設定IP、VIRTUAL-IP和PRIVATE-IP,編輯/etc/hosts檔案,在兩個節點分別新增下面的內容:
127.0.0.1 localhost
172.0.2.62 ser1 ser1. loghost
172.0.2.63 ser2
172.0.2.68 ser1-vip
172.0.2.69 ser2-vip
10.0.2.1 ser1-priv
10.0.2.2 ser2-priv
下面需要配置SSH訪問,首先檢查兩個資料庫上是否安裝了SSH:
root@ser1 # pgrep sshd
7699
478
7702
下面切換到oracle使用者,確保oracle的當前目錄許可權不超過750:
root@ser1 # su - oracle
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
$ ls -al
total 8
drwxr-xr-x 2 oracle oinstall 512 Aug 12 17:18 .
drwxr-xr-x 3 root root 512 Aug 11 11:25 ..
-rw------- 1 oracle oinstall 117 Aug 12 17:18 .bash_history
-rw-r--r-- 1 oracle oinstall 299 Aug 12 16:38 .profile
$ chmod 750 .
$ ls -al
total 8
drwxr-x--- 2 oracle oinstall 512 Aug 12 17:18 .
drwxr-xr-x 3 root root 512 Aug 11 11:25 ..
-rw------- 1 oracle oinstall 117 Aug 12 17:18 .bash_history
-rw-r--r-- 1 oracle oinstall 299 Aug 12 16:38 .profile
建立ssh報錯key所需的目錄:
$ mkdir .ssh
$ chmod 700 .ssh
產生key檔案,指定預設存放位置,並設定一個密碼:
$ 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:
6e:70:93:96:8a:59:a6:b4:fb:2e:ad:60:f3:c6:02:92 oracle@ser1
在另一個節點上重複同樣的操作。
下面進行.ssh目錄,新增id_rsa.pub到檔案authorized_keys檔案中,並透過scp複製到節點2:
$ pwd
/export/home/oracle
$ cd .ssh
$ ls
id_rsa id_rsa.pub
$ cat id_rsa.pub >> authorized_keys
$ ls
authorized_keys id_rsa id_rsa.pub
$ scp authorized_keys ser2:/export/home/oracle/.ssh/
The authenticity of host 'ser2 (172.0.2.63)' can't be established.
RSA key fingerprint is e3:18:c8:7d:c2:89:f1:e7:3a:fa:5c:93:8b:ba:99:43.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ser2,172.0.2.63' (RSA) to the list of known hosts.
Password:
authorized_keys 100% |*********************************************************************************| 221 00:00
透過ssh登陸節點2,進行.ssh目錄,新增id_rsa.pub到authorized_keys檔案,並將這個檔案透過scp複製並覆蓋節點1上的檔案:
$ ssh ser2
Enter passphrase for key '/export/home/oracle/.ssh/id_rsa':
Last login: Mon Aug 18 17:22:45 2008 from ser1
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
$ cd .ssh
$ cat id_rsa.pub >> authorized_keys
$ ls
authorized_keys id_rsa id_rsa.pub
$ scp authorized_keys ser1:/export/home/oracle/.ssh/
The authenticity of host 'ser1 (172.0.2.62)' can't be established.
RSA key fingerprint is 5d:bc:31:12:68:30:5a:30:8d:f5:46:2b:4a:6e:ef:fb.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ser1,172.0.2.62' (RSA) to the list of known hosts.
Password:
authorized_keys 100% |*********************************************************************************| 442 00:00
確認兩個節點上的authorized_keys檔案中已經包含了2個節點的rsa資訊:
$ more authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAymgz0aIOGDGXjbrEtksl/OE5OIVzLOxZSlbgOd7eO5j4Eq98WfJ6ow1jb46LPi1264p1jE/y5htceQskn9kYlsunWS59kjh2
1AXxqh54KQhZ6xccbHBgtfKX6dzZdoRxPmXZh+JnGlZSDqEjaQsORwAhQmH4BnrfVnOnHlPa2jM= oracle@ser1
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEArdCz98s7vqMVywt27cTVi9z3VUEv0c1K3c0rZRdA2Z4td/GhC/zzi1w1OeIp6dXEE5UUhHWtEEc2SJaargt3J7GrEEvt+na6
/6AcIdOPY3CFugFq4ov4qU8MN6zuBAuVr24HBh//dGQkZGx/6WA+1djMqa2BszNKgqxpdTBSSUU= oracle@ser2
$ exit
Connection to ser2 closed.
$ more authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAymgz0aIOGDGXjbrEtksl/OE5OIVzLOxZSlbgOd7eO5j4Eq98WfJ6ow1jb46LPi1264p1jE/y5htceQskn9kYlsunWS59kjh2
1AXxqh54KQhZ6xccbHBgtfKX6dzZdoRxPmXZh+JnGlZSDqEjaQsORwAhQmH4BnrfVnOnHlPa2jM= oracle@ser1
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEArdCz98s7vqMVywt27cTVi9z3VUEv0c1K3c0rZRdA2Z4td/GhC/zzi1w1OeIp6dXEE5UUhHWtEEc2SJaargt3J7GrEEvt+na6
/6AcIdOPY3CFugFq4ov4qU8MN6zuBAuVr24HBh//dGQkZGx/6WA+1djMqa2BszNKgqxpdTBSSUU= oracle@ser2
分別在兩個節點執行下面的命令,新增節點的PUBLIC名稱到已知主機命令列表之中:
$ ssh ser1 date
The authenticity of host 'ser1 (172.0.2.62)' can't be established.
RSA key fingerprint is 5d:bc:31:12:68:30:5a:30:8d:f5:46:2b:4a:6e:ef:fb.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ser1,172.0.2.62' (RSA) to the list of known hosts.
Enter passphrase for key '/export/home/oracle/.ssh/id_rsa':
Mon Aug 18 17:32:55 CST 2008
$ ssh ser2 date
Enter passphrase for key '/export/home/oracle/.ssh/id_rsa':
Mon Aug 18 17:34:56 CST 2008
在兩個節點分別執行下面的操作,將密碼新增到agent中:
$ exec ssh-agent $SHELL
$ ssh-add
Enter passphrase for /export/home/oracle/.ssh/id_rsa:
Identity added: /export/home/oracle/.ssh/id_rsa (/export/home/oracle/.ssh/id_rsa)
下面在兩個節點分別輸入下面的命令,驗證ssh是否配置正確:
$ ssh ser1 date
Mon Aug 18 17:40:11 CST 2008
$ ssh ser2 date
Mon Aug 18 17:41:08 CST 2008
如果不出現密碼提示,說明已經正確的完成了ssh的配置。
下面分別設定兩個節點的預設閘道器,編輯/etc/defaultrouter新增預設閘道器:
172.0.2.252
為兩個節點新增PRIVATE-IP:
root@ser1 # ifconfig ce1 plumb
root@ser1 # ifconfig ce1 10.0.2.1 netmask 255.255.255.0 broadcast 10.0.2.255 up
編輯兩個節點的/etc/hostname.ce1,分別新增private_ip地址對應的主機名:
ser1-priv
下面編輯兩個節點的/etc/netmasks,分別新增private_ip的子網掩碼和廣播地址資訊:
10.0.2.0 255.255.255.0
在兩個節點分別檢查nscd程式是否啟動,如果沒有啟動可以使用/etc/init.d/nscd start來進行啟動:
root@ser1 # ps -ef | grep nscd | grep -v grep
root 177 1 0 Aug 06 ? 0:12 /usr/sbin/nscd
在兩個節點分別檢查udp協議配置:
root@ser1 # ndd /dev/udp udp_xmit_hiwat
57344
root@ser1 # ndd /dev/udp udp_recv_hiwat
57344
由於設定接近Oracle的推薦值,這裡就不需要進行修改。
在兩個節點利用Oracle使用者,建立Oracle的安裝目標:
bash-3.00$ mkdir -p /data/oracle/product/11.1/database
bash-3.00$ mkdir /data/oracle/product/11.1/crs
bash-3.00$ mkdir /data/oracle/oraInventory
最後分別設定兩個系統的核心引數,修改/etc/system檔案,新增下面的內容:
set noexec_user_stack=1
set semsys:seminfo_semmni=100
set semsys:seminfo_semmns=1024
set semsys:seminfo_semmsl=256
set semsys:seminfo_semvmx=32767
set shmsys:shminfo_shmmax=21474836479
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=10
然後重啟系統,安裝準備工作告一段落。
由於兩個伺服器上面的系統時間有差別,應該利用作業系統命令date將二者時間調整一致。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/4227/viewspace-543035/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Solaris10下Silent模式安裝Oracle1106RAC環境(八)模式Oracle
- Solaris10下Silent模式安裝Oracle1106RAC環境(七)模式Oracle
- Solaris10下Silent模式安裝Oracle1106RAC環境(六)模式Oracle
- Solaris10下Silent模式安裝Oracle1106RAC環境(五)模式Oracle
- Solaris10下Silent模式安裝Oracle1106RAC環境(四)模式Oracle
- Solaris10下Silent模式安裝Oracle1106RAC環境(三)模式Oracle
- Solaris10下Silent模式安裝Oracle1106RAC環境(二)模式Oracle
- Solaris10下安裝Oracle1106RAC環境(一)Oracle
- Solaris10下安裝Oracle1106RAC環境(五)Oracle
- Solaris10下安裝Oracle1106RAC環境(四)Oracle
- Solaris10下安裝Oracle1106RAC環境(三)Oracle
- Solaris10下安裝Oracle1106RAC環境(二)Oracle
- Solaris10下完全解除安裝Oracle1106RAC環境Oracle
- Solaris10下安裝Oracle10203RAC環境(一)Oracle
- Solaris10下安裝Oracle10203RAC環境(五)Oracle
- Solaris10下安裝Oracle10203RAC環境(三)Oracle
- Solaris10下安裝Oracle10203RAC環境(二)Oracle
- Solaris10下安裝Oracle10203RAC環境 (zt)Oracle
- Windows 環境下 Python 環境安裝WindowsPython
- Windows 環境下安裝 LaravelWindowsLaravel
- Mac環境下安裝PodMac
- Windows 環境下安裝 RedisWindowsRedis
- Windows環境下安裝RabbitMQWindowsMQ
- kali環境下安裝dvwa
- ubuntu下安裝boost環境Ubuntu
- Unbuntu下安裝Go環境Go
- 使用silent模式安裝Oracle 11g模式Oracle
- solaris下-silent方式安裝oracle clientOracleclient
- Linux下安裝Go環境LinuxGo
- docker環境下安裝tensorflowDocker
- Windows環境下安裝LinuxWindowsLinux
- Docker 下安裝配置 lnmp 環境DockerLNMP
- linux環境下redis安裝LinuxRedis
- Linux環境下安裝NginxLinuxNginx
- Windows環境下安裝NexusWindows
- Mac環境下安裝配置RedisMacRedis
- windows下配置安裝YAF環境Windows
- windows環境下安裝seleniumWindows