19c 无图形安装db
参考文档
建议安装 rlwrap 工具
一、环境设置
1、SID的设置
export ORACLE_SID=ORCL
2、pifle文件
cd $ORACLE_HOME/dbs control1.ctl hc_ORCL.dat init.ora initORCL.ora lkORCL spfileORCL.ora [oracle@iZ2zecu3ctp6ahd3y793b2Z dbs]$ cat initORCL.ora db_name='ORCL' memory_target=2G processes = 1500 audit_file_dest='/u01/app/oracle/admin/orcl/adump' audit_trail ='db' db_block_size=8192 db_recovery_file_dest='/oraback/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='UNDOTBS1' control_files = '/u01/app/oracle/product/19.3.0/dbhome_1/dbs/control1.ctl','/oradata/ORCL/control2.ctl'
3、相关目录
mkdir -p /u01/app/oracle/admin/orcl/adump mkdir -p /oraback/fast_recovery_area mkdir -p /oradata/ORCL/ mkdir -p /oraback/ORCL/
二、创建数据库
CREATE DATABASE ORCL USER SYS IDENTIFIED BY oracle USER SYSTEM IDENTIFIED BY oracle LOGFILE GROUP 1 ('/oradata/ORCL/redo01a.log','/oraback/ORCL/redo01b.log') SIZE 100M BLOCKSIZE 512, GROUP 2 ('/oradata/ORCL/redo02a.log','/oraback/ORCL/redo02b.log') SIZE 100M BLOCKSIZE 512, GROUP 3 ('/oradata/ORCL/redo03a.log','/oraback/ORCL/redo03b.log') SIZE 100M BLOCKSIZE 512 MAXLOGHISTORY 1 MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 1024 CHARACTER SET AL32UTF8 NATIONAL CHARACTER SET AL16UTF16 EXTENT MANAGEMENT LOCAL DATAFILE '/oradata/ORCL/system01.dbf' SIZE 700M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED SYSAUX DATAFILE '/oradata/ORCL/sysaux01.dbf' SIZE 550M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED DEFAULT TABLESPACE users DATAFILE '/oradata/ORCL/users01.dbf' SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED DEFAULT TEMPORARY TABLESPACE tempts1 TEMPFILE '/oradata/ORCL/temp01.dbf' SIZE 20M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED UNDO TABLESPACE undotbs1 DATAFILE '/oradata/ORCL/undotbs01.dbf' SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED USER_DATA TABLESPACE usertbs DATAFILE '/oradata/ORCL/undotbs1.dbf' SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
三、运行脚本
$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catctl.pl -d $ORACLE_HOME/rdbms/admin -n 4 -l /home/oracle/log/catpcat.sql catpcat.sql