%%%%%%%%%%%%%%%%%%%%%%%%%%
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.
- RAM Swap Space
- Between 1024 MB and 2048 MB 1.5 times the size of RAM
- Between 2049 MB and 8192 MB Equal to the size of RAM
- 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)
- Note:
- The disk space requirement for databases that use Automatic Storage Management or raw device storage is described later in this chapter.
- 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. 查看物理内存大小:
%%%%%%%%%%%%%%%%%%%%%%%%%%
- # /usr/sbin/lsattr -E -l sys0 -a realmem
- realmem 1884160 Amount of usable physical memory in Kbytes False
%%%%%%%%%%%%%%%%%%%%%%%%%%
3. 查看swap的空间:
%%%%%%%%%%%%%%%%%%%%%%%%%%
- # /usr/sbin/lsps -a
- Page Space Physical Volume Volume Group Size %Used Active Auto Type Chksum
- hd6 hdisk0 rootvg 512MB 2 yes yes lv 0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4. 查看/tmp可用空间是否大于400M:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- # df -k /tmp
- Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
- /dev/hd3 1310720 1091056 17% 769 1% /tmp
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5. 查看系统的架构(位数):
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- # /usr/bin/getconf HARDWARE_BITMODE
- 64
%%%%%%%%%%%%%%%%%%%%%%%%%%
6. 查看AIX的版本:
%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7. 查看需要的软件包是否满足:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- # lslpp -l bos.adt.base bos.adt.lib bos.adt.libm bos.perf.perfstat bos.perf.libperfstat bos.perf.proctools
- Fileset Level State Description
- ----------------------------------------------------------------------------
- Path: /usr/lib/objrepos
- bos.adt.base 6.1.6.1 COMMITTED Base Application Development
- Toolkit
- bos.adt.lib 6.1.2.0 COMMITTED Base Application Development
- Libraries
- bos.adt.libm 6.1.1.0 COMMITTED Base Application Development
- Math Library
- bos.perf.libperfstat 6.1.6.1 COMMITTED Performance Statistics Library
- Interface
- bos.perf.perfstat 6.1.6.0 COMMITTED Performance Statistics
- Interface
- bos.perf.proctools 6.1.6.0 COMMITTED Proc Filesystem Tools
- Path: /etc/objrepos
- bos.adt.base 6.1.6.1 COMMITTED Base Application Development
- Toolkit
- bos.perf.libperfstat 6.1.6.1 COMMITTED Performance Statistics Library
- Interface
- bos.perf.perfstat 6.1.6.0 COMMITTED Performance Statistics
- Interface
%%%%%%%%%%%%%%%%%%%%%%%%%%
8. 建立用户及用户组:
%%%%%%%%%%%%%%%%%%%%%%%%%%
- # id oracle
- uid=202(oracle) gid=202(dba) groups=1(staff),201(oinstall)
使用命令 smit user and smit group 去建立用户和组。
用smit security去设置用户相应组别和限制。
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9. 检查用户nobody是否存在:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
如果不存在用smit security建立。
%%%%%%%%%%%%%%%%%%%%%%%%%%
10. 建立相应目录:
%%%%%%%%%%%%%%%%%%%%%%%%%%
- # cd /oracle
- # mkdir -p /oracle/oradata
- # mkdir -p /oracle/admin
- # mkdir -p /oracle/10201
- #
- # chown -R oracle.oinstall /oracle
- #
- # ls -l /oracle
- total 0
- drwxr-xr-x 2 oracle oinstall 256 Nov 07 10:50 10201
- drwxr-xr-x 2 oracle oinstall 256 Nov 07 10:50 admin
- drwxr-xr-x 2 oracle oinstall 256 Nov 07 09:16 lost+found
- drwxr-xr-x 3 oracle oinstall 256 Nov 07 10:39 ora_sw
- drwxr-xr-x 2 oracle oinstall 256 Nov 07 10:50 oradata
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%11. 建立Oracle用户的profile:%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- $ whoami
- oracle
- $ cat ~/.profile
- umask 022
- export AIXTHREAD_SCOPE=S;
- export ORACLE_BASE=/oracle;
- export ORACLE_HOME=$ORACLE_BASE/10201;
- export TMP=/tmp;
- export TMPDIR=$TMP;
- export ORACLE_SID=ORCL;
- PATH=$ORACLE_HOME/bin:/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.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%12. 运行rootpre.sh脚本,然后进行安装:%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- # sh rootpre.sh
- rootpre.sh output will be logged in /tmp/rootpre.out_11-11-07.10:57:47
- Saving the original files in /etc/ora_save_11-11-07.10:57:47....
- Copying new kernel extension to /etc....
- Loading the kernel extension from /etc
- Oracle Kernel Extension Loader for AIX
- Copyright (c) 1998,1999 Oracle Corporation
- Successfully loaded /etc/pw-syscall.64bit_kernel with kmid: 0x50af3000
- Successfully configured /etc/pw-syscall.64bit_kernel with kmid: 0x50af3000
- The kernel extension was successfuly loaded.
- Configuring Asynchronous I/O....
- Asynchronous I/O is not installed on this system.
- You will need to install it, and either configure it yourself using
- 'smit aio' or rerun the Oracle root installation procedure.
- Configuring POSIX Asynchronous I/O....
- Posix Asynchronous I/O is not installed on this system.
- You will need to install it, and either configure it yourself using
- 'smit aio' or rerun the Oracle root installation procedure.
- Checking if group services should be configured....
- Nothing to configure.
- #
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13. 安装oracle软件及建立数据库:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
对于版本信息的报错和警告可以忽略。
dbca后运行的脚本:
- # /oracle/oraInventory/orainstRoot.sh
- Changing permissions of /oracle/oraInventory to 775.
- Changing groupname of /oracle/oraInventory to oinstall.
- The execution of the script is complete
- #
- #
- #
- # /oracle/10201/root.sh
- Running Oracle10 root.sh script...
- The following environment variables are set as:
- ORACLE_OWNER= oracle
- ORACLE_HOME= /oracle/10201
- 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.
- #
- #
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
14. 安装完毕进入sqlplus测试:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- # su - oracle
- $ sqlplus / as sysdba
- SQL*Plus: Release 10.2.0.1.0 - Production on Mon Nov 7 13:47:01 2011
- Copyright (c) 1982, 2005, Oracle. All rights reserved.
- Connected to:
- Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
- With the Partitioning, OLAP and Data Mining options
- SQL> exit
- Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
- With the Partitioning, OLAP and Data Mining options
- $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15. 可能碰到的错误:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15.1. 文件太大:
- ftp> mget 10gr2_aix5l64_database.cpio.gz
- mget 10gr2_aix5l64_database.cpio.gz? y
- 200 PORT command successful.
- 150 Opening BINARY mode data connection for 10gr2_aix5l64_database.cpio.gz (1268576110 bytes).
- 10gr2_aix5l64_database.cpio.gz: short write
- No space left on device/filesize limit exceeded.
- 500 Unsupported command during transfer.
- 226- [Ul: 77067.2MB] [Dl: 1654337.2MB] [Speed: 4626.68K/s] [Free: 707252MB]
- 226 [Section: DEFAULT] [Credits: 14.6MB] [Ratio: Unlimited]
- 1073741824 bytes received in 225.4 seconds (4653 Kbytes/s)
- local: 10gr2_aix5l64_database.cpio.gz remote: 10gr2_aix5l64_database.cpio.gz
- ftp> bye
- 以及
- # gunzip 10gr2_aix5l64_database.cpio.gz
- 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包。
再次检查缺失包已经安装完毕:
- # 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
- Fileset Level State Description
- ----------------------------------------------------------------------------
- Path: /usr/lib/objrepos
- bos.adt.base 6.1.6.1 COMMITTED Base Application Development
- Toolkit
- bos.adt.lib 6.1.2.0 COMMITTED Base Application Development
- Libraries
- bos.adt.libm 6.1.1.0 COMMITTED Base Application Development
- Math Library
- bos.adt.prof 6.1.6.1 COMMITTED Base Profiling Support
- bos.cifs_fs.rte 6.1.1.0 COMMITTED Runtime for SMBFS
- bos.perf.libperfstat 6.1.6.1 COMMITTED Performance Statistics Library
- Interface
- bos.perf.perfstat 6.1.6.0 COMMITTED Performance Statistics
- Interface
- bos.perf.proctools 6.1.6.0 COMMITTED Proc Filesystem Tools
- Path: /etc/objrepos
- bos.adt.base 6.1.6.1 COMMITTED Base Application Development
- Toolkit
- bos.cifs_fs.rte 6.1.1.0 COMMITTED Runtime for SMBFS
- bos.perf.libperfstat 6.1.6.1 COMMITTED Performance Statistics Library
- Interface
- bos.perf.perfstat 6.1.6.0 COMMITTED Performance Statistics
- Interface
- #