CentOS7 installation oracle19c tutorial

Reference
https://zhuanlan.zhihu.com/p/571737575

1 Create groups and users
vi /etc/hosts
[root@rhel ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.7 (Maipo)
/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

2 Modify the user password:
[root@rhel ~]# passwd oracle

3 Turn off the firewall and selinux
systemctl stop firewalld.service
systemctl disable firewalld.service

vi /etc/selinux/config
modify SELINUX=disabled in the file, then restart the service to view
/usr/sbin/sestatus
modify the HOST file
[root@rhel db]# more /etc/sysconfig/network

Created by anaconda

NOZEROCONF=yes
HOSTNAME=rhel
[root@rhel db]# cat /etc/hosts
192.168.182.149 rehl

4 Create a working directory, and then grant corresponding permissions.

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

5配置Oracle的环境变量
ORACLE_SID=sanshi;export ORACLE_SID
ORACLE_UNQNAME=sanshi;export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME= O R A C L E B A S E / p r o d u c t / 19.2.0 / d b 1 ; e x p o r t O R A C L E H O M E P A T H = ORACLE_BASE/product/19.2.0/db_1; export ORACLE_HOME PATH= ORACLEBASE/product/19.2.0/db1;exportORACLEHOMEPATH=ORACLE_HOME/bin: P A T H : {PATH}: PATH: HOME/bin; export PATH
takes effect
source .bash_profile

6 Modify kernel parameters
[root@rhel /]# vi /etc/sysctl.conf
[root@rhel /]# more /etc/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
effective
[root@rhel /]# sysctl -p

7yum configuration
Create a directory and mount the CD to the directory
[root@rhel ~]# df -Th
View the CD, if it is not mounted, please mount the CD.
mount /dev/sr0 /mnt/cdrom/
cd /etc/yum.repos.d/
backup original repo file
mv redhat.repo redhat.repo.bak
configure local YUM source
cat >> localyum.repo <<EOF
[media]
name =media
baseurl=file:///mnt/cdrom
enabled=1
gpgcheck=0
EOF
Mount the installation disc to the system file
Create a new repo file
Clear the cache and check the configuration source
yum clean all
yum repolist all
Save the file and you can use it yum list to check whether the setting is successful!
yum list

8. Install the necessary packages
The following are the required packages listed in the official documents, of course not all are required. If no related technology is used, no corresponding package is required.
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

安装
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

yum install -y kmod*
yum install -y ksh*
yum install -y libaio*
yum install -y compat*

Note: Starting from 7, the compat-libstdc++ package is no longer included in the system image, you need to download and install it yourself.
Of course, if you don't use the Oracle Text function, you don't need to install this package. But it is recommended to install, because you cannot guarantee that you will not use it in the future.
[root@rhel db]# rpm -ivh compat-libstdc+±33-3.2.3-72.el7.x86_64.rpm
[root@rhel db]#

9. Upload LINUX.X64_193000_db_home to
unzip the installation package
[root@rhel ~]# cd /home/db/
[root@rhel db]# unzip LINUX.X64_193000_db_home.zip
[root@rhel ~]# chmod -R +x /home /db/
[root@rhel ~]# chown -R oracle:oinstall /home/db/
[root@rhel ~]# unzip

10. Edit the login configuration file
To edit the login configuration file, add at the end of the text:
session required pam_limits.so
session required/lib/security/pam_limits.so
to make the shell limit take effect.

vim /etc/pam.d/login
session required pam_limits.so
session required /lib/security/pam_limits.so

  1. Modify environment variables

vim /etc/profile
#################添加如下内容
#oracle
export ORACLE_HOME=/u01/app/oracle/product/19.3.0/db_1
export ORACLE_SID=orcl
if [ $USER = “oracle” ]; then
if [ $SHELL = “/bin/ksh” ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

11. Modify the authentication module
vim /etc/security/limits.conf
###################Add the following content
oracle soft nproc 131072
oracle hard nproc 131072
oracle soft nofile 131072
oracle hard nofile 131072
oracle soft core unlimited
oracle hard core unlimited
oracle soft memlock 50000000
oracle hard memlock 50000000

Core problem
Starting from 12C, the oracle installation package must be placed in the oracle_home directory

Move the installation package to /u01/app/oracle/product/19.2.0/db_1

Configure the graphical interface
Because it is a graphical installation, we need to configure the graphical interface in advance, otherwise the installation window will not appear. I installed oracle with the vmware virtual machine. If you want to call up the graphical interface, you must install Xmanager on the physical machine and turn on Xmanager passive.

Switch to root and install the xorg-x11-apps* packages.

yum install xorg-x11-apps*

[root@rhel db]# rpm -qa | grep libXrender
libXrender-devel-0.9.10-1.el7.x86_64
libXrender-0.9.10-1.el7.x86_64
[root@rhel db]# rpm -qa | grep compat -libstdc+±
compat-libstdc+±33-3.2.3-72.el7.x86_64
[root@rhel db]#
NVC -- graphical interface
xmanager-passive

[oracle@rhel db_1]$ export DISPLAY=192.168.182.1:0.0
[oracle@rhel db_1]$ echo D I S P L A Y 192.168.182.1 : 0.0 [ o r a c l e @ r h e l d b 1 ] DISPLAY 192.168.182.1:0.0 [oracle@rhel db_1] DISPLAY192.168.182.1:0.0[oracle@rheldb1]

Enable monitoring
[oracle@rhel db_1]$netca

Create database
[oracle@rhel db_1]$dbca

Guess you like

Origin blog.csdn.net/weixin_44048054/article/details/131519707
Recommended