准确来说不应该叫安装,因为以前这台AIX服务器装了一次oracle,由于各种原因,数据库被删了,但是ORACLE_HOME里面的东西还在,只需要将某次备份的数据放进去就可以了。闲话少说,开始吧:首先检查用户:[Testserver@14:37:38 /]$iduid=1101(oracle) gid=1000(oinstall) groups=1200(dba)[Testserver@14:37:40 /]$没有问题,oracle在,组也在。看看oracle的环境变量:[Testserver@14:38:32 /]$cat /home/oracle/.profilePATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.export PATHif [ -s "$MAIL" ] # This is at Shell startup. In normalthen echo "$MAILMSG" # operation, the Shell checksfi # periodically.export ORACLE_BASE=/oracle/appexport ORACLE_HOME=/oracle/gridumask 022PATH=$PATH:/oracle/grid/binexport TEMP=/tmpexport TMPDIR=/tmpexport PATH=$PATH:$ORACLE_HOME/bin;export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export PATH=$PATH:$ORACLE_HOME/bin;export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:$ORACLE_HOME/rdbms/lib;export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib;#export DISPLAY;基本完好,只是有些杂七杂八的没用的东西。看看这些路径下有没有东西:[Testserver@14:41:09 /db/app/oracle]$cd /oracle/app/[Testserver@14:42:16 /oracle/app]$ls[Testserver@14:42:18 /oracle/app]$空的,到以前安装的路径下看:[Testserver@14:42:48 /db/app/oracle]$lsadmindiagflash_recovery_areaoradataproduct[Testserver@14:42:49 /db/app/oracle]$cd admin/[Testserver@14:42:58 /db/app/oracle/admin]$ls[Testserver@14:42:58 /db/app/oracle/admin]$cd ..[Testserver@14:43:00 /db/app/oracle]$cd flash_recovery_area/[Testserver@14:43:03 /db/app/oracle/flash_recovery_area]$ls[Testserver@14:43:04 /db/app/oracle/flash_recovery_area]$cd ..[Testserver@14:43:05 /db/app/oracle]$cd oradata/[Testserver@14:43:07 /db/app/oracle/oradata]$lsaix.ppc64_11gR2_database_1of2.zipaix.ppc64_11gR2_database_2of2.zipaix.ppc64_11gR2_grid.zip.filepart[Testserver@14:43:08 /db/app/oracle/oradata]$cd ../product/11.2.0/db_1/[Testserver@14:43:17 /db/app/oracle/product/11.2.0/db_1]$ls[Testserver@14:43:19 /db/app/oracle/product/11.2.0/db_1]$看来只剩下路径了,需要重新安装。还是将环境变量改成以前的:[Testserver@14:43:19 /db/app/oracle/product/11.2.0/db_1]$vi /home/oracle/.profilePATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.export PATHif [ -s "$MAIL" ] # This is at Shell startup. In normalthen echo "$MAILMSG" # operation, the Shell checksfi # periodically.export ORACLE_BASE=/db/app/oracleexport ORACLE_HOME=/db/app/oracle/product/11.2.0/db_1umask 022export TEMP=/tmpexport TMPDIR=/tmpexport PATH=$PATH:$ORACLE_HOME/bin;export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:$ORACLE_HOME/rdbms/lib;export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib;保存退出!检查下空间看够不够:[Testserver@14:53:44 ~]$df -gFilesystemGB blocksFree %UsedIused %Iused Mounted on/dev/hd45.001.7366%126603% //dev/hd210.005.8942%661305% /usr/dev/hd9var10.009.654%83941% /var/dev/hd35.004.2216%153082% /tmp/dev/hd130.0015.8248%1291% /home/dev/hd11admin0.500.501%51% /admin/proc-----/proc/dev/hd10opt2.001.3036%209027% /opt/dev/livedump0.500.501%41% /var/adm/ras/livedump/dev/rsynclv 50.00 29.09 42% 28 1% /rsync/dev/backuplv 20.00 20.00 1% 6 1% /backuplv不够!重新分配,首先卸载/rsync和/backuplv两个filesystemumount -a /rsync 和 /backuplv 然后用smit卸载两个lv。查看:[Testserver@15:00:50 /]#df -gFilesystemGB blocksFree %UsedIused %Iused Mounted on/dev/hd45.001.7366%126563% //dev/hd210.005.8942%661305% /usr/dev/hd9var10.009.654%83941% /var/dev/hd35.004.2216%153082% /tmp/dev/hd130.0015.8248%1291% /home/dev/hd10opt2.001.3036%209027% /opt[Testserver@15:00:51 /]#不见了,查看此vg下还有多少pp:[Testserver@15:00:51 /]#lsvg rootvgVOLUME GROUP:rootvgVG IDENTIFIER:00f6a58b00004c000000013363fb698bVG STATE:activePP SIZE:512 megabyte(s)VG PERMISSION:read/writeTOTAL PPs:539 (275968 megabytes)MAX LVs:256FREE PPs: 312 (159744 megabytes)LVs:13USED PPs:227 (116224 megabytes)OPEN LVs:9QUORUM:2 (Enabled)TOTAL PVs:1VG DESCRIPTORS: 2STALE PVs:0STALE PPs:0ACTIVE PVs:1AUTO ON:yesMAX PPs per VG:32512MAX PPs per PV:1016MAX PVs:32LTG size (Dynamic): 256 kilobyte(s)AUTO SYNC:noHOT SPARE:noBB POLICY:relocatablePV RESTRICTION:none[Testserver@15:01:30 /]#free pps有150多g了,够装了。用smit创建4个lv 分别为:datalv,adminlv,installlv,flashlv,第一个20G,其余的10G。创建好后,在重新将filesystem挂在到这些lv上。以上操作都用smit,过程就不写出来了,傻瓜操作。最后:[Testserver@15:19:35 /]#df -gFilesystemGB blocksFree %UsedIused %Iused Mounted on/dev/hd45.001.7366%126623% //dev/hd210.005.8942%661305% /usr/dev/hd9var10.009.654%83921% /var/dev/hd35.004.2216%153082% /tmp/dev/hd130.0015.8248%1291% /home/dev/hd10opt2.001.3036%209027% /opt/dev/adminlv10.0010.001%41% /db/app/oracle/admin/dev/flashlv10.0010.001%41% /db/app/oracle/flash_recovery_area/dev/datalv20.0020.001%41% /db/app/oracle/oradata/dev/installlv10.0010.001%41% /db/app/oracle/product/11.2.0/db_1[Testserver@15:19:37 /]#大功告成,终于可以开始安装了。将两个 for aix 的oracle 11g r2 安装包依次解压。将本机的xmanager passiv开启,在服务器上输出一个DISPLAY变量[Testserver@15:23:10 /]#export DISPLAY=190.100.100.60:0.0[Testserver@15:23:59 /]#进入到database里面运行.runInstaller 后面的过程就傻瓜安装了,根据提示一步一步进行。
aix 6安装oracle 11g,AIX6.1安装ORACLE 11G R2
![](https://img-home.csdnimg.cn/images/20240711042549.png)