首页 > 数据库 > Oracle > AIX下安装Oracle
#mkgroup
#
mkgroup
建立用户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用户的属性:
#smitty user
Soft
Soft
Soft
以上-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上,如小机本地IP为127.0.0.1;如通过Xmanager安装的,此处填写的IP为你机器的IP
安装
解压文件
tar –xvf ……tar.gz
# cd /oracle
# ls
.profile
# cd setup
# ls
database
# cd database
# ls
doc
install
response
# ./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
$ cd setup
$ ls
database
$cd database
$ ls
doc
install
response
$./ runInstaller
忽略全部,下一步
# /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:
Enter the full pathname of the local bin directory: [/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.
$netca
启动监听:lsnrctl
start
# 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.
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
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.
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
Version
Start
Date
Uptime
Trace
Level
Security
SNMP
Listener
Parameter File
Listener
Log
File
Listening Endpoints Summary...
The listener supports no services
The command completed successfully
$dbca
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
① su
– oracle
② echo
$ORACLE_SID
③ export
ORACLE_SID=CEDB
④ sqlplus
/nolog
⑤ conn as
sysdba
⑥ startup
shutdown
immediate
ps -ef |
grep
oracle
ps -ef |
grep ora_s000
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/23447839/viewspace-1113996/ ,如需转载,请注明出处,否则将追究法律责任。