一、 修改/etc/system文件,在文件后加上 |
|
set shmsys:shminfo_shmmax=4294967295 |
set shmsys:shminfo_shmmin=1 |
set shmsys:shminfo_shmmni=100 |
set shmsys:shminfo_shmseg=15 |
set semsys:seminfo_semmns=200 |
set semsys:seminfo_semmni=70 |
set ulimit=3000000 |
|
重新启动。 |
|
|
|
二、创建dba组和 oracle用户 - oracle |
|
指明Oracle用户的根目录(例如:/u/oracle) |
|
指明用户属于dba组 |
|
|
|
三、 编辑oracle [Oracle用户]的.profile文件 |
|
|
|
login:oracle |
|
password:**** |
|
$pwd |
|
/u/oracle7 |
|
$vi .profile |
|
PATH=$PATH:$HOME/bin:. # set command search path |
export PATH |
umask 022 |
ULIMIT=3000000 |
ORACLE_SID=ora8 |
ORACLE_BASE=$HOME |
ORACLE_HOME=$ORACLE_BASE |
ORACLE_DOC=$ORACLE_HOME/doc |
NLS_LANG=AMERICAN_AMERICA.zhs16cgb231280 |
export ULIMIT ORACLE_SID ORACLE_DOC ORACLE_BASE ORACLE_HOME NLS_LANG |
ORACLE_TERM=sun5 |
export ORACLE_TERM |
|
|
|
四、在/etc/services 文件中加入一行:listener 1521/tcp |
|
# cd /etc |
|
# vi services |
|
在文件中加入一行:listener 1521/tcp |
|
|
五、开始安装 |
|
$chmod 777 /cdrom |
|
$mount /dev/cd0 /cdom |
|
$ cd /cdrom/orainst |
|
$ ./orainst |
|
选择:custom方式 |
|
注:字符集:ZHS163GB231280 (中文) |
|
安装选件。(我全都选) |
|
|
|
六、安装完成后执行root.sh |
|
$ su root |
|
# cd $ORACLE_HOME/orainst |
|
# ./root.sh |
|
|
|
安装完成。启动数据库 |
|
$svrmgrl |
|
Oracle Server Manager Release 3.0.4.0.0 - Production |
(c) Copyright 1997, Oracle Corporation. All Rights Reserved. |
Oracle8 Enterprise Edition Release 8.0.4.0.0 - Production |
PL/SQL Release 8.0.4.0.0 - Production |
|
SVRMGR>connect internal; |
|
SVRMGR> startup |
ORACLE instance started. |
Total System Global Area 82053312 bytes |
Fixed Size 47296 bytes |
Variable Size 40972288 bytes |
Database Buffers 40960000 bytes |
Redo Buffers 73728 bytes |
Database mounted. |
|
在本地运行SQL*Plus测试一下。 |
|
Oracle的参数调整,修改文件 initora8.ora |
|
db_block_buffers*db_block_size + shared_pool_size
为服务器所带内存的1/ |
2 - 2/3之间。 |
|
每次参数调整后要重启数据库才回生效。 |
|
|
|
七、编辑tnsnames.ora, listener.oa |
|
$ pwd |
/u/oracle/network/admini |
|
$vi listener.ora |
|
# |
# Installation Generated Net8 Configuration |
# Version Date: Jun-17-97 |
# Filename: Listener.ora |
# |
LISTENER = |
(ADDRESS_LIST = |
(ADDRESS= (PROTOCOL= IPC)(KEY= ora8)) |
(ADDRESS= (PROTOCOL= IPC)(KEY= PNPKEY)) |
(ADDRESS= (PROTOCOL= TCP)(Host= hybyj)(Port= 1521)) |
) |
SID_LIST_LISTENER = |
(SID_LIST = |
(SID_DESC = |
(GLOBAL_DBNAME= hybyj.net.cn) |
(ORACLE_HOME= /u/oracle) |
(SID_NAME = ora8) |
) |
(SID_DESC = |
(SID_NAME = extproc) |
(ORACLE_HOME = /u/oracle) |
(PROGRAM = extproc) |
) |
) |
STARTUP_WAIT_TIME_LISTENER = 0 |
CONNECT_TIMEOUT_LISTENER = 10 |
TRACE_LEVEL_LISTENER = OFF |
|
|
|
$ vi tnsnames.ora |
|
|
# |
# Installation Generated Net8 Configuration |
# Version Date: Oct-27-97 |
# Filename: Tnsnames.ora |
# |
extproc_connection_data = |
(DESCRIPTION = |
(ADDRESS = (PROTOCOL = IPC)(KEY = ora8)) |
(CONNECT_DATA = (SID = extproc)) |
) |
|
ora8 = |
(DESCRIPTION = |
(ADDRESS = (PROTOCOL= TCP)(Host= hybyj)(Port= 1521)) |
(CONNECT_DATA = (SID = ora8)) |
) |
$ |
|
|
|
八、 实现机器启动后ORACLE数据库和Listener的自启动 |
|
|
|
#cd /etc |
|
#vi oratab 将N改为Y |
|
#cd /etc/rc2.d |
|
创建文件 /etc/init.d/dbora, 内容: |
|
ORACLE_HOME=/u/oracle |
ORA_OWNER=oracle |
if [! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME] |
then |
echo " Oracle startup: connot start" |
exit |
fi |
case "$1" in |
'start') |
su - $ORA_OWNER -c $ORACLE_HOME/bin/dbstart & |
su - $ORA_OWNER -c $ORACLE_HOME/bin/lsnrctlstart.sh & |
;; |
'stop') |
su - $ORA_OWNER -c $ORACLE_HOME/bin/dbshut & |
;; |
esac |
|
然后键入如下命令: |
|
#ln -s /etc/init.d/dbora /etc/rc0.d/K10dbora |
|
#ln -s /etc/init.d/dbora /etc/rc2.d/S99dbora |
|
重启即可。 |
|
|
|
九、数据移植: |
|
如要将oracle 7 exp出的dmp文件 imp 到oracle 8 ,先运行/rdbms/admin/cate |
xp7.sql |