ITPub博客

首页 > 数据库 > Oracle > AIX下安装Oracle

AIX下安装Oracle

Oracle 作者:ilikesport 时间:2014-02-12 16:32:25 0 删除 编辑

创建用户和组:

#mkgroup  -A  dba

# mkgroup  -A  oinstall

建立用户oracle,主目录一般设置为:/oracle

mkuser pgrp='oinstall' groups='dba' home='/oracle' oracle

# passwd oracle

Changing password for "oracle"

oracle's New password:

Enter the new password again:    oracle

修改oracle用户的属性

#smitty user

AIX下安装Oracle

AIX下安装Oracle

AIX下安装Oracle

Soft FILE size 为:-1(文件大小) 

Soft CPU time 为:-1 cpu使用时间 

Soft DATA segment 为:-1(数据块大小)

 Soft STACK size 为: -1 

以上-1 代表使用该用户时参数的内容无限制

 

修改环境变量
# vi /oracle/.profile
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.:
/usr/java14/jre
export PATH
DISPLAY=192.168.0.18:0.0; export DISPLAY
ORACLE_TERM=vt100; export ORACLE_TERM
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_BASE=/oracle
export ORACLE_HOME=$ORACLE_BASE/app/product/10.2.0
export ORACLE_SID=orcl
export ORACLE_TERM=xterm
export PATH=$ORACLE_HOME/bin:$PATH
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
umask 022

if [ -s "$MAIL" ] # This is at Shell startup. In normal
then echo "$MAILMSG" # operation, the Shell checks
fi # periodically.
注意:
DISPLAY=192.168.1.251
;此处的IP地址是将图形界面显示在IP上,如小机本地IP127.0.0.1;如通过Xmanager安装的,此处填写的IP为你机器的IP
安装

解压文件

tar –xvf ……tar.gz

# cd /oracle

# ls

.profile    app         lost+found  setup

# cd setup

# ls

database

# cd database

# ls

doc           rootpre       runInstaller  stage

install       rootpre.sh    smit.log      welcome.html

response      rpm           sshsetup

# ./rootpre.sh

/rootpre.sh output will be logged in /tmp/rootpre.out_07-08-28.05:56:20
Saving the original files in /etc/ora_save_07-08-28.05:56:20....
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: 0x3f0c100
Successfully configured /etc/pw-syscall.64bit_kernel with kmid: 0x3f0c100
The kernel extension was successfuly loaded.

Configuring Asynchronous I/O....

Configuring POSIX Asynchronous I/O....

Checking if group services should be configured....
Nothing to configure.
#export DISPLAY=192.168.0.52:0.0

#xhost +

#su – oracle

$ cd /oracle

$ ls

.profile    app         lost+found  setup

$ cd setup

$ ls

database

$cd database

$ ls

doc           rootpre       runInstaller  stage

install       rootpre.sh    smit.log      welcome.html

response      rpm           sshsetup

$./ runInstaller

AIX下安装Oracle

AIX下安装Oracle

 

 

AIX下安装Oracle

AIX下安装Oracle

AIX下安装Oracle

AIX下安装Oracle

AIX下安装Oracle

AIX下安装Oracle

AIX下安装Oracle

AIX下安装Oracle

AIX下安装Oracle

AIX下安装Oracle

忽略全部,下一步

AIX下安装Oracle

AIX下安装Oracle

# /oracle/oraInventory/orainstRoot.sh

Changing permissions of /oracle/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

 

Changing groupname of /oracle/oraInventory to oinstall.

The execution of the script is complete.

# /oracle/app/product/10.2.0/root.sh

Running Oracle 11g root.sh script...

 

The following environment variables are set as:

    ORACLE_OWNER= oracle

    ORACLE_HOME=  /oracle/app/product/10.2.0

 

Enter the full pathname of the local bin directory: [/usr/local/bin]:

   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.

AIX下安装Oracle

创建监听:

$netca

AIX下安装Oracle

 

AIX下安装Oracle

 

 

AIX下安装Oracle

 

AIX下安装Oracle

 

AIX下安装Oracle

 

AIX下安装Oracle

 

AIX下安装Oracle

启动监听:lsnrctl start  查看监听:lsnrctl status  停止监听:lsnrctl stop 

 

 

启动监听失败:

# su - oracle

$ lsnrctl start

 

LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.1.0 - Production on 11-FEB-2014 13:14:31

 

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

 

Starting /oracle/app/product/10.2.0/bin/tnslsnr: please wait...

 

TNSLSNR for IBM/AIX RISC System/6000: Version 11.2.0.1.0 - Production

System parameter file is /oracle/app/product/10.2.0/network/admin/listener.ora

Log messages written to /oracle/diag/tnslsnr/hlaix/listener/alert/log.xml

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hlaix)(PORT=1521)))

Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))

TNS-12555: TNS:permission denied

 TNS-12560: TNS:protocol adapter error

  TNS-00525: Insufficient privilege for operation

   IBM/AIX RISC System/6000 Error: 1: Not owner

 

Listener failed to start. See the error message(s) above...

 

 

解决办法:

cd /tmp

chown oracle:oinstall .oracle

 

$ lsnrctl start

 

LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.1.0 - Production on 11-FEB-2014 13:24:50

 

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

 

Starting /oracle/app/product/10.2.0/bin/tnslsnr: please wait...

 

TNSLSNR for IBM/AIX RISC System/6000: Version 11.2.0.1.0 - Production

System parameter file is /oracle/app/product/10.2.0/network/admin/listener.ora

Log messages written to /oracle/diag/tnslsnr/hlaix/listener/alert/log.xml

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hlaix)(PORT=1521)))

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hlaix)(PORT=1521)))

STATUS of the LISTENER

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

Alias                     LISTENER

Version                   TNSLSNR for IBM/AIX RISC System/6000: Version 11.2.0.1.0 - Production

Start Date                11-FEB-2014 13:24:52

Uptime                    0 days 0 hr. 0 min. 0 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      ON

Listener Parameter File   /oracle/app/product/10.2.0/network/admin/listener.ora

Listener Log File         /oracle/diag/tnslsnr/hlaix/listener/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hlaix)(PORT=1521)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

The listener supports no services

The command completed successfully

 

 

 

 

 

 

创建数据库:

$dbca

AIX下安装Oracle

 

AIX下安装Oracle

 

AIX下安装Oracle

 

AIX下安装Oracle

 

AIX下安装Oracle

 

 

AIX下安装Oracle

oracle

 

AIX下安装Oracle

 

AIX下安装Oracle

 

快速恢复区

快速恢复区大小

AIX下安装Oracle

 

AIX下安装Oracle

 

AIX下安装Oracle

 

AIX下安装Oracle

 

AIX下安装Oracle

AIX下安装Oracle

AIX下安装Oracle

 

 

启动数据库:

SQL> startup

ORA-01078: failure in processing system parameters

LRM-00109: could not open parameter file '/oracle/app/product/10.2.0/dbs/inittest.ora'

 

解决方法:

cp/oracle/admin/TEST/pfile/init.ora.1112014134832 /oracle/app/product/10.2.0/dbs/inittest.ora

 

SQL> startup

ORA-01031: insufficient privileges

权限不足!

 

 

问题:怎样启动test实例

 

 

export ORACLE_HOME= /oracle

exprot PATH=$PATH:$ORACLE_HOME/bin

export ORACLE_SID=test

 

 

 

$ sqlplus /nolog

SQL> conn / as sysdba

Connected to an idle instance.

initorcl.ora

cp /oracle/app/product/10.2.0/dbs/init.ora /oracle/app/product/10.2.0/dbs/initorcl.ora

 

 

 

 

 

 

1. Aix下启动/停止Oracle数据库实例

su oracle                         //-oracle用户登录

echo $ORACLE_SID             //–查看当前ORACLE_SID

export ORACLE_SID=CEDB   //–设置当前ORACLE_SIDCEDB

sqlplus /nolog                     //-以不登录到数据库服务的方式进入sqlplus环境

conn as sysdba                   //-以数据库管理员的身份连接数据库,此处需要知道数据库的用户名和密码

startup                              //-启动当前数据库实例

shutdown immediate          //-停止当前数据库实例

 

 

 

 

Aix下查看有几个Oracle数据库实例启动

ps -ef | grep oracle       //-查看所有与oracle有关的实例

ps -ef | grep ora_s000   //-查看oracle实例父进程名称

<!-- 正文结束 -->

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23447839/viewspace-1113996/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 没有了~
下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2010-03-04