如果一切正常,OUI会出现The Installation Of Oracle9i Database Was successful.的字样,这表明你的Oracle9i数据库安装正常了,如果需要安装其它的内容按Next Install钮进行其它内容的安装,否则按Exit退出安装。
使用Oracle 9i 数据库
安装完毕后Oracle数据库会自动启动,下面我们用实际超作来说明一下Oracle 9i数据库的启动和关闭。
以Oracle用户登陆数据库,开个控制台窗口;
关闭Oracle 9i 数据库
[Oracle@wing /Oracle]$ sqlplus " / as sysdba" //以sysdba用户登陆数据库
SQL*Plus: Release 9.0.1.0.0 - Production on Wed Jul 11 15:35:31 2001
(c) Copyright 2001 Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.0.1.0.0 - Production
With the Partitioning option
JServer Release 9.0.1.0.0 - Production
运行shudown命令关闭数据库
SQL> shutdown
Database closed.
Database dismounted.
Oracle instance shut down.
SQL>
启动Oracle 9i 数据库
[Oracle@wing bin]$ sqlplus " / as sysdba"
SQL*Plus: Release 9.0.1.0.0 - Production on Wed Jul 11 16:00:59 2001
(c) Copyright 2001 Oracle Corporation. All rights reserved.
Connected to an idle instance.
SQL> startup
Oracle instance started.
Total System Global Area 336356520 bytes
Fixed Size 279720 bytes
Variable Size 268435456 bytes
Database Buffers 67108864 bytes
Redo Buffers 532480 bytes
Database mounted.
Database opened.
SQL>
启动Oracle 9i监听程序
Oracle的监听程序主要是为客户端的连接提供接口
[Oracle@wing bin]$ lsnrctl
LSNRCTL for Linux: Version 9.0.1.0.0 - Production on 11-JUL-2001 16:12:17
Copyright (c) 1991, 2001, Oracle Corporation. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> start
Starting /Oracle/product/9.0.1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 9.0.1.0.0 - Production
System parameter file is /Oracle/product/9.0.1/network/admin/listener.ora
Log messages written to /Oracle/product/9.0.1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=wing)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 9.0.1.0.0 - Production
Start Date 11-JUL-2001 16:12:58
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /Oracle/product/9.0.1/network/admin/listener.ora
Listener Log File /Oracle/product/9.0.1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=wing)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "Oracle" has 1 instance(s).
Instance "Oracle", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL>
关闭Oracle 9i监听程序
[Oracle@wing bin]$ lsnrctl
LSNRCTL for Linux: Version 9.0.1.0.0 - Production on 11-JUL-2001 16:12:17
Copyright (c) 1991, 2001, Oracle Corporation. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> stop
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
The command completed successfully
LSNRCTL>
关闭Oracle Web Server
cd $Oracle_HOME/Apache/Apache/bin
./stopJServ.sh
/Oracle/product/9.0.1/Apache/Apache/bin/apachectl stop: httpd stopped
启动Oracle Web Server
cd $Oracle_HOME/Apache/Apache/bin
[Oracle@wing bin]$ ./startJServ.sh
/Oracle/product/9.0.1/Apache/Apache/bin/apachectl start: httpd started
启动Oracle Web Server后默认的端口号是7777
在客户端浏览器地址栏输入http://xxx.xx.xxx.xxx:7777/
如果浏览器出现以下界面则表示Oracle Web Server运行正常
详细请看:http://www.cty99.com/Templet/templetproject1.Asp?Project=数据库&Search=1&Page=1
]]></Content>
<PostDateTime>2002-07-01 10:36:05Z</PostDateTime>
</Reply>
<Reply>
<PostUserNickName>蓝色沸点</PostUserNickName>
<rank>三级(初级)</rank>
<ranknum>user3</ranknum>
<credit>100</credit>
<ReplyID>5466204</ReplyID>
<TopicID>839752</TopicID>
<PostUserId>272254</PostUserId>
<PostUserName>blue__star</PostUserName>
<Point>10</Point>
<Content><![CDATA[
1.创建oracle帐号
以root帐号登录,开启一个terminal窗口,创建oracle用户
[root@dbs /root]useradd oracle
[root@dbs /root]passwd oracle (设置oralce帐号的密码)
系统自动创建了/home/oracle目录,属主为oracle。我的Oracle就准备装
在此目录下
2.解压缩oracle8161_tar.gz
以root帐号登录,执行:
[root@dbs /root] cd /backup
[root@dbs /backup] tar zxvf oracle8161_tar.gz
在/backup/目录下生成Oralce8iR2目录,内含解包后的文件
3.设置oracle用户环境
使用oracle帐号登录,开启terminal窗口, 使用文本编辑器打开
/home/oracle/.bash_profile最后加
入如下环境变量的设置行:
ORACLE_HOME=/home/oracle; export ORACLE_HOME
LD_LIBRARY_PATH=/home/oracle/lib; export LD_LIBRARY_PATH
ORACLE_BASE=/home/oracle; export ORACLE_BASE
ORACLE_SID=ORCL; export ORACLE_SID
ORA_NLS33=/home/oracle/ocommon/nls/admin/data; export ORA_NLS33
NLS_LANG=american_america.zhs16cgb231280;export NLS_LANG
Log out,重新以oracle帐号登录,键入env指令查看刚才设置的环境变量。
[oracle@dbs oracle]env
4.创建oracle数据文件目录
我想把数据文件放在/home/oracle/data目录下,于是
[oracle@dbs oracle] mkdir data
5.安装Oracle 8i 数据库软件
(1)用oracle帐号登录,进入Xwindows,开启terminal窗口
(2)[oracle@dbs oracle] cd /backup/Oracle8iR2
(3)在oracle用户窗口下继续安装
[oracle@dbs Oralcle8iR2] ./runInstaller
在出现的基于JAVA的Oracle installer界面上,点击Next
(4) 在File Locations界面上,检查Destination Path为/home/oracle,点击Next
(5)在Unix Group Name窗口中,键入"oracle",点击Next;
(6)一个窗口会弹出,要求以root身份运行/home/oracle/orainstRoot.sh
(7)切换到terminal窗口,并切换到root身份运行如下:
[root@dbs /root] cd /home/oracle
[root@dbs oracle]./orainstRoot.sh
(8)返回刚才弹出的窗口,点击Retry
(9)在出现的"Available products"窗口上选择"Oracle8I enterprise edition8.1.6.1.0",点击Next
(10)下一个画面上选择Typical ,点击Next
(11)在Privileged Operating System Groups界面上,点击Next
(12)提示输入global database name, 输入 ORCL
验证ORACLE_SID为ORCL,点击Next
(13)提示输入db files localtion,输入/home/oracle/data,点击Next
(14)在最后的Summary窗口上,点击Install
(15)现在正式开始安装了,30分钟左右就完成
(16)在文件被拷贝和联接后,弹出一个要求运行root.sh的窗口,切换到root用户窗口,
[root@dbs oracle]./root.sh
在询问local bin directory时按下Enter键
(17)返回要求运行root.sh的窗口上,点击OK
(18)Oracle Net8 Configuration和Oracle Database Configuration Assistants启动,
安装Net8和创建数据库。 这一步花20分钟左右的时间。
(19)Oracle Database Configuration Assistants结束后,在弹出的完成数据库创建窗口上点击OK
(20)在End of Installation画面上,点击Exit ,在弹出的Do you reallywant to exit?
窗口上点击yes
现在所有的Oralce 8i Enterprise就安装好了! 可以使用Oracle数据库管理工具svrmgrl、
sql*plus来对安装好的数据库进行测试!
6.测试
[oracle@dbs oracle] svrmgrl
SVRMGR>connect internal
Connected.
SVRMGR> shutdown
Database closed.
SVRMGR>startup
SVRMGR> quit
Server Manager complete
关闭启动数据库正常。再用sqlplus试试
Enter user-name: scott
Enter password: tiger
Connected to:
Oracle8i Enterprise Edition Release 8.1.6.1.0 - Production
With the Partitioning option
JServer Release 8.1.6.0.0 - Production
SQL> select * from emp
测试完毕,数据库成功安装