How to install Oracle 19C in centeros7


Server version
Centeros 7.8 64 bit 4C 12g

[[email protected]]# cat /etc/redhat-release
CentOS Linux release 7.8.2003 (Core)
[[email protected]]# uname -a
Linux localhost.localdomain 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[[email protected]]# uname -r
[[email protected]]# file /bin/ls
/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=aaf05615b6c91d3cbb076af81aeff531c5d7dfd9, stripped


Download path of official installation package (need to log in to Oracle account):
You can select the installation package corresponding to the windows / Linux platform. I choose Linux x86-64 and zip package to download:
Download version: Oracle

Install dependent packages

yum install -y bc binutils compat-libcap1 compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libX11 libXau libXi libXtst libXrender libXrender-devel libgcc libstdc++ libstdc++-devel libxcb make smartmontools sysstat ipmiutil net-tools nfs-utils python python-configshell python-rtslib python-six targetcli 

Start database installation

Create Oracle directory, authorize, CD to Oracle installation package path, and decompress Oracle to $oracle_ Under the home directory, and then run the runinstaller installation
[note] starting from 18C, the installation package must be decompressed to $oracle_ Install under the home path!

Create Oracle related users and groups

groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper 
groupadd -g 54324 backupdba
groupadd -g 54325 dgdba
groupadd -g 54326 kmdba
groupadd -g 54327 asmdba
groupadd -g 54328 asmoper
groupadd -g 54330 racdba

Create Oracle user

useradd -u 54321 -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba oracle

Set password for Oracle user

passwd oracle

Create directory

mkdir -p /opt/oracle
mkdir -p /opt/oraInventory
mkdir -p /opt/database
mkdir -p /opt/oracle/product/19.3.0
mkdir -p /opt/oracle/oradata
mkdir -p /opt/oracle/flash_recovery_area
mkdir -p /opt/oracle/product/19.3.0/db_ 1 # starting from 18C, the installation package must be decompressed to $oracle_ Install in the home path

chown -R oracle:oinstall /opt/oracle
chown -R oracle:oinstall /opt/oracle/oradata
chown -R oracle:oinstall /opt/oraInventory
chown -R oracle:oinstall /opt/database

chmod -R 777 /opt

Configure environment variables for Oracle users

su - oracle
vim .bash_profile 
#Oracle database installation directory
export ORACLE_BASE=/opt/oracle
#Oracle database path
export ORACLE_HOME=$ORACLE_BASE/product/19.3.0/db_1
#Oracle startup database instance name
export ORACLE_SID=yusys
#Xterm window mode installation
export ORACLE_TERM=xterm
#Configure time format
#Add system environment variable
export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH
#Add system environment variable
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
#Prevent garbled code during installation
#export LANG=en_US.gbk
export LANG=en_US.UTF-8
#The Oracle client character set must be consistent with the character set set set during Oracle installation,

Effective environment variables:
Log in again or execute source to take effect immediately
$ source /home/oracle/.bash_profile

Check whether the environment variable is effective:

Switch to Oracle user and unzip the installation zip package

unzip -q -d $ORACLE_HOME

Modify response file DB_ install. rsp

After Oracle 19C is decompressed, the response directory contains only dB_ install. RSP (used to install Oracle Software), DBCA RSP in $Oracle_ HOME/assistants/dbca/dbca. rsp

[[email protected] ~]$ find ./ -name dbca.rsp

$ cp -r $ORACLE_HOME/install/response /home/oracle
vim /home/oracle/response/db_ install. RSP # modify and set the following parameters
#ORACLE_ Hostname = localhost # if the hostname has been modified, it needs to be set correctly, otherwise it can not be set

Start silent database installation with Oracle user

$ $ORACLE_HOME/runInstaller -silent -ignorePrereq -responseFile /home/oracle/response/db_install.rsp 

[note] during the installation process, you will be prompted to enter the root user password to execute the script
The installation will prompt the installation log file. You can view the progress and information of silent installation through the log file
The installation is successful, and the prompt information is as follows:
Successfully Setup Software with warning(s).
After installation, start monitoring

$ lsnrctl start

#View the listening status of the default listening port 1521
$ netstat -an |grep 1521
tcp6    0   0 :::1521         :::*          LISTEN

Create database

dbca -silent -createDatabase -templateName $ORACLE_HOME/assistants/dbca/templates/General_Purpose.dbc -gdbName yusys -sid yusys -characterSet AL32UTF8 -sysPassword oracle -systemPassword oracle -responseFile NO_VALUE -datafileDestination /opt/oracle/oradata

Description of parameters used:

  • Silent means to execute the DBCA command silently. Createdatabase means to use DBCA
  • Templatename specifies the name of the template used to create the database, which is specified here as general_ Purpose is a general purpose database template
  • Gdbname specifies the name of the global database to be created. The name specified here is yusys
  • Sid specifies the database system identifier, which is specified here as yusys, with the same name as the database
  • Responsefile specifies the installation response file, No_ Value indicates that no response file is specified
  • Characterset specifies the character set used by the database, which is specified here as AL32UTF8
  • Memorypercentage specifies the percentage of physical memory used for Oracle, which is specified here as 30%
  • Emconfiguration specifies the management options for enterprise management. Local indicates that the database is managed locally by enterprise manager

Installation succeeded


Log in to sqlplus / as SYSDBA as SYSDBA

Then enter startup to start the database

View listening status lsnrctl status start listening lsnrctl start

All done, you can log in on the client

This is the end of this article about installing oracle19c in centeros7. For more information about installing oracle19c in centeros7, please search the previous articles of developeppaer or continue to browse the relevant articles below. I hope you will support developeppaer in the future!