分类: Oracle
2010-06-10 17:39:14
# oslevel -r
5300-06
Oracle 10gR2对AIX的系统要求:
AIX 5L version 5.2, Maintenance Level 04 or later
AIX 5L version 5.3, Maintenance Level 02 or later
--ML为06,所以AIX符合要求
RAM:至少1G内存
# lsattr sys0 realmem
realmem 2097152 Amount of usable physical memory in Kbytes False
--物理内存为2G,符合要求
SWAP:
1024 MB ~ 2048 MB RAM的1.5倍
2049 MB ~ 8192 MB 与RAM相等
大于8192 MB RAM的0.75倍
# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type
paging00 hdisk1 rootvg 4096MB 1 yes yes lv
hd6 hdisk1 rootvg 512MB 7 yes yes lv
大约4G的swap空间。
/tmp目录:400MB
至少3G的磁盘空间用于安装Oracle软件[跳过,后面会手工创建lv及分区]
1.2 GB 用于预装的数据库实例(可选)
# df
Filesystem MB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 1024.00 933.70 9% 1898 1% /
/dev/hd2 2048.00 659.87 68% 34305 7% /usr
/dev/hd9var 64.00 22.64 65% 511 4% /var
/dev/hd3 1024.00 988.61 4% 101 1% /tmp
/dev/hd1 64.00 28.39 56% 195 2% /home
/proc - - - - - /proc
/dev/hd10opt 64.00 1.39 98% 1197 8% /opt
/dev/ora9ilv 15360.00 4997.45 68% 71206 6% /dev9i
/dev/oradatalv 4224.00 4223.04 1% 4 1% /oradata
#getconf HARDWARE_BITMODE
64
软件包:
# lslpp -l bos.adt.base bos.adt.lib bos.adt.libm bos.perf.perfstat bos.perf.libperfstat bos.perf.proctools
补丁包:
/usr/sbin/instfix -i -k "IY63133 IY64978 IY63366 \ IY64691 IY65001 IY64737 IY64361 IY65305 IY58350 \ IY63533"
# lspv
hdisk0 000b56cc003e6bce None
hdisk1 000b76dffa31f5cc rootvg active
pv即LVM[逻辑卷管理]中的物理卷-和物理磁盘一一对应
hdisk0物理卷未分配vg。
将hdisk1配置为PV:
#chdev -l hdisk0 -a pv=yes
创建vg:
#mkvg -s 2 -t 2 -y oraclevg hdisk0
激活vg:
#varyonvg oraclevg
使用smit菜单
#smit lv
vg填写刚创建的oraclevg
#lsvg oraclevg
因为PP[物理分区]=LP[逻辑分区]的size,为64MB
规划LV的大小为15G,包括两个分区/oracle—10G和/oradata—5G,所以在lv创建时指定Number of Logical Partions为Round(15000/64)=235个
Oracle的AIX安装包为1.2G,需修改AIX的limits文件,否则无法上传
#vi /etc/security/limits
default的fsize修改成-1
gunzip 10gr2_aix5l64_database.cpio.gz
cpio - < 10gr2_aix5l64_database.cpio
#mkgroup oinstall
#mkgroup dba
#useradd -g oinstall -G dba -d /home/oracle oracle
使用id命令检验主组[primary group/initial group]与副组
#id oracle
uid=209(oracle) gid=203(oinstall) groups=204(dba)
修改/oracle的所属用户
#chown - oracle:oinstall /oracle
vi /etc/security/limits
在末尾添加用户oracle的限额:
default:
fsize = -1
core = 2097151
cpu = -1
data = 262144
rss = 65536
stack = 65536
nofiles = 2000
root:
daemon:
bin:
sys:
adm:
uucp:
guest:
nobody:
lpd:
oracle:
data = -1
stack = -1
-1为无限制使用
#vi /home/oracle/.profile
在profile中添加:
ORACLE_BASE=/oracle;export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0;export ORACLE_HOME
ORACLE_SID=orcl;export ORACLE_SID
PATH=$ORACLE_HOME/bin:$PATH;export PATH
export DISPLAY=本机的IP地址:0.0
如
export DISPLAY=172.16.4.111:0.0
先启动Xmanager然后执行runInstall.sh脚本,根据GUI向导进行oracle的安装
插入AIX的安装光盘,使用smit中的install all available software找到所需要的filesets。
忽略system patch 检验
新开一个session,使用root登陆,执行两个脚本:
/oracle/oraInventory/orainstRoot.sh
Changing permissions of /oracle/oraInventory to 775.
Changing groupname of /oracle/oraInventory to oinstall.
/oracle/product/10.2.0/root.sh
Running Oracle10 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /oracle/product/10.2.0
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.