Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1657409
  • 博文数量: 292
  • 博客积分: 10791
  • 博客等级: 上将
  • 技术积分: 2479
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-20 21:06
文章分类

全部博文(292)

文章存档

2011年(31)

2010年(261)

分类: Oracle

2010-03-26 20:44:35

AIX 5.3上安装Oracle 10.2.0.1

1、检查软硬件需求

# 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内存

# lscfg -vl sys0

sys0 System Object

# 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

2、创建vg

# 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

3、创建lv

使用smit菜单

#smit lv

clip_image002_thumb1[1]

vg填写刚创建的oraclevg

#lsvg oraclevg

clip_image005_thumb1[1]

因为PP[物理分区]=LP[逻辑分区]的size,为64MB

规划LV的大小为15G,包括两个分区/oracle—10G和/oradata—5G,所以在lv创建时指定Number of Logical Partions为Round(15000/64)=235个

4、ftp将database的gz包上传至服务器

Oracle的AIX安装包为1.2G,需修改AIX的limits文件,否则无法上传

#vi /etc/security/limits

default的fsize修改成-1

5、解压缩gz包

gunzip 10gr2_aix5l64_database.cpio.gz

6、解压缩cpio包

cpio - < 10gr2_aix5l64_database.cpio

7、创建用户oracle,用户组oinstall和dba,修改安装目标目录/oracle的所有者

#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

8、修改用户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为无限制使用

9、修改用户oracle的profile,添加环境变量

#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

10、以root执行rootpre.sh

11、以oracle用户登陆,设置DISPLAY参数并安装

export DISPLAY=本机的IP地址:0.0

export DISPLAY=172.16.4.111:0.0

先启动Xmanager然后执行runInstall.sh脚本,根据GUI向导进行oracle的安装

其间出现的问题:

缺包(filesets):Check complete. The overall result of this check is: Passed

=============================================================

Checking operating system package requirements ...

Checking for bos.adt.base(0.0); found bos.adt.base(5.3.0.61). Passed

Checking for bos.adt.lib(0.0); found bos.adt.lib(5.3.0.60). Passed

Checking for bos.adt.libm(0.0); found bos.adt.libm(5.3.0.60). Passed

Checking for bos.perf.libperfstat(0.0); found bos.perf.libperfstat(5.3.0.60). Passed

Checking for bos.perf.perfstat(0.0); found bos.perf.perfstat(5.3.0.60). Passed

Checking for bos.perf.proctools(0.0); found bos.perf.proctools(5.3.0.61). Passed

Check complete. The overall result of this check is: Passed

============================================================

Checking recommended operating system patches

Checking for IY59386(bos.rte.bind_cmds,5.3.0.1); found (bos.rte.bind_cmds,5.3.0.60). Passed

Checking for IY60930(bos.mp,5.3.0.1); found (bos.mp,5.3.0.61). Passed

Checking for IY60930(bos.mp64,5.3.0.1); found (bos.mp64,5.3.0.61). Passed

Checking for IY66513(bos.mp64,5.3.0.20); found (bos.mp64,5.3.0.61). Passed

Checking for IY66513(bos.mp,5.3.0.20); found (bos.mp,5.3.0.61). Passed

Checking for IY70159(bos.mp,5.3.0.22); found (bos.mp,5.3.0.61). Passed

Checking for IY70159(bos.mp64,5.3.0.22); found (bos.mp64,5.3.0.61). Passed

Checking for IY58143(bos.mp64,5.3.0.1); found (bos.mp64,5.3.0.61). Passed

Checking for IY58143(bos.acct,5.3.0.1); found (bos.acct,5.3.0.60). Passed

Checking for IY58143(bos.adt.include,5.3.0.1); found (bos.adt.include,5.3.0.61). Passed

Checking for IY58143(bos.adt.libm,5.3.0.1); found (bos.adt.libm,5.3.0.60). Passed

Checking for IY58143(bos.adt.prof,5.3.0.1); found Not found. Failed <<<<

Checking for IY58143(bos.alt_disk_install.rte,5.3.0.1); found (bos.alt_disk_install.rte,5.3.0.60). Passed

Checking for IY58143(bos.cifs_fs.rte,5.3.0.1); found Not found. Failed <<<<

Checking for IY58143(bos.diag.com,5.3.0.1); found (bos.diag.com,5.3.0.61). Passed

Checking for IY58143(bos.perf.libperfstat,5.3.0.1); found (bos.perf.libperfstat,5.3.0.60). Passed

Checking for IY58143(bos.perf.perfstat,5.3.0.1); found (bos.perf.perfstat,5.3.0.60). Passed

Checking for IY58143(bos.perf.tools,5.3.0.1); found (bos.perf.tools,5.3.0.61). Passed

Checking for IY58143(bos.rte.boot,5.3.0.1); found (bos.rte.boot,5.3.0.60). Passed

