5.设置参数 按照下文的内容编辑 .bash_profiile, 另存为 .profile [oracle@lin oracle]$ more .profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:/ora/bin:$HOME/bin BASH_ENV=$HOME/.bashrc USERNAME="oracle" ORACLE_HOME=/ora; export ORACLE_HOME LD_LIBRARY_PATH=/ora/lib; export LD_LIBRARY_PATH ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE ORACLE_SID=ora8; export ORACLE_SID ORACLE_TERM=386; export ORACLE_TERM TMPDIR=/var/tmp; export TMPDIR # umask 022 (only if umask does not default to 022) export USERNAME BASH_ENV PATH
[root@lin /root]$ xhost +172.17.2.22 172.17.2.22 being added to access control list 看到上面added信息,oracle用户可以如此开始安装: [oracle@lin orainst0]$ ./runI* Initializing Java Virtual Machine from /usr/local/jre/bin/jre. Please wait...
如果是远程登录到服务器上,比如从172.17.2.21执行,则应该 [oracle@lin orainst0]$ xhost +172.17.2.21 172.17.2.21 being added to access control list 当然要求事先定义DISPLAY=172.17.2.22:0.0 了: [oracle@lin orainst0]$ DISPLAY=172.17.2.22:0.0 [oracle@lin orainst0]$ export DISPLAY 同样执行runInstaller [oracle@lin orainst0]$ ./runI* Initializing Java Virtual Machine from /usr/local/jre/bin/jre. Please wait...
注意:自定义数据库的参数 数据库文件的位置、大小、增长方式。例如: system = /u01/app/oracle/oradata/ora8/orasys01.dbf 188M next 100K Users = /home/oracle/oradata/ora8/orausr01.dbf 20M next 128K
首先定义好 ORACLE_SID,ORACLE_HOME等参数, 编写参数文件$ORACLE_HOME/dbs/init.ora 对db_name, instance_name and service_name 稍微做修改 set compatible ="8.1.5" 依次执行以下命令脚本:
crdb1.sh | crdb2.sh |-- To create database files, data dictionary views crdb3.sh | and add PL/SQL support replicate.sh --- Advanced replication option ordinst.sh |__ Oracle Intermedia imedia.sh | drsys.sh |__ Oracle interMedia Text context.sh | java.sh --- Oracle Jserver spatial.sh --- Oracel Spatial timeseries.sh --- Oracel TimeSeries virage.sh --- Oracle Visual Information Retrieval sqlplus1.sh | sqlplus2.sh |-- Demos and SQL*Plus help tables sqlplus3.sh |
你不必依次全部执行,我在数据库创建助理DBCA里也只是1) 2) 1)The first three scripts (crdb1.sh, crdb2.sh and crdb3.sh) would create a database and 2)the scripts sqlplus1.sh, sqlplus2.sh and sqlplus.sh would create some demo tables.
Once the database is created, you could run other scripts mentioned above to use the respective 8i feature, 3) e.g., for Jserver, run the java.sh script. 4)To enable Oracle Intermedia Text, run the scripts - drsys.sh and context.sh, in this order only. 5) Similarly, for Oracle Intermedia, run ordinst.sh followed by imedia.sh.
SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (ORACLE_HOME = /ora) (SID_NAME = ora8) ) ) ### 如果指明监听服务的"全局名",则有类似这一行:(GLOBAL_DBNAME = ora8) 2)启动Net8服务lsnrctl start 首先你可以这样取得帮助: [oracle@lin /ora]$ lsnrctl LSNRCTL> help 然后开始启动:start [oracle@lin bin]$ lsnrctl start 联接时,机器会逐步告诉你正在启动…,正在联接…,已经联接的状态,最后他说成功啦! 下面是一些简要信息: LSNRCTL for Linux: Version 8.1.5.0.0 - Production on 19-NOV-99 22:02:54 (c) Copyright 1998 Oracle Corporation. All rights reserved. Starting /ora/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 8.1.5.0.0 - Production System parameter file is /ora/network/admin/listener.ora Log messages written to /ora/network/log/listener.log Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.17.2.22)(PORT=1521)) (PROTOCOL_STACK=(PRESENTATION=TTC)(SESSION=NS)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.17.2.22)(PORT=1521)) (PROTOCOL_STACK=(PRESENTATION=TTC)(SESSION=NS))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 8.1.5.0.0 - Production Start Date 19-NOV-99 22:02:54 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security OFF SNMP OFF Listener Parameter File /ora/network/admin/listener.ora Listener Log File /ora/network/log/listener.log Services Summary... ora8 has 1 service handler(s) The command completed successfully 以上提示说,1个服务被处理,命令成功完成。 3)停止Net8服务lsnrctl stop 最简单的方法是 [oracle@lin /ora]$ lsnrctl stop 有时侯,进程出了差错,tnslsnr没有响应,像WindowsNT常犯的毛病一 样, 这里有一个强硬的手段:先找出它的进程号,然后 kill掉! [oracle@lin /ora]$ ps -ef|grep tns oracle 1331 1 0 15:51 ? 00:00:00 /ora/bin/tnslsnr LISTENER -inher
[oracle@lin bin]$ lsnrctl stop LSNRCTL for Linux: Version 8.1.5.0.0 - Production on 19-NOV-99 22:02:50 (c) Copyright 1998 Oracle Corporation. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.17.2.22)(PORT=1521)) (PROTOCOL_STACK=(PRESENTATION=TTC)(SESSION=NS))) The command completed successfully
Listeners =DataBase Name = Global DB Name =ora8, HomeDir = /ora/ ,SID =ora8
[oracle@lin oracle]$ cd /ora/net*/ad* [oracle@lin admin]$ ls listener.ora namesini.sql samples sqlnet.ora namesdrp.sql namesupg.sql sqlnet.fdf tnsnames.ora
SQL*net版本 pb动态库 Profile参数名 参数值 适用Oracle版本 SQL*net16 ora7.2以前 pbOR760.dll Profile name Server Login ID Password oracle70 @t:ora8 scott tiger ora7.0 ora7.x/8.x ora7.x/8.x SQL*net32 ora7.x/8.x pbO7260.dll pbO7360.dll Profile name Server Login ID Password oracle73 @tns:ora8 scott tiger ora7.0 ora7.x/8.x ora7.x/8.x ora8.x NET8 pbO8060.dll Profile name Server Login ID Password oracle8 ora8 scott tiger
其他参数 : 如果提示供应商有问题,就复制ORA7x.dll 到: ORANT.DLL再试!!
NET PROTOCOL SQL*Net1, SQL*Net2, Net8 SERVER NAME see TNSNAME.ORA , create by netasst USER NAME exmple: SCOTT/tiger,