Redhat 7.6 install a single instance Oracle19c

Copyright: Reprinted not allowed without a permit bloggers https://blog.csdn.net/qianglei6077/article/details/87715799

Installation Environment

  • Operating system: Redhat 7.6
  • Database Version: 19.2.0.0.0

Configuration Steps

Brief installation steps

1) Configure host

vi /etc/hosts
192.168.20.20 19c

2) create groups and users

/usr/sbin/groupadd -g 54321 oinstall
/usr/sbin/groupadd -g 54322 dba
/usr/sbin/groupadd -g 54323 oper
/usr/sbin/useradd -u 54321 -g oinstall -G dba,oper oracle

Modify User Password:
[root @ 19C ~] # passwd the Oracle

3) turn off the firewall and selinux

Firewall:

[root@rac1 ~]# systemctl stop firewalld.service
[root@rac1 ~]# ]# systemctl disable firewalld.service
rm '/etc/systemd/system/basic.target.wants/firewalld.service'
rm '/etc/systemd/system/dbus-org.Fedoraproject.FirewallD1.service'

SELINUX:

[root@rac1 ~]# cat /etc/selinux/config 

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted 

It can also temporarily closed setenforce 0

4) Create a directory

mkdir -p /u01/app/oracle/product/19.2.0/db_1
chown -R oracle:oinstall /u01/
chmod -R 775 /u01/

5) configuring the oracle user environment variables

[root@19c ~]# cat /home/oracle/.bash_profile 
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
	. ~/.bashrc
fi

# User specific environment and startup programs

ORACLE_SID=sanshi;export ORACLE_SID  
ORACLE_UNQNAME=sanshi;export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/19.2.0/dbhome_1; export ORACLE_HOME
NLS_DATE_FORMAT="YYYY:MM:DDHH24:MI:SS"; export NLS_DATE_FORMAT
NLS_LANG=american_america.ZHS16GBK; export NLS_LANG
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11
PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin:$ORA_CRS_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH
THREADS_FLAG=native; export THREADS_FLAG
export TEMP=/tmp
export TMPDIR=/tmp
umask 022 

6) modify kernel parameters

[root@19c ~]# vim /etc/sysctl.d/97-oracle-database-sysctl.conf 
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500

Become effective

[root@19c ~]#sysctl --system

Check the value of a parameter

sysctl -a|grep shmmax

Presentation on the above parameters, the following is a detailed description of the official document:

parameter value file
SEMMSL
SEMMNS
SEMOPM
SEMMNI
250
32000
100
128
/ Proc / sys / kernel / sem
shmall Shmmax of greater than or equal, in page units. /proc/sys/kernel/shmall
shmmax Equal to the average physical memory size, unit: bytes
more information, please see the MOS document: 567506.1
/proc/sys/kernel/shmmax
shmmni 4096 /proc/sys/kernel/shmmni
panic_on_oops 1 /proc/sys/kernel/panic_on_oops
file-max 6815744 /proc/sys/fs/file-max
going-max-nr 1048576
NOTE: This value limits concurrent outstanding requests, should be set to avoid the I / O subsystem failure.
/proc/sys/fs/aio-max-nr
ip_local_port_range Minimum: 9000
Maximum: 65500
/proc/sys/net/ipv4/ip_local_port_range
rmem_default 262144 /proc/sys/net/core/rmem_default
rmem_max 4194304 /proc/sys/net/core/rmem_max
wmem_default 262144 /proc/sys/net/core/wmem_default
wmem_max 1048576 /proc/sys/net/core/wmem_max

Note: /etc/sysctl.conf been abandoned, though still supported, but not recommended.

7) to install the necessary packages

Here is the official document lists the required packages, of course, not all are needed. If no to the related art, no corresponding packet.

bc
binutils
compat-libcap1
compat-libstdc++
dtrace-modules
dtrace-modules-headers
dtrace-modules-provider-headers
dtrace-utils
elfutils-libelf
elfutils-libelf-devel
fontconfig-devel
glibc
glibc-devel
ksh
libaio
libaio-devel
libdtrace-ctf-devel
libX11
libXau
libXi
libXtst
libXrender
libXrender-devel
libgcc
librdmacm-devel
libstdc++
libstdc++-devel
libxcb
make
net-tools (for Oracle RAC and Oracle Clusterware)
nfs-utils (for Oracle ACFS)
python (for Oracle ACFS Remote)
python-configshell (for Oracle ACFS Remote)
python-rtslib (for Oracle ACFS Remote)
python-six (for Oracle ACFS Remote)
targetcli (for Oracle ACFS Remote)
smartmontools
sysstat

installation

yum install bc \
gcc \  
gcc-c++ \
binutils \
compat-libcap1 \
compat-libstdc++ \
dtrace-modules \
dtrace-modules-headers \
dtrace-modules-provider-headers \
dtrace-utils \
elfutils-libelf \
elfutils-libelf-devel \
fontconfig-devel \
glibc \
glibc-devel \
ksh \
libaio \
libaio-devel \
libdtrace-ctf-devel \
libX11 \
libXau \
libXi \
libXtst \
libXrender \
libXrender-devel \
libgcc \
librdmacm-devel \
libstdc++ \
libstdc++-devel \
libxcb \
make \
smartmontools \
sysstat 

NOTE: Since 7 from the start, the system no longer contains the image compat-libstdc ++ package itself need to download and install.
Of course, if you do not use Oracle Text feature, you need to install the package. But it is recommended to install, because you can not guarantee that will not be used.

start installation

Extracting installation package:

[oracle@19c software]$ unzip V981623-01.zip -d /u01/app/oracle/product/19.2.0/db_1/

Note: Due to start from 12.2, the installation package change, and in fact the entire installation package is the entire ORACLE_HOME. So you can extract directly next to ORACLE_HOME.

installation

[oracle@19c db_1]$ ./runInstaller

Guess you like

Origin blog.csdn.net/qianglei6077/article/details/87715799