Checking for IY58143(bos.rte.archive,5.3.0.1); found (bos.rte.archive,5.3.0.60). Passed

Checking for IY58143(bos.rte.bind_cmds,5.3.0.1); found (bos.rte.bind_cmds,5.3.0.60). Passed

Checking for IY58143(bos.rte.control,5.3.0.1); found (bos.rte.control,5.3.0.61). Passed

Checking for IY58143(bos.rte.filesystem,5.3.0.1); found (bos.rte.filesystem,5.3.0.61). Passed

Checking for IY58143(bos.rte.install,5.3.0.1); found (bos.rte.install,5.3.0.61). Passed

Checking for IY58143(bos.rte.libc,5.3.0.1); found (bos.rte.libc,5.3.0.61). Passed

Checking for IY58143(bos.rte.lvm,5.3.0.1); found (bos.rte.lvm,5.3.0.61). Passed

Checking for IY58143(bos.rte.man,5.3.0.1); found (bos.rte.man,5.3.0.60). Passed

Checking for IY58143(bos.rte.methods,5.3.0.1); found (bos.rte.methods,5.3.0.61). Passed

Checking for IY58143(bos.rte.security,5.3.0.1); found (bos.rte.security,5.3.0.61). Passed

Checking for IY58143(bos.rte.serv_aid,5.3.0.1); found (bos.rte.serv_aid,5.3.0.61). Passed

Check complete. The overall result of this check is: Failed <<<<

Problem: Some recommended patches are missing (see above).

Recommendation: You may actually have installed patches which have obsoleted these, in which case you can successfully continue with the install. If you have not, it is recommended that you do not continue. Refer to the readme to find out how to get the missing patches.

插入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.

注:如果多次运行了runInstaller后需要清除/tmp目录下的安装日志,否则/tmp目录将会空间不足。

卸载AIX上的Oracle:

1、停止oracle相关进程

#ps -Af|grep oracle

oracle 114800 1 0 11:00:30 - 0:05 ora_smon_orcl

oracle 143462 1 0 11:00:30 - 0:02 ora_ckpt_orcl

oracle 225490 340080 0 11:06:09 - 0:36 /oracle/product/10.2.0/jdk/bin/java.bin -Dibm.stream.nio=true -Djava.awt.headless=true -Doracle.oc4j.localhome=/oracle/product/10.2.0/sqlplus -Djava.security.properties=/oracle/product/10.2.0/oc4j/j2ee/home/config/jazn.security.props -jar /oracle/product/10.2.0/oc4j/j2ee/home/oc4j.jar -config /oracle/product/10.2.0/oc4j/j2ee/isqlplus/config/server.xml

oracle 258296 1 0 10:42:41 - 0:00 /oracle/product/10.2.0/bin/tnslsnr LISTENER -inherit

oracle 274492 348184 0 09:26:11 pts/8 0:00 -ksh

oracle 294984 442416 0 09:15:28 pts/6 0:00 -ksh

oracle 315542 1 0 12:21:45 - 0:00 oracleorcl (LOCAL=NO)

oracle 340080 1 0 11:06:09 - 0:00 /bin/sh /oracle/product/10.2.0/jdk/bin/java -Djava.awt.headless=true -Doracle.oc4j.localhome=/oracle/product/10.2.0/sqlplus -Djava.security.properties=/oracle/product/10.2.0/oc4j/j2ee/home/config/jazn.security.props -jar /oracle/product/10.2.0/oc4j/j2ee/home/oc4j.jar -config /oracle/product/10.2.0/oc4j/j2ee/isqlplus/config/server.xml

oracle 352412 1 0 11:00:29 - 0:01 ora_dbw0_orcl

oracle 385088 1 0 11:00:29 - 0:01 ora_mman_orcl

oracle 405514 245806 0 08:29:44 pts/0 0:00 -ksh

oracle 409690 450614 0 11:02:27 - 1:23 /oracle/product/10.2.0/jdk/bin/java.bin -Dibm.stream.nio=true -Xmx256M -DORACLE_HOME=/oracle/product/10.2.0 -Doracle.home=/oracle/product/10.2.0/oc4j -Doracle.oc4j.localhome=/oracle/product/10.2.0/hzmcaix_orcl/sysman -DEMSTATE=/oracle/product/10.2.0/hzmcaix_orcl -Doracle.j2ee.dont.use.memory.archive=true -Djava.protocol.handler.pkgs=HTTPClient -Doracle.security.jazn.config=/oracle/product/10.2.0/oc4j/j2ee/OC4J_DBConsole_hzmcaix_orcl/config/jazn.xml -Djava.security.policy=/oracle/product/10.2.0/oc4j/j2ee/OC4J_DBConsole_hzmcaix_orcl/config/java2.policy -Djava.security.properties=/oracle/product/10.2.0/oc4j/j2ee/home/config/jazn.security.props -DEMDROOT=/oracle/product/10.2.0/hzmcaix_orcl -Dsysman.md5password=true -Drepapi.oracle.home=/oracle/product/10.2.0 -Ddisable.checkForUpdate=true -Djava.awt.headless=true -jar /oracle/product/10.2.0/oc4j/j2ee/home/oc4j.jar -config /oracle/product/10.2.0/oc4j/j2ee/OC4J_DBConsole_hzmcaix_orcl/config/server.xml

