oracle 19c下载
https://www.oracle.com/database/technologies/oracle-database-software-downloads.html#19c
oracle 版本说明
Oracle12cR2=12.2.0.1
Oracle18C=12.2.0.2
Oracle19c=12.2.0.3
一、修改环境(安装依赖包,修改内核参数)。
a.安装依赖包
yum Install -y compat-libcap libstdc++-devel sysstat ksh glibc-devel libaio-devel smartmontools net-tools zip unzip
b.修改内核参数
vi /etc/sysctl.conf
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.file-max= 6815744
fs.aio-max-nr = 1048576
sysctl -p
vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
二、创建用户,组
groupadd oper
groupadd dba
groupadd asmdba
groupadd backupdba
groupadd dgdba
groupadd kmdba
groupadd racdba
groupadd oinstall
useradd oracle
usermod -g oinstall -G oper,dba,asmdba,backupdba,dgdba,kmdba,racdba oracle
mkdir -p /u19/app/oracle/product/19.3.0/dbhome_1
mkdir -p /u19/app/oraInventory
chmod +755 -R /u19/app/
chown -R oracle:oinstall /u19
三、配置环境变量
su - oracle
vi .bash_profile
export ORACLE_SID=orcl
export ORACLE_BASE=/u19/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.3.0/dbhome_1
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export CLASSPATH=$ORACLE_HOME/JRE:ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export LANG=zh_CN.UTF-8
export NLS_LANG='AMERICAN_AMERICA.AL32UTF8'
#解决sqlplus 上下键,删除键乱码问题。需要安装rlwrap,依赖包readlines,libtermcap-devel
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
alias lsnrctl='rlwrap lsnrctl'
四、解压文件(直接解压到oracle_home下)
cd $ORACLE_HOME
unzip LINUX.X64_193000_db_home.zip
五、生成响应文件 $ORACLE_HOME/db_install.rsp (响应文件中不需要指定oracle_home)
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v19.0.0
oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u19/app/oraInventory
ORACLE_BASE=/u19/app/oracle
#db版本 EE企业版 SE标准版
oracle.install.db.InstallEdition=EE
oracle.install.db.OSDBA_GROUP=dba
oracle.install.db.OSOPER_GROUP=oper
oracle.install.db.OSBACKUPDBA_GROUP=backupdba
oracle.install.db.OSDGDBA_GROUP=dgdba
oracle.install.db.OSKMDBA_GROUP=kmdba
oracle.install.db.OSRACDBA_GROUP=racdba
#自动执行root脚本,false不自动执行,true 自动执行,true需要输入root密码
oracle.install.db.rootconfig.executeRootScript=false
oracle.install.db.rootconfig.configMethod=ROOT
六、安装数据库
sh $ORACLE_HOME/runInstaller -silent -noconfig -force -ignorePrereq -responseFile $ORACLE_HOME/db_install.rsp
[WARNING] [INS-13014] Target environment does not meet some optional requirements.
CAUSE: Some of the optional prerequisites are not met. See logs for details. /u01/app/oraInventory/logs/InstallActions2019-12-06_01-06-54PM/installActions2019-12-06_01-06-54PM.log
ACTION: Identify the list of failed prerequisite checks from the log: /u01/app/oraInventory/logs/InstallActions2019-12-06_01-06-54PM/installActions2019-12-06_01-06-54PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
/u19/u19/app/oracle/product/19.3.0/dbhome_1/install/response/db_2019-12-06_01-06-54PM.rsp
You can find the log of this install session at:
/u19/app/oraInventory/logs/InstallActions2019-12-06_01-06-54PM/installActions2019-12-06_01-06-54PM.log
Successfully Setup Software with warning(s).
执行root脚本:
su - root
sh /u19/app/oraInventory/orainstRoot.sh
sh /u19/app/oracle/product/19.3.0/dbhome_1/root.sh
七、静默方式创建单实例
a.配置响应文件$ORACLE_HOME/dbca.rsp
responseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v19.0.0
gdbName=orcl
sid=orcl
sysPassword=orcl
oracleHomeUserPassword=orcl
emExpressPort=5500
totalMemory=2048
b.安装实例orcl
$ORACLE_HOME/bin/dbca -silent -createDatabase -templateName General_Purpose.dbc -responseFile $ORACLE_HOME/dbca.rsp
[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
CAUSE:
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
CAUSE:
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'PDBADMIN' password entered does not conform to the Oracle recommended standards.
CAUSE:
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
Prepare for db operation
8% complete
Copying database files
31% complete
Creating and starting Oracle instance
32% complete
36% complete
40% complete
43% complete
46% complete
Completing Database Creation
51% complete
53% complete
54% complete
Creating Pluggable Databases
58% complete
77% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
/u01/u19/app/oracle/cfgtoollogs/dbca/lhr19c.
Database Information:
Global Database Name:orcl
System Identifier(SID):orcl
Look at the log file "/u19/app/oracle/cfgtoollogs/dbca/orcl/orcl.log" for further details.
八、配置监听
a.配置监听响应文件$ORACLE_HOME/netca.rsp
[GENERAL]
RESPONSEFILE_VERSION="19.0"
CREATE_TYPE="CUSTOM"
[oracle.net.ca]
INSTALLED_COMPONENTS={"server","net8","javavm"}
INSTALL_TYPE=""typical""
LISTENER_NUMBER=1
LISTENER_NAMES={"LISTENER"}
LISTENER_PROTOCOLS={"TCP;1521"}
LISTENER_START=""LISTENER""
NAMING_METHODS={"TNSNAMES","ONAMES","HOSTNAME"}
NSN_NUMBER=1
NSN_NAMES={"EXTPROC_CONNECTION_DATA"}
NSN_SERVICE={"PLSExtProc"}
NSN_PROTOCOLS={"TCP;HOSTNAME;1521"}
b.创建监听
$ORACLE_HOME/bin/netca -silent -responsefile $ORACLE_HOME/netca.rsp