配置Oracle环境变量
1、编辑.bash_profile
[oracle@FDB ~]$ vi ~/.bash_profile
2、使配置文件生效
[oracle@FDB ~]$ . .bash_profile
创建参数文件initFDB.ora和密码文件orapwFDB
1、参数文件和密码文件对应目录如下
2、创建参数文件initFDB.ora并且创建相应目录。(FDB为实例名)
[oracle@FDB ~]$ vi initFDB.ora
参数文件添加如下内容:
db_name='FDB'
memory_target=1G
processes = 150
audit_file_dest='/u01/app/oracle/admin/FDB/adump'
audit_trail ='db'
db_block_size=8192
db_domain='us.oracle.com'
db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
db_recovery_file_dest_size=2G
diagnostic_dest='/u01/app/oracle'
dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'
open_cursors=300
remote_login_passwordfile='EXCLUSIVE'
undo_tablespace='UNDOTBS'
control_files = (/u01/app/oracle/oradata/FDB/control1.ctl,/u01/app/oracle/oradata/FDB/control2.ctl)
compatible ='11.2.0'
创建参数文件种相应的文件目录:
[oracle@FDB dbs]$ mkdir -p /u01/app/oracle/admin/FDB/adump
[oracle@FDB dbs]$ mkdir -p /u01/app/oracle/oradata/FDB
3、创建Oracle密码文件
[oracle@FDB dbs]$ orapwd file=orapwFDB password=oracle entries=30
4、连接数据库创建 spfile 并启动到 nomount
[oracle@FDB dbs]$ export ORACLE_SID=FDB
[oracle@FDB dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Thu Jan 9 16:12:29 2020
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected.
SQL> create spfile from pfile;
File created.
SQL> startup nomount