oracle 413706 1 0 11:00:29 - 0:00 ora_psp0_orcl

oracle 422016 1 1 11:00:29 - 0:02 ora_pmon_orcl

oracle 434412 708650 0 12:48:07 pts/2 0:00 -ksh

oracle 450614 565438 0 11:02:26 - 0:00 /bin/sh /oracle/product/10.2.0/jdk/bin/java -Xmx256M -DORACLE_HOME=/oracle/product/10.2.0 -Doracle.home=/oracle/product/10.2.0/oc4j -Doracle.oc4j.localhome=/oracle/product/10.2.0/hzmcaix_orcl/sysman -DEMSTATE=/oracle/product/10.2.0/hzmcaix_orcl -Doracle.j2ee.dont.use.memory.archive=true -Djava.protocol.handler.pkgs=HTTPClient -Doracle.security.jazn.config=/oracle/product/10.2.0/oc4j/j2ee/OC4J_DBConsole_hzmcaix_orcl/config/jazn.xml -Djava.security.policy=/oracle/product/10.2.0/oc4j/j2ee/OC4J_DBConsole_hzmcaix_orcl/config/java2.policy -Djava.security.properties=/oracle/product/10.2.0/oc4j/j2ee/home/config/jazn.security.props -DEMDROOT=/oracle/product/10.2.0/hzmcaix_orcl -Dsysman.md5password=true -Drepapi.oracle.home=/oracle/product/10.2.0 -Ddisable.checkForUpdate=true -Djava.awt.headless=true -jar /oracle/product/10.2.0/oc4j/j2ee/home/oc4j.jar -config /oracle/product/10.2.0/oc4j/j2ee/OC4J_DBConsole_hzmcaix_orcl/config/server.xml

oracle 459006 434412 3 12:48:38 pts/2 0:00 ps -Af

oracle 475140 1 0 11:00:29 - 0:01 ora_lgwr_orcl

oracle 512074 1 0 11:00:31 - 0:00 ora_s000_orcl

oracle 520292 1 0 11:00:42 - 0:00 ora_qmnc_orcl

oracle 524300 1 0 11:00:30 - 0:04 ora_cjq0_orcl

oracle 544924 1 0 11:00:53 - 0:00 ora_q001_orcl

oracle 565438 1 0 11:02:19 - 0:01 /oracle/product/10.2.0/perl/bin/perl /oracle/product/10.2.0/bin/emwd.pl dbconsole /oracle/product/10.2.0/hzmcaix_orcl/sysman/log/emdb.nohup

oracle 577734 1 0 11:00:31 - 0:00 ora_d000_orcl

oracle 585842 1 0 11:00:53 - 0:01 ora_q000_orcl

oracle 606384 1 0 11:00:31 - 0:07 ora_mmnl_orcl

oracle 614628 1 0 11:00:31 - 0:05 ora_mmon_orcl

oracle 622650 1 0 11:00:30 - 0:00 ora_reco_orcl

oracle 634990 434412 0 12:48:38 pts/2 0:00 grep oracle

oracle 639092 1 0 11:04:11 - 0:15 oracleorcl (LOCAL=NO)

oracle 643196 1 0 11:04:50 - 0:17 oracleorcl (LOCAL=NO)

oracle 647270 565438 0 11:04:45 - 0:19 /oracle/product/10.2.0/bin/emagent

oracle 651338 1 0 11:04:11 - 0:15 oracleorcl (LOCAL=NO)

oracle 655430 1 0 11:04:11 - 0:04 oracleorcl (LOCAL=NO)

oracle 663648 1 0 11:04:59 - 0:07 oracleorcl (LOCAL=NO)

oracle 671940 1 0 12:48:10 - 0:00 ora_j000_orcl

oracle服务dbconsolelistener都需要关闭:

#sqlplus中shutdown

#emctl stop dbconsole

#lsnrctl stop

再次查询,仍有相关进程:

$ ps -Af|grep oracle

oracle 225490 340080 1 11:06:09 - 0:38 /oracle/product/10.2.0/jdk/bin/java.bin -Dibm.stream.nio=true -Djava.awt.headless=true -Doracle.oc4j.localhome=/oracle/product/10.2.0/sqlplus -Djava.security.properties=/oracle/product/10.2.0/oc4j/j2ee/home/config/jazn.security.props -jar /oracle/product/10.2.0/oc4j/j2ee/home/oc4j.jar -config /oracle/product/10.2.0/oc4j/j2ee/isqlplus/config/server.xml

oracle 258130 434412 0 13:02:08 pts/2 0:00 grep oracle

oracle 274492 348184 0 09:26:11 pts/8 0:00 -ksh

oracle 294984 442416 0 09:15:28 pts/6 0:00 -ksh

oracle 340080 1 0 11:06:09 - 0:00 /bin/sh /oracle/product/10.2.0/jdk/bin/java -Djava.awt.headless=true -Doracle.oc4j.localhome=/oracle/product/10.2.0/sqlplus -Djava.security.properties=/oracle/product/10.2.0/oc4j/j2ee/home/config/jazn.security.props -jar /oracle/product/10.2.0/oc4j/j2ee/home/oc4j.jar -config /oracle/product/10.2.0/oc4j/j2ee/isqlplus/config/server.xml

oracle 405514 245806 0 08:29:44 pts/0 0:00 -ksh

oracle 434412 708650 1 12:48:07 pts/2 0:00 -ksh

oracle 450792 434412 3 13:02:08 pts/2 0:00 ps –Af

2、查询锁住文件系统/oracle的所有进程id

# fuser - /oracle

/oracle: 221300c 262222c 274492c 294984c 430308c 626902c

查询是什么进程,举进程号为221300进程为例:

# ps -ef|grep 221300

root 221300 430308 0 Jan 12 pts/4 0:17 gzip -dc 10gr2_aix5l64_database.cpio.gz

root 639008 233710 0 13:35:06 pts/1 0:00 grep 221300

如果不是重要的进程,kill掉所有锁住文件系统的相关进程

# fuser -ck /oracle

/oracle: 221300c 262222c 274492c 294984c 430308c 626902c

卸载/oracle文件系统

# umount /oracle

通过smit删除所有lv和其上的文件系统

清除oracle在/etc下的配置文件:

#rm oraInst.loc

#rm oratab

 

安装和配置SSH

分别下载两个安装包:

将两个安装包ftp至AIX上(使用二进制模式)。

解包两个文件。

installp - – /home/oracle/ssl openssl.base

installp -YaX –d /home/oracle/ssh openssh.base #使用Y参数表示接受license

注:先安装SSL,后安装SSH

 

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

补充知识:

有用的命令

1、topas--类似于Linux的Top

2、lsgroup ALL--显示所有的用户组

3、mkgroup group_name--创建组

4、mount光盘:mount - - cdrfs /dev/cd0 /mnt (cdrfs:fs类型,/dev/cd0:device,/mnt:挂载点)

5、tar – *.tar—解压缩一个tar包

6解压.Z格式的压缩包

AIX installp 软件包基本概念

fileset

在 AIX 5L 操作系统的文件打包结构中,把文件分成了许多 fileset 。每个 fileset 包含的是一组逻辑上相关的文件。例如:与 TCP/IP 客户端功能相关的文件都打包在 bos.net.tcp.client fileset 中。fileset 是最小的可独立安装实体,每个 fileset 都是可以单独安装、升级、卸载的。Fileset 的版本号由四个域组成,分别是:Version, Release, Maintenance level 和 Fix level 组成,称作 VRMF。(例如: bos.rte 5.3.0.0 表示 version 域为 5, release 域为 3, Maintenance level 域为 0 , Fix level 域为 0)。

package

多个相关的 fileset 可以被打包到一起,形成一个安装镜像或者一个 BFF(Backup Format File),也被称为 package 。通常,一个 package 里可以包含一个或者多个 fileset。

LPP(Licensed Program Product)

LPP 就像他的英文定义一样,对于用户来说 LPP 是用户可以用来购买的产品。它可以是一系列的 package 或者只是一个单独的 package。一般情况下,用户可以选择不一次购买整个 LPP 而只是购买其中的几个 package。

PTF 与APAR的区别?

解答 PTF是Program Temporary Fix的简称。 一个PTF是指一个升级的文件束(fileset)或着一个修正了以前操作系统问题的文件束。使用installp命令安装。

APAR 是Authorized Program Analysis Report的简称。 一个APAR指的是一个特殊的或着紧急的fix、e-fix, 对操作系统而言是单一性的错误问题。APAR有可能经过测试和认证后成为PTT。 APAR使用instfix命令安装。

之间的关系

由图 1 可以清楚的看到,例子中的每个 package 都只包含有一个 fileset,而 CSM

LPP 包含 csm.core, csm.deploy 及 csm.server 3 个 package.

clip_image011_thumb1[1]

未解决:

用telnet开远程,无法使用F功能键。而dtterm可以。

使用smit安装filesets无法接受license。

-EOF-

阅读(4913) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~