AIX6.1下 Oracle 10g的安裝

zhouxianwang發表於2015-02-06
%%%%%%%%%%%%%%%%%%%%%%%%%%
1.系統需要的基本資訊如下:
%%%%%%%%%%%%%%%%%%%%%%%%%%
  1. The system must meet the following minimum hardware requirements:
  •   At least 1024 MB of physical RAM
  •   The following table describes the relationship between installed RAM and the configured swap space requirement.
  1. RAM                               Swap Space

  2. Between 1024 MB and 2048 MB       1.5 times the size of RAM

  3. Between 2049 MB and 8192 MB       Equal to the size of RAM

  4. More than 8192 MB                 0.75 times the size of RAM
  •   400 MB of disk space in the /tmp directory
  •   Up to 3 GB of disk space for the Oracle software, depending on the installation type
  •   1.2 GB of disk space for a preconfigured database that uses file system storage (optional)
  1. Note:
  2. The disk space requirement for databases that use Automatic Storage Management or raw device storage is described later in this chapter.
  3. Additional disk space, either on a file system or in an Automatic Storage Management disk group, is required for the flash recovery area if you choose to configure automated backups.


%%%%%%%%%%%%%%%%%%%%%%%%%%
2. 檢視實體記憶體大小:
%%%%%%%%%%%%%%%%%%%%%%%%%%
  1. # /usr/sbin/lsattr -E -l sys0 -a realmem
  2. realmem 1884160 Amount of usable physical memory in Kbytes False


%%%%%%%%%%%%%%%%%%%%%%%%%%
3. 檢視swap的空間:
%%%%%%%%%%%%%%%%%%%%%%%%%%
  1. # /usr/sbin/lsps -a
  2. Page Space Physical Volume Volume Group Size %Used Active Auto Type Chksum
  3. hd6 hdisk0 rootvg 512MB 2 yes yes lv 0


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4. 檢視/tmp可用空間是否大於400M:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1. # df -k /tmp
  2. Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
  3. /dev/hd3 1310720 1091056 17% 769 1% /tmp


%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5. 檢視系統的架構(位數):
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1. # /usr/bin/getconf HARDWARE_BITMODE
  2. 64

%%%%%%%%%%%%%%%%%%%%%%%%%%

6. 檢視AIX的版本:
%%%%%%%%%%%%%%%%%%%%%%%%%%
  1. # oslevel -r
  2. 6100-01


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7. 檢視需要的軟體包是否滿足:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1. # lslpp -l bos.adt.base bos.adt.lib bos.adt.libm bos.perf.perfstat bos.perf.libperfstat bos.perf.proctools
  2.   Fileset Level State Description
  3.   ----------------------------------------------------------------------------
  4. Path: /usr/lib/objrepos
  5.   bos.adt.base 6.1.6.1 COMMITTED Base Application Development
  6.                                                  Toolkit
  7.   bos.adt.lib 6.1.2.0 COMMITTED Base Application Development
  8.                                                  Libraries
  9.   bos.adt.libm 6.1.1.0 COMMITTED Base Application Development
  10.                                                  Math Library
  11.   bos.perf.libperfstat 6.1.6.1 COMMITTED Performance Statistics Library
  12.                                                  Interface
  13.   bos.perf.perfstat 6.1.6.0 COMMITTED Performance Statistics
  14.                                                  Interface
  15.   bos.perf.proctools 6.1.6.0 COMMITTED Proc Filesystem Tools

  16. Path: /etc/objrepos
  17.   bos.adt.base 6.1.6.1 COMMITTED Base Application Development
  18.                                                  Toolkit
  19.   bos.perf.libperfstat 6.1.6.1 COMMITTED Performance Statistics Library
  20.                                                  Interface
  21.   bos.perf.perfstat 6.1.6.0 COMMITTED Performance Statistics
  22.                                                  Interface


%%%%%%%%%%%%%%%%%%%%%%%%%%
8. 建立使用者及使用者組:
%%%%%%%%%%%%%%%%%%%%%%%%%%
  1. # id oracle
  2. uid=202(oracle) gid=202(dba) groups=1(staff),201(oinstall)

使用命令 smit user and smit group 去建立使用者和組。

用smit security去設定使用者相應組別和限制。

  1. # passwd oracle


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9. 檢查使用者nobody是否存在:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1. # id nobody

如果不存在用smit security建立。


%%%%%%%%%%%%%%%%%%%%%%%%%%
10. 建立相應目錄:
%%%%%%%%%%%%%%%%%%%%%%%%%%
  1. # cd /oracle
  2. # mkdir -p /oracle/oradata
  3. # mkdir -p /oracle/admin
  4. # mkdir -p /oracle/10201
  5. #
  6. # chown -R oracle.oinstall /oracle
  7. #
  8. # ls -l /oracle
  9. total 0
  10. drwxr-xr-x 2 oracle oinstall 256 Nov 07 10:50 10201
  11. drwxr-xr-x 2 oracle oinstall 256 Nov 07 10:50 admin
  12. drwxr-xr-x 2 oracle oinstall 256 Nov 07 09:16 lost+found
  13. drwxr-xr-x 3 oracle oinstall 256 Nov 07 10:39 ora_sw
  14. drwxr-xr-x 2 oracle oinstall 256 Nov 07 10:50 oradata

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11. 建立Oracle使用者的profile:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1. $ whoami
  2. oracle

  3. $ cat ~/.profile

  4. umask 022
  5. export AIXTHREAD_SCOPE=S;
  6. export ORACLE_BASE=/oracle;
  7. export ORACLE_HOME=$ORACLE_BASE/10201;
  8. export TMP=/tmp;
  9. export TMPDIR=$TMP;
  10. export ORACLE_SID=ORCL;

  11. PATH=$ORACLE_HOME/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.

  12. export PATH

  13. if [ -s "$MAIL" ] # This is at Shell startup. In normal
  14. then echo "$MAILMSG" # operation, the Shell checks
  15. fi # periodically.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12. 執行rootpre.sh指令碼,然後進行安裝:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1. # sh rootpre.sh
  2. rootpre.sh output will be logged in /tmp/rootpre.out_11-11-07.10:57:47
  3. Saving the original files in /etc/ora_save_11-11-07.10:57:47....
  4. Copying new kernel extension to /etc....
  5. Loading the kernel extension from /etc

  6. Oracle Kernel Extension Loader for AIX
  7.        Copyright (c) 1998,1999 Oracle Corporation


  8. Successfully loaded /etc/pw-syscall.64bit_kernel with kmid: 0x50af3000
  9. Successfully configured /etc/pw-syscall.64bit_kernel with kmid: 0x50af3000
  10. The kernel extension was successfuly loaded.

  11. Configuring Asynchronous I/O....
  12. Asynchronous I/O is not installed on this system.
  13. You will need to install it, and either configure it yourself using
  14. 'smit aio' or rerun the Oracle root installation procedure.

  15. Configuring POSIX Asynchronous I/O....
  16. Posix Asynchronous I/O is not installed on this system.
  17. You will need to install it, and either configure it yourself using
  18. 'smit aio' or rerun the Oracle root installation procedure.

  19. Checking if group services should be configured....
  20. Nothing to configure.
  21. #


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13. 安裝oracle軟體及建立資料庫:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
對於版本資訊的報錯和警告可以忽略。

dbca後執行的指令碼:
  1. # /oracle/oraInventory/orainstRoot.sh
  2. Changing permissions of /oracle/oraInventory to 775.
  3. Changing groupname of /oracle/oraInventory to oinstall.
  4. The execution of the script is complete
  5. #
  6. #
  7. #
  8. # /oracle/10201/root.sh
  9. Running Oracle10 root.sh script...

  10. The following environment variables are set as:
  11.     ORACLE_OWNER= oracle
  12.     ORACLE_HOME= /oracle/10201

  13. Enter the full pathname of the local bin directory: [/usr/local/bin]:
  14. Creating /usr/local/bin directory...
  15.    Copying dbhome to /usr/local/bin ...
  16.    Copying oraenv to /usr/local/bin ...
  17.    Copying coraenv to /usr/local/bin ...


  18. Creating /etc/oratab file...
  19. Entries will be added to the /etc/oratab file as needed by
  20. Database Configuration Assistant when a database is created
  21. Finished running generic part of root.sh script.
  22. Now product-specific root actions will be performed.
  23. #
  24. #


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
14. 安裝完畢進入sqlplus測試:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1. # su - oracle
  2. $ sqlplus / as sysdba

  3. SQL*Plus: Release 10.2.0.1.0 - Production on Mon Nov 7 13:47:01 2011

  4. Copyright (c) 1982, 2005, Oracle. All rights reserved.


  5. Connected to:
  6. Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
  7. With the Partitioning, OLAP and Data Mining options

  8. SQL> exit
  9. Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
  10. With the Partitioning, OLAP and Data Mining options
  11. $


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15. 可能碰到的錯誤:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15.1. 檔案太大:


  1. ftp> mget 10gr2_aix5l64_database.cpio.gz
  2. mget 10gr2_aix5l64_database.cpio.gz? y
  3. 200 PORT command successful.
  4. 150 Opening BINARY mode data connection for 10gr2_aix5l64_database.cpio.gz (1268576110 bytes).
  5. 10gr2_aix5l64_database.cpio.gz: short write
  6. No space left on device/filesize limit exceeded.
  7. 500 Unsupported command during transfer.
  8. 226- [Ul: 77067.2MB] [Dl: 1654337.2MB] [Speed: 4626.68K/s] [Free: 707252MB]
  9. 226 [Section: DEFAULT] [Credits: 14.6MB] [Ratio: Unlimited]
  10. 1073741824 bytes received in 225.4 seconds (4653 Kbytes/s)
  11. local: 10gr2_aix5l64_database.cpio.gz remote: 10gr2_aix5l64_database.cpio.gz
  12. ftp> bye

  13. 以及
  14. # gunzip 10gr2_aix5l64_database.cpio.gz

  15. gunzip: 10gr2_aix5l64_database.cpio: File too large


解決:
透過調整/etc/security/limits裡的
data = -1
fsize = -1

去解決,最好把oracle使用者的相應限制也去掉。

--------------

15.2. 安裝oracle軟體到72%,連結階段時,報錯:
/oracle/10201/precomp/lib/ins_precomp.mk
/oracle/10201/rdbms/lib/ins_rdbms.mk

解決:請安裝相應軟體包,例如:bos.adt.libm或者是bos.cifs_fs.rte包。

  1. # smit install

  2.                                                            Install Software

  3. Type or select values in entry fields.
  4. Press Enter AFTER making all desired changes.
  5.                             
  6.                                                         [Entry Fields]
  7. * INPUT device / directory for software /dev/cd1
  8. * SOFTWARE to install [bos.adt ALL @@I> +
  9.   PREVIEW only? (install operation will NOT occur) no +
  10.   COMMIT software updates? yes +
  11.   SAVE replaced files? no +
  12.   AUTOMATICALLY install requisite software? yes +
  13.   EXTEND file systems if space needed? yes +
  14.   OVERWRITE same or newer versions? no +
  15.   VERIFY install and check file sizes? no +
  16.   Include corresponding LANGUAGE filesets? yes +
  17.   DETAILED output? no +
  18.   Process multiple volumes? yes +
  19.   ACCEPT new license agreements? yes +
  20.   Preview new LICENSE agreements? no +
  21.  
  22.   WPAR Management
  23.       Perform Operation in Global Environment yes +
  24.       Perform Operation on Detached WPARs no +
  25.           Detached WPAR Names [_all_wpars] +
  26.       Remount Installation Device in WPARs yes +
  27.       Alternate WPAR Installation Device []
  28.                             
  29.                             
  30.                             
  31. F1=Help F2=Ref+------------------------------------------------------+ F4=List
  32. Esc+5=Reset Esc+6=| Running command... | Esc+8=Image
  33. Esc+9=Shell Esc+0=+------------------------------------------------------+
  34.                                                             COMMAND STATUS

  35. Command: running stdout: yes stderr: no

  36. Before command completion, additional instructions may appear below.

  37. [MORE...323]
  38. Name Level Part Event Result
  39. -------------------------------------------------------------------------------
  40. bos.cifs_fs.smit 6.1.1.0 USR APPLY SUCCESS
  41. bos.cifs_fs.rte 6.1.1.0 USR APPLY SUCCESS
  42. bos.cifs_fs.smit 6.1.1.0 ROOT APPLY SUCCESS
  43. bos.cifs_fs.rte 6.1.1.0 ROOT APPLY SUCCESS
  44. bos.adt.data 6.1.0.0 SHARE APPLY SUCCESS
  45. bos.adt.utils 6.1.0.0 USR APPLY SUCCESS
  46. bos.adt.syscalls 6.1.1.0 USR APPLY SUCCESS
  47. bos.adt.sccs 6.1.1.0 USR APPLY SUCCESS
  48. bos.adt.samples 6.1.0.0 USR APPLY SUCCESS
  49. bos.adt.prt_tools 6.1.0.0 USR APPLY SUCCESS
  50. bos.adt.libmio 6.1.0.0 USR APPLY SUCCESS
  51. bos.adt.libm 6.1.1.0 USR APPLY SUCCESS
  52. bos.adt.insttools 6.1.1.0 USR APPLY SUCCESS
  53. bos.adt.graphics 6.1.0.0 USR APPLY SUCCESS
  54. bos.adt.debug 6.1.1.0 USR APPLY SUCCESS
  55. bos.adt.insttools 6.1.1.0 ROOT APPLY SUCCESS

  56. File /etc/inittab has been modified.

  57. One or more of the files listed in /etc/check_config.files have changed.
  58.         See /var/adm/ras/config.diff for details.

  59. [BOTTOM]

  60.                                                             COMMAND STATUS

  61. Command: OK stdout: yes stderr: no

  62. Before command completion, additional instructions may appear below.

  63. [TOP]
  64. geninstall -I "a -cgNQqwXY -J" -Z -d /dev/cd1 -f File 2>&1

  65. File:
  66.     I:bos.adt.data 6.1.0.0
  67.     I:bos.adt.debug 6.1.1.0
  68.     I:bos.adt.graphics 6.1.0.0
  69.     I:bos.adt.insttools 6.1.1.0
  70.     I:bos.adt.libm 6.1.1.0
  71.     I:bos.adt.libmio 6.1.0.0
  72.     I:bos.adt.prt_tools 6.1.0.0
  73.     I:bos.adt.samples 6.1.0.0
  74.     I:bos.adt.sccs 6.1.1.0
  75.     I:bos.adt.syscalls 6.1.1.0
  76.     I:bos.adt.utils 6.1.0.0
  77.     I:bos.cifs_fs.rte 6.1.1.0
  78.     I:bos.cifs_fs.smit 6.1.1.0


  79. +-----------------------------------------------------------------------------+
  80.                     Pre-installation Verification...
  81. +-----------------------------------------------------------------------------+
  82. [MORE...326]

  83. F1=Help F2=Refresh F3=Cancel Esc+6=Command
  84. Esc+8=Image Esc+9=Shell Esc+0=Exit /=Find
  85. n=Find Next
                                                    


再次檢查缺失包已經安裝完畢:
  1. # lslpp -l bos.adt.base bos.adt.lib bos.adt.libm bos.perf.perfstat bos.perf.libperfstat bos.perf.proctools bos.adt.prof bos.cifs_fs.rte
  2.   Fileset Level State Description
  3.   ----------------------------------------------------------------------------
  4. Path: /usr/lib/objrepos
  5.   bos.adt.base 6.1.6.1 COMMITTED Base Application Development
  6.                                                  Toolkit
  7.   bos.adt.lib 6.1.2.0 COMMITTED Base Application Development
  8.                                                  Libraries
  9.   bos.adt.libm 6.1.1.0 COMMITTED Base Application Development
  10.                                                  Math Library
  11.   bos.adt.prof 6.1.6.1 COMMITTED Base Profiling Support
  12.   bos.cifs_fs.rte 6.1.1.0 COMMITTED Runtime for SMBFS
  13.   bos.perf.libperfstat 6.1.6.1 COMMITTED Performance Statistics Library
  14.                                                  Interface
  15.   bos.perf.perfstat 6.1.6.0 COMMITTED Performance Statistics
  16.                                                  Interface
  17.   bos.perf.proctools 6.1.6.0 COMMITTED Proc Filesystem Tools

  18. Path: /etc/objrepos
  19.   bos.adt.base 6.1.6.1 COMMITTED Base Application Development
  20.                                                  Toolkit
  21.   bos.cifs_fs.rte 6.1.1.0 COMMITTED Runtime for SMBFS
  22.   bos.perf.libperfstat 6.1.6.1 COMMITTED Performance Statistics Library
  23.                                                  Interface
  24.   bos.perf.perfstat 6.1.6.0 COMMITTED Performance Statistics
  25.                                                  Interface
  26. #



source :http://blog.chinaunix.net/uid-21234197-id-3012790.html

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/27036311/viewspace-1429125/,如需轉載,請註明出處,否則將追究法律責任。

相關文章