Add the following lines to the end of the file.
Determine the value of kernel.shmmax based on the VM memory size. For example, if the VM memory is 160 GB, the kernel.shmmax value should be 70% of the VM memory, which is 120259084288 bits (160 × 70% × 1024 × 1024 × 1024). |
kernel.shmall = 4294967296
kernel.shmmax = 120259084288
fs.aio-max-nr = 1048576
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.file-max=6815744
Execute the vi /etc/security/limits.conf command and add the following lines.
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 10240
Execute the vi /etc/pam.d/login command and add the following lines.
session required pam_selinux.so open
session optional pam_keyinit.so force revoke
session required pam_limits.so
session required pam_namespace.so
Execute the vi /etc/profile command, add the following lines, and then execute the sysctl –p command.
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
HugePages locks SGA in the VM memory to avoid SGA system page table lookups.
Verify that the HugePage size is 2048 KB.
cat /proc/meminfo |grep Hugepagesize
Hugepagesize: 2048 kB
Determine the value of vm.nr_hugepages, which is the value of sga_max_size (memory size allocated to SGA) plus 2 GB.
vm.nr_hugepages = (VM memory size × 0.65 × 0.75 + 2) × 1024/HugePage size
If the VM memory size is 32 GB, and the HugePages size is in MB, the value of vm.nr_hugepages is 40960.
Add the following line to the end of the /etc/sysctl.conf file.
vm.nr_hugepages=40960
Validate the configuration changes.
sysctl -p
sysctl -a|grep nr_hugepages
vm.nr_hugepages = 40960
vm.nr_hugepages_mempolicy =40960
Disable SELinux.
sed -i "s/SELINUX=enforcing/SELINUX=disable/" /etc/selinux/config
setenforce 0
getenforce
Disable the firewall.
service iptables stop
chkconfig iptables off
Create the Oracle installation directory and configure permissions and user or user group ownership of some folders.
mkdir -p /u01/app/oracle/product/12.2.0/db
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/
Upload the Oracle installation package to /home/oracle as the root user.
Upcompress the installation package.
Edit the attributes of the file and directory.
chown -R oracle:oinstall /home/oracle/database/
Install Xmanager on your local PC and open Xmanager > Passive.
The IP address must be the one configured in "Configure Oracle environment variables." Make sure the local PC can reach the target Linux VMs.