1, Explain
This installation will use Oracle universal installer (OUI) to install Oracle database software and database
1.1 Oracle operating system requirements under Linux
Oracle Linux 8.1 with the Unbreakable Enterprise Kernel 6: 5.4.17-2011.0.7.el8uek.x86_64 or later
Oracle Linux 8 with the Red Hat Compatible kernel: 4.18.0-80.el8.x86_64 or later
Oracle Linux 7.4 with the Unbreakable Enterprise Kernel 4: 4.1.12-124.19.2.el7uek.x86_64 or later
Oracle Linux 7.4 with the Unbreakable Enterprise Kernel 5: 4.14.35-1818.1.6.el7uek.x86_64 or later
Oracle Linux 7.5 with the Red Hat Compatible kernel: 3.10.0-862.11.6.el7.x86_64 or later
Red Hat Enterprise Linux 8: 4.18.0-80.el8.x86_64 or later
Red Hat Enterprise Linux 7.5: 3.10.0-862.11.6.el7.x86_64 or later
SUSE Linux Enterprise Server 12 SP3: 4.4.162-94.72-default or later
SUSE Linux Enterprise Server 15: 4.12.14-23-default or later
1.2 hardware environment requirements
Server production and architecture | Confirm support for server manufacturing, models, core architectures, and host bus adapters (HbAS) or network interface controllers (NICS) to work with Oracle databases and Oracle grid infrastructure. |
---|---|
Server display card | At least 1024x768 display resolution, which is required by Oracle general installer. |
Minimum RAM | • at least 1GB RAM for Oracle database installation. 2GB memory is recommended. • Minimum 8 GB RAM for Oracle Grid infrastructure installation. |
Assign to / tmp directory | There is at least 1GB of space in the/ tmp directory. |
Swap space allocation relative to RAM(Oracle database) | Between 1GB and 2GB: 1.5 times the size of ram. Between 2GB and 16GB: equal to the size of ram, more than 16GB: 16GB note: if you enable HugePages for Linux server, the memory allocated to HugePages should be deducted from the available RAM before calculating the swap space. |
Minimum local disk storage space for Oracle Software | For Linux 86-64: Oracle Database Enterprise Edition, at least 7.2GB. The standard version of Oracle database is at least 7.2GB. Note: Oracle recommends that you allocate approximately 100 GB of additional space to apply any future patches on the existing Oracle home page. Refer to the patch documentation for disk space requirements related to a particular patch. |
1.3 media requirements
Oracle:21.3
LINUX.X64_213000_db_home.zip
2, Basic configuration of operating system
2.1 server hardware and memory
Use the following command to determine the physical location on the server RAM Size at least 1 G above # grep MemTotal /proc/meminfo Determines the size of the configured swap space # grep SwapTotal /proc/meminfo determine tmp Enough directory space 1 G # df -h /tmp (If/tmp Clean up if there is not enough space/tmp Directory to meet disk space requirements. Or set Oracle User environment, but also set TMP and TMPDIR Environment variables to the directory to use instead of/tmp) Confirm that the system version can support 19 c database # uname -m
2.2 turn off the firewall
Shut down running services #systemctl stop firewalld.service Turn off operating system self startup #systemctl disable firewalld.service Check closure systemctl status firewalld.service As follows, dead Indicates that it is not started; inactive Indicates that the current status is off close selinux: edit/etc/selinux/config file [root@DBServer1 ~]# vi /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 - SELinux is fully disabled. SELINUX=disabled # SELINUXTYPE= type of policy in use. Possible values are: # targeted - Only targeted network daemons are protected. # strict - Full SELinux protection. SELINUXTYPE=targeted
2.3 RPM package installation
oracle 21C requires the following RPM dependent packages:
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
compat-libstdc+±33-3.2. 3. Manual downloading and uploading is required
Mount optical drive # mount /dev/sr0 /mnt # cd /etc/yum.repos.d/ # mv public-yum-ol7.repo public-yum-ol7.repo.bak # vi yum.repo [base] Name=base Baseurl=file:///mnt Enabled=1 Gpgcheck=0 yum install 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 kmod*
2.4 user creation
Create oracle user
groupadd -g 1001 oinstall
groupadd -g 1002 dba
useradd -u 1001 -g oinstall -G dba oracle
passwd oracle -- modify oracle user password
2.5 kernel parameters
vi /etc/sysctl.conf kernel.shmall = physical RAM size / pagesize For most systems, this will be the value 2097152 kernel.shmmax = 1/2 of physical RAM fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 implement sysctl -p Command makes the above settings effective edit/etc/pam.d/login Add the following: vi /etc/pam.d/login session required pam_limits.so edit vi /etc/profile Add the following: #System environment variable if [ /$USER = "oracle" ] ; then if [ /$SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi umask 022 fi edit/etc/security/limits.conf Add the following: vi /etc/security/limits.conf oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536
2.6 environmental variables
# su - oracle $ vi .bash_profile export ORACLE_BASE=/oracle/app export ORACLE_HOME=/oracle/app/product/21.3.0/db_1 export ORACLE_SID=xxx export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH mkdir -p /oracle/app/product/21.3.0/db_1 mkdir -p /oracle/oraInventory chmod -R 775 /oracle chown -R oracle:oinstall /oracle/app chown -R oracle:oinstall /oracle/oraInventory
2.7 /etc/hosts write
root user
vi /etc/hosts
192.186. 30.90 (ip) zwy (hostname)
3, Installation media preparation
Upload media
LINUX.X64_213000_db_home.zip
It should be noted that 21c needs to unzip the software package directly to ORACLE_HOME directory
Oracle users
cd /oracle/app/product/21.3.0/db_1
unzip LINUX.X64_193000_db_home.zip
4, Install database software
Start installing RDBMS software
oracle users perform installation:
Open xmanager passive
export DISPLAY=xxx.xxx.xxx.xxx:0.0(xxx.xxx.xxx.xxx is the IP of the operating machine and 0.0 is the port of x xxmanager)
cd $ORACLE_HOME
./runInstaller
The installation screenshot is as follows:
Only install software is selected here, and the instance will be installed after the software is installed
Select install single instance
Select Enterprise Edition
Fill in the Oracle configured in the environment variable here_ BASE
5, DBCA database building
We choose advanced configuration
Select database template
Determine the database instance name and whether to create a container database