一:系统环境:Red Hat Enterprise Linux Server release 5.4
ORACLE版本Oracle Database 11g Enterprise Edition
Release 11.2.0.1.0 - 64bit Production
二:
1/首先安装数据库软件
2.设置环境变量
3.创建需要的目录
4.创建参数文件pfile
5.创建密码文件
6.数据库启动到numount,创建Oracle的建库脚本
7.创建Oracle的数据字典
1.首先安装数据库软件;安装rlwrap软件。
2.设置环境变量
export PATH
export
ORACLE_BASE=/u01/app/oracle
export
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export
ORACLE_SID=willson
export
PATH=$PATH:$ORACLE_HOME/bin
alias
sqlplus=‘rlwrap sqlplus‘
alias rman=‘rlwrap rman‘
3.创建需要的目录
mkdir -p
$ORACLE_BASE/oradata/willson
mkdir -p
$ORACLE_BASE/admin/willson/adump
mkdir -p
$ORACLE_BASE/admin/willson/bdump
mkdir -p
$ORACLE_BASE/admin/willson/pfile
4.创建参数文件
cd cd $ORACLE_HOME/dbs
vim initwillson.ora
audit_file_dest=‘/u01/app/oracle/admin/willson/adump‘
audit_trail=‘db‘
compatible=‘11.2.0.0.0‘
control_files=‘/u01/app/oracle/oradata/willson/control01.ctl‘,‘/u01/app/oracle/oradata/willson/control02.ctl‘
db_block_size=8192
db_domain=‘‘
db_name=‘willson‘
diagnostic_dest=‘/u01/app/oracle‘
memory_target=442006528
open_cursors=300
processes=150
remote_login_passwordfile=‘EXCLUSIVE‘
sessions=170
undo_tablespace=‘UNDOTBS1‘
登陆到sqlplus / as
sysdba
创建spfile
create spfile from pfile
5.创建密码文件
orapwd
file=orapwwillson password=willson entries=10 创建密码文件
6.数据库启动到nomount,创建ORACLE的建库脚本
spool
willson_dbcreate.log;
create database
"willson"
character set
"AL32UTF8"
national character
set AL16UTF16
datafile
‘/u01/app/oracle/oradata/willson/system01.dbf‘ size 500M
SYSAUX DATAFILE
‘/u01/app/oracle/oradata/willson/sysaux01.dbf‘ SIZE 100M
UNDO TABLESPACE
"UNDOTBS1"
DATAFILE
‘/u01/app/oracle/oradata/willson/undotbs01.dbf‘ SIZE 200M
DEFAULT TEMPORARY
TABLESPACE temp TEMPFILE ‘/u01/app/oracle/oradata/willson/temp01.dbf‘ SIZE 300M
DEFAULT TABLESPACE
uses DATAFILE ‘/u01/app/oracle/oradata/willson/user01.dbf‘ SIZE 20m
logfile GROUP 1 (
‘/u01/app/oracle/oradata/willson/redo01a.rdo‘,
‘/u01/app/oracle/oradata/willson/redo01b.rdo‘
) SIZE 100M,
GROUP 2 (
‘/u01/app/oracle/oradata/willson/redo02a.rdo‘,
‘/u01/app/oracle//oradata/willson/redo02b.rdo‘
) SIZE 100M,
GROUP 3 (
‘/u01/app/oracle/oradata/willson/redo03a.rdo‘,
‘/u01/app/oracle/oradata/willson/redo03b.rdo‘
) SIZE 100M;
spool off
7.创建ORACLE数据字典
SQL>@?/rdbms/admin/catalog.sql
SQL>@?/rdbms/admin/catproc.sql
catalog.sql----创建数据字典基表和数据字典视图
catproc.sql----安装oracle系统包