Oracle19C RAC cluster learning
Note: The installation process is the simplest installation of oracle19c, Linux system is at least familiar with the normal operation!
1. Virtual machine environment:
1.1 Operating system: CentOS7.6
1.2 CPU: 4cores
1.3 Memory: 32G (recommended not less than 10G)
1.4 Hard disk: 300G+
2. Oracle installation process
Configure hosts (this step can be ignored)
echo “192.168.1.xx hostName”>> /etc/hosts
Turn off the firewall
systemctl stop firewalld.service
systemctl disable firewalld.service
Create oracle directory and mount it (it can be created directly when installing linux system)
mkdir -p /opt/oracle
mount /dev/sdaX /opt/oracle
Modify the fstab file to make linux start automatically mount (if the partition is mounted when installing the linux system, this step is ignored)
vi /etc/fstab
Modify the corresponding partition information just mounted in the file
Configure the yum environment (make sure there is a Linux installation disk in your CD-ROM or virtual CD-ROM drive)
mkdir /mnt/linux
mount /dev/cdrom /mnt/linux
cd /etc/yum.repos.d
mkdir pankajconnect
mv *.repo pankajconnect/
echo “[EL]” >> /etc/yum.repos.d/yuminstall.repo
echo “name =Linux 7.x DVD” >> /etc/yum.repos.d/yuminstall.repo
echo “baseurl=file:/mnt/linux” >> /etc/yum.repos.d/yuminstall.repo
echo “gpgcheck=0” >> /etc/yum.repos.d/yuminstall.repo
echo “enabled=1” >> /etc/yum.repos.d/yuminstall.repo
cat /etc/yum.repos.d/yuminstall.repo
Pre-install the oracle resource package (may prompt some resources are missing)
Description: oracle-database-preinstall-19c-1.0–1.el7.x86_64.rpm
This tool has been downloaded on the oracle official website.
rpm -ivh oracle-database-preinstall-19c-1.0–1.el7.x86_64.rpm
If there are missing resources
yum -y install Resource 1 resource 2…
Check whether oracle user information has been created (oracle-database-preinstall will automatically create oracle user information)
id oracle
Modify oracle user password and grant directory permissions
Note: /opt/oracle is the oracle default installation path. If you need to modify this path, you need to manually create a directory, and delete the oracle user created during pre-installation, manually create the user, and assign permissions
passwd oracle
chown -R oracle:oinstall /opt/oracle
chmod -R 775 /opt/oracle
Install oracle database software
rpm -ivh oracle-database-ee-19c-1.0–1.x86_64.rpm
Modify the database configuration
cd /etc/sysconfig/
cp oracledb_ORACLCDB-19c.conf oracledb_rac(Simply understand the name of the instance you want to create)-19c.conf
cp oracledb_ORACLCDB-19c.conf oracledb_rac-19c.conf
View the profile information
more oracledb_rac-19c.conf
Change parameters
cd /etc/init.d/
cp oracledb_ORRCLCDB-19c oracledb_rac-19c
vim oracledb_rac-19c
:%s/ORCLCDB/rac/g
:%s/ORCLPB1/rac/g
export CHARSET=AL16UTF16
export CREATE_AS_CDB=false
Create a database
/etc/init.d/oracledb_rac-19c configure
Configure oracle user environment variables
su — oracle
echo “export LANG=en_US” >> ~/.bash_profile
echo “export ORACLE_BASE=/opt/oracle” >> ~/.bash_profile
echo “export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1” >> ~/.bash_profile
echo “export ORACLE_UNQNAME=rac” >> ~/.bash_profile
echo “export ORACLE_SID=rac” >> ~/.bash_profile
echo “NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG” >> ~/.bash_profile
echo “export PATH=$PATH:/opt/oracle/product/19c/dbhome_1/bin” >> ~/.bash_profile
source ~/.bash_profile
env |grep ORACLE
Close/start oracle19c
Shutdown Database
/etc/init.d/oracledb_rac-19c stop
Start Database
/etc/init.d/oracledb_rac-19c start
Thanks for reading this post. thanks
Pankaj K.