AIX6.1安裝ORACLE 11g(單機使用ASM)
一、 環境描述:
AIX6104
ORACLE 11G R2
使用ASM(內建硬碟hdisk1)
二、 安裝X圖形
#smitty installp
安裝X11.Dt
再重啟
環境 產品:rs6000,平臺aix,機型all,軟體版本v4 or later
問題 使用者透過遠端圖形軟體(如:Xmanager)登陸aix,使用者無法登陸。如何解決該問題?
解答
1。 在主控臺執行
/usr/dt/bin/dtconfig -kill (關閉cde 程式)
/usr/dt/bin/dtconfig -d (下次啟動機器不進cde介面)
/usr/lib/X11/xdm/xdmconf -e (開啟xdm功能)
startsrc -s xdm (啟動xdm)
ps -ef | grep xdm (檢查xdm程式正在執行)
ps -ef | grep dtlogin (cde 程式應該停止)
2。 編輯Xservers 檔案,
vi /usr/lib/X11/xdm/Xservers
把最後一行的#號去掉
# :0 Local local /usr/bin/X11/X -force
/usr/lib/X11/xdm/xdmconf -e
重啟
# /usr/dt/bin/dtconfig -e
The CDE environment is now set as the default user interface.
This interface will appear on login for all users of the system.
To see this change take effect you must shutdown and restart your system.
# cd /etc
# rc.dt
Starting AIX Windows Desktop..............#
三、 檢查系統包
# cat chk_pack.sh
#!/usr/bin/ksh
OSpackagesOK=true
if /usr/bin/test -x /usr/bin/lslpp
then
for PACKAGE in "bos.adt.base" "bos.adt.lib" "bos.adt.libm" "bos.perf.perfstat" "bos.perf.libperfstat" "bos.perf.proctools" "rsct.basic.rte" "rsct.compat.clients.rte" "xlC.aix61.rte"
do
if [ `/usr/bin/lslpp -l | /usr/bin/grep -c $PACKAGE` != 0 ]
then
STATE=`/usr/bin/lslpp -l | /usr/bin/grep $PACKAGE | /usr/bin/awk '{print $3}' | /usr/bin/sed '2,$d'`
if [ $STATE != "COMMITTED" ]
then
if [ $STATE != "APPLIED" ]
then
/usr/bin/echo "$PACKAGE" --NotApplied
OSpackagesOK=false
fi
fi
else
/usr/bin/echo "$PACKAGE" --NotInstalled
OSpackagesOK=false
fi
done
else
/usr/bin/echo "NoAccess"
OSpackagesOK=false
fi
if [ $OSpackagesOK = true ]
then
/usr/bin/echo "All required OS packages are installed"
fi
# set -o vi
# ./chk_pack.sh
bos.adt.libm --NotInstalled
rsct.basic.rte --NotInstalled
rsct.compat.clients.rte –NotInstalled
將這些包安裝上
四、 配置環境
# chfs -a size=4096M /usr
# chfs -a size=2048M /tmp
ps設定成10G
將最大程式數改成16384
smitty-> System Environments-> Change / Show Characteristics of Operating System
修改root使用者的limit引數
#vi /etc/security/limits
default:
fsize = -1
core = -1
cpu = -1
data = -1
rss = -1
stack = -1
nofiles = -1
root:
fsize = -1
data = -1
core = -1
nofiles = -1
建立/oracle檔案系統 //存放oracle安裝軟體
/dev/fslv00 35.00 34.99 1% 4 1% /oracle
建立/grid檔案系統 //存放grid安裝軟體
/dev/fslv01 35.00 34.99 1% 4 1% /grid
# mkgroup -a id=300 dba
# mkgroup -a id=301 oinstall
建立oracle使用者,主組設定成oisntall,管理組設定成dba
# chown -R oracle:oinstall /oracle
# chmod -R 775 /oracle
配置vmo引數
vmo -p -o minperm%=10
vmo -p -o maxclient%=20
vmo -p -o maxperm%=20
vmo -p -o lru_file_repage=0
$ cat .profile
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.
export PATH
if [ -s "$MAIL" ] # This is at Shell startup. In normal
then echo "$MAILMSG" # operation, the Shell checks
fi # periodically.
ORACLE_BASE=/oracle
ORACLE_SID=zydb
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
PATH=$PATH:$ORACLE_HOME/bin:.:/usr/local/bin
umask=022
export PATH ORACLE_BASE ORACLE_SID ORACLE_HOME
五、 安裝ORACLE軟體
先使用root使用者執行rootpre.sh指令碼
# sh rootpre.sh
rootpre.sh output will be logged in /tmp/rootpre.out_14-03-11.10:36:20
Saving the original files in /etc/ora_save_14-03-11.10:36:20....
Copying new kernel extension to /etc....
Loading the kernel extension from /etc
Oracle Kernel Extension Loader for AIX
Copyright (c) 1998,1999 Oracle Corporation
Kernel Extension /etc/pw-syscall.64bit_kernel already loaded, unloading it
Unconfigured the kernel extension successfully
Unloaded the kernel extension successfully
Successfully loaded /etc/pw-syscall.64bit_kernel with kmid: 0x50aab000
Successfully configured /etc/pw-syscall.64bit_kernel with kmid: 0x50aab000
The kernel extension was successfuly loaded.
Checking if group services should be configured....
Nothing to configure.
使用root使用者執行:
# sh /oracle/oraInventory/orainstRoot.sh
Changing permissions of /oracle/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /oracle/oraInventory to oinstall.
The execution of the script is complete.
# sh /oracle/product/11.2.0/db_1/root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /oracle/product/11.2.0/db_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Creating /usr/local/bin directory...
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
提示
補丁要求:
補丁說明:
IZ41855 U821811 bos.mp64 6.1.2.3
IZ51456 U828425 bos.rte.streams 6.1.3.1
IZ52319 U828354 bos.perf.libperfstat 6.1.2.4
這些補丁在6104 AIX上都是過時補丁,不用管,略過
如果安裝過程中提示
是2個壓縮包沒解壓完全,需要將壓縮包在AIX中使用unzip分別解壓
六、 建立grid 使用者等
使用內建硬碟hdisk1作為ASM磁碟
mkgroup -A id=503 oper
mkgroup -A id=504 asmadmin
mkgroup -A id=505 asmoper
mkgroup -A id=506 asmdba
mkuser pgrp=oinstall groups=asmadmin,asmdba,asmoper,dba grid
配置grid的.profile檔案
su – grid
$ cat .profile
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.
export PATH
if [ -s "$MAIL" ] # This is at Shell startup. In normal
then echo "$MAILMSG" # operation, the Shell checks
fi # periodically.
export ORACLE_BASE=/grid
export ORACLE_HOME=/grid/product/11.2.0/grid
export ORACLE_SID=+ASM
export PATH=$ORACLE_HOME/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.
export ORACLE_TERM=vt100
export NLS_LANG=AMERICAN_AMERICA.zhs16gbk
七、為ASM準備磁碟 //使用hdisk1
# lspv
hdisk0 00c1e28b645aa82f rootvg active
hdisk1 00c9161dd80ca8b2 None
修改磁碟屬性
# chown grid:oinstall /dev/rhdisk1
# chdev -l hdisk1 -a pv=clear
hdisk1 changed
# lspv
hdisk0 00c1e28b645aa82f rootvg active
hdisk1 none None
# chmod 770 /dev/rhdisk1
修改解壓縮安裝檔案屬性
# chown -R grid:oinstall xxx
# chmod -R 755 xxx
# chown -R grid:oinstall /grid
# chmod -R 755 /grid
八、安裝grid軟體
先執行rootpre.sh指令碼
# sh rootpre.sh
rootpre.sh output will be logged in /tmp/rootpre.out_14-03-11.12:09:58
Saving the original files in /etc/ora_save_14-03-11.12:09:58....
Copying new kernel extension to /etc....
Loading the kernel extension from /etc
Oracle Kernel Extension Loader for AIX
Copyright (c) 1998,1999 Oracle Corporation
Kernel Extension /etc/pw-syscall.64bit_kernel already loaded, unloading it
Unconfigured the kernel extension successfully
Unloaded the kernel extension successfully
Successfully loaded /etc/pw-syscall.64bit_kernel with kmid: 0x50b08000
Successfully configured /etc/pw-syscall.64bit_kernel with kmid: 0x50b08000
The kernel extension was successfuly loaded.
Checking if group services should be configured....
Nothing to configure.
密碼都配置成oracle
# sh /grid/product/11.2.0/grid2/root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /grid/product/11.2.0/grid2
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2014-03-11 14:38:25: Checking for super user privileges
2014-03-11 14:38:25: User has super user privileges
2014-03-11 14:38:25: Parsing the host name
Using configuration parameter file: /grid/product/11.2.0/grid2/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
CRS-4664: Node kimo1 successfully pinned.
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
kimo1 2014/03/11 14:39:24 /grid/product/11.2.0/grid2/cdata/kimo1/backup_20140311_143924.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
Updating inventory properties for clusterware
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 10240 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /oracle/oraInventory
'UpdateNodeList' was successful.
九、以grid使用者檢視ASM磁碟組
Asmca
如果彈出的圖過小,拉長即可全部顯示
選擇mount all
//AIX重啟後,等幾分鐘ASM例項會自動啟動,無需手動啟動ASM
手動啟動ASM方法:
#Su – grid
$ srvctl start asm
檢查ASM是否啟動
# ps -ef|grep +ASM
grid 205024 1 0 09:00:02 - 0:00 asm_pmon_+ASM
grid 221404 1 0 09:00:04 - 0:00 asm_rbal_+ASM
grid 225490 1 0 09:00:02 - 0:00 asm_gen0_+ASM
grid 229588 1 0 09:00:03 - 0:00 asm_psp0_+ASM
grid 233686 1 0 09:00:03 - 0:00 asm_mman_+ASM
grid 237786 1 0 09:00:03 - 0:00 asm_lgwr_+ASM
grid 241886 1 0 09:00:04 - 0:00 asm_smon_+ASM
grid 250082 1 0 09:00:05 - 0:00 asm_mmnl_+ASM
grid 282704 1 0 09:18:04 - 0:00 asm_asmb_+ASM
root 286806 217578 0 09:18:35 pts/0 0:00 grep +ASM
grid 303188 1 0 09:18:05 - 0:00 oracle+ASM_o000_+asm (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
grid 53702 1 0 09:00:03 - 0:00 asm_dia0_+ASM
grid 180682 1 0 09:00:04 - 0:00 asm_gmon_+ASM
grid 192798 1 0 09:00:04 - 0:00 asm_mmon_+ASM
grid 197100 1 0 09:00:03 - 0:00 asm_diag_+ASM
grid 200976 1 0 09:00:02 - 0:00 asm_vktm_+ASM
grid 205272 1 0 09:00:03 - 0:00 asm_dbw0_+ASM
grid 209372 1 0 09:00:04 - 0:00 asm_ckpt_+ASM
$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.DATA.dg ora....up.type ONLINE ONLINE kimo1
ora....ER.lsnr ora....er.type ONLINE ONLINE kimo1
ora.asm ora.asm.type ONLINE ONLINE kimo1
ora.cssd ora.cssd.type ONLINE ONLINE kimo1
ora.diskmon ora....on.type ONLINE ONLINE kimo1
ora.sdzy3.db ora....se.type ONLINE ONLINE kimo1
十、使用oracle使用者建立oracle例項,建立在ASM上
$dbca
密碼均設定oracle
//選擇Browser,正常會彈出ASM列表,如果列表是空,是oracle使用者沒有歸到asmdba組,將oracle使用者歸到asmdba組
# smitty user->Change / Show Characteristics of a User->選擇oracle使用者
新增asmdba組
正常如下:
輸入asm密碼oracle
開歸檔:
如果報錯,可能是/dev/rhdisk1許可權問題,修改磁碟許可權
Chown grid:oinstall /dev/rhdisk1
Chmod 770 /dev/rhdisk1
安裝完成
十一、 安裝完後檢查
# ps -ef|grep ora_
grid 213086 1 0 09:51:21 - 0:00 ora_arc2_zydb
grid 262192 1 0 09:51:10 - 0:01 ora_mmon_zydb
grid 270432 1 0 09:52:36 - 0:00 ora_smco_zydb
grid 290870 1 0 09:51:10 - 0:00 ora_rbal_zydb
grid 299156 1 0 09:51:09 - 0:00 ora_smon_zydb
root 303154 217578 0 10:04:24 pts/0 0:00 grep ora_
grid 311412 1 0 09:51:09 - 0:00 ora_lgwr_zydb
grid 323690 1 0 09:51:10 - 0:00 ora_mark_zydb
grid 327782 1 0 09:51:08 - 0:00 ora_mman_zydb
grid 344160 1 0 09:51:08 - 0:00 ora_psp0_zydb
grid 356466 1 0 09:51:07 - 0:00 ora_diag_zydb
grid 364750 1 0 09:52:39 - 0:00 ora_w000_zydb
grid 422032 1 0 09:51:21 - 0:00 ora_arc3_zydb
grid 438436 1 1 09:51:07 - 0:00 ora_vktm_zydb
grid 446608 1 0 09:51:30 - 0:00 ora_cjq0_zydb
grid 454786 1 0 09:51:19 - 0:00 ora_arc0_zydb
grid 233794 1 0 09:51:13 - 0:00 ora_o000_zydb
grid 237920 1 0 09:51:10 - 0:00 ora_mmnl_zydb
grid 262476 1 0 09:51:11 - 0:00 ora_d000_zydb
grid 266582 1 0 09:51:07 - 0:00 ora_gen0_zydb
grid 270746 1 0 09:51:11 - 0:00 ora_s000_zydb
grid 303456 1 0 09:51:08 - 0:00 ora_dbw0_zydb
grid 307596 1 0 09:51:35 - 0:00 ora_q000_zydb
grid 319846 1 0 09:51:10 - 0:00 ora_asmb_zydb
grid 323974 1 0 09:51:08 - 0:00 ora_dbrm_zydb
grid 332144 1 0 09:51:35 - 0:00 ora_q001_zydb
grid 356700 1 0 09:51:07 - 0:00 ora_pmon_zydb
grid 360774 1 0 09:51:20 - 0:00 ora_arc1_zydb
grid 381338 1 0 09:51:08 - 0:00 ora_dia0_zydb
grid 385396 1 0 09:51:09 - 0:00 ora_reco_zydb
grid 410034 1 0 09:51:09 - 0:00 ora_ckpt_zydb
grid 422322 1 0 09:51:25 - 0:00 ora_qmnc_zydb
SQL> select status from v$instance;
STATUS
------------
OPEN
SQL> show parameter pfile;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +DATA/zydb/spfilezydb.ora
SQL> select file_name,tablespace_name,bytes/1024/1024 M from dba_data_files;
FILE_NAME TABLESPACE_NAME M
-------------------------------------------------- ------------------------------ ----------
+DATA/zydb/datafile/users.263.842002951 USERS 5
+DATA/zydb/datafile/undotbs1.264.842002951 UNDOTBS1 90
+DATA/zydb/datafile/sysaux.265.842002951 SYSAUX 500
+DATA/zydb/datafile/system.260.842002951 SYSTEM 680
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- --------------------------------------------- ---
3 ONLINE +DATA/zydb/onlinelog/group_3.266.842003111 NO
3 ONLINE +DATA/zydb/onlinelog/group_3.267.842003113 YES
2 ONLINE +DATA/zydb/onlinelog/group_2.257.842003109 NO
2 ONLINE +DATA/zydb/onlinelog/group_2.256.842003111 YES
1 ONLINE +DATA/zydb/onlinelog/group_1.259.842003107 NO
1 ONLINE +DATA/zydb/onlinelog/group_1.258.842003109 YES
6 rows selected.
SQL> show parameter control_files;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string +DATA/zydb/controlfile/current
.261.842003103, +DATA/zydb/con
trolfile/current.262.842003103
SQL> show parameter pga;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
pga_aggregate_target big integer 0
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 5
Next log sequence to archive 7
Current log sequence 7
SQL> show parameter db_recovery_file_dest;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string +DATA
db_recovery_file_dest_size big integer 3852M
SQL> show parameter memory_max_target;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
memory_max_target big integer 3328M
SQL> show parameter sga;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 3328M
sga_target big integer 0
SQL> show parameter pga_aggregate_target;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
pga_aggregate_target big integer 0
SQL> select value/1024/1024||'M' M from v$pgastat where name like 'total PGA allocated';
M
-----------------------------------------
189.767578125M
監聽自動建立並啟動
$ lsnrctl status
LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.1.0 - Production on 12-MAR-2014 10:17:22
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for IBM/AIX RISC System/6000: Version 11.2.0.1.0 - Production
Start Date 12-MAR-2014 08:59:17
Uptime 0 days 1 hr. 18 min. 6 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File /grid/product/11.2.0/grid2/network/admin/listener.ora
Listener Log File /grid/diag/tnslsnr/kimo1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=kimo1)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "zydb" has 1 instance(s).
Instance "zydb", status READY, has 1 handler(s) for this service...
Service "zydbXDB" has 1 instance(s).
Instance "zydb", status READY, has 1 handler(s) for this service...
The command completed successfully
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26217983/viewspace-1122408/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 11g單機使用asmASM
- 安裝oracle 11g 使用ASM儲存 詳細OracleASM
- aix6.1上安裝oracle 10.2.0.1AIOracle
- oracle 11g 單例項安裝Oracle單例
- 單機環境安裝配置ASM例項ASM
- AIX6.1下 Oracle 10g的安裝AIOracle 10g
- 通過ORACLE VM virtualbox環境安裝oracle 11G RAC(ASM)OracleASM
- 使用silent模式安裝Oracle 11g模式Oracle
- Oracle靜默安裝(單機)Oracle
- 單機安裝Oracle RAC (zt)Oracle
- oracle11Gr2安裝ASM,使用裸裝置OracleASM
- Oracle ASM安裝要點OracleASM
- 12C__單機安裝Grid+Oracle的方法,ASM使用UDEV進行磁碟繫結OracleASMdev
- Window下安裝Oracle ASM單例項資料庫OracleASM單例資料庫
- Oracle10g for AIX6.1安裝問題解決OracleAI
- Oracle 11G資料庫單例項安裝Oracle資料庫單例
- oracle 11g ASM 的管理使用者OracleASM
- AIX6.1下安裝及配置VNCAIVNC
- Aix6.1 安裝 Bash Shell環境AI
- Oracle12.02.1單機安裝Oracle
- Oracle 11G 安裝文件Oracle
- Oracle 11g解除安裝Oracle
- 安裝Oracle RAC 11gOracle
- ORACLE 11G 安裝注意Oracle
- oracle 11g 單例項資料庫的安裝Oracle單例資料庫
- 【Oracle】ASM例項安裝入門OracleASM
- Oracle ASM+11gR2安裝OracleASM
- 探索ORACLE之ASM02_安裝OracleASM
- 10g 單機使用asmASM
- 【ASM】Oracle ASM + 11gR2 + RHEL6.5 安裝ASMOracle
- Oracle 11g ASM 單例項安裝 DBCA 建庫 報錯 ORA-12547: TNS:lost contactOracleASM單例
- Oracle 11G RAC叢集安裝(3)——安裝OracleOracle
- Oracle 11G 安裝 bbed 工具Oracle
- ubuntu中安裝oracle 11gUbuntuOracle
- Oracle 11g 靜默安裝Oracle
- oracle 11g安裝報錯Oracle
- ORACLE 11G完美解除安裝Oracle
- Oracle 11g for linux 安裝OracleLinux