Created
April 18, 2017 22:27
-
-
Save yonglai/a86fba3465f4e7645f34d966040d8eb6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
echo install oracle pre-requisites | |
groupadd -g 54321 oinstall | |
groupadd -g 54322 dba | |
useradd oracle -u 54321 -g oinstall -G dba | |
echo oracle:oracle | sudo chpasswd | |
usermod -aG wheel oracle | |
chown :dba /opt | |
chmod g+w /opt | |
dd if=/dev/zero of=/swapfile count=4096 bs=1MiB | |
chmod 600 /swapfile | |
mkswap /swapfile | |
swapon /swapfile | |
yum install -y compat-libcap1.x86_64 libstdc++-devel.x86_64 gcc-c++.x86_64 ksh.x86_64 libaio-devel.x86_64 sysstat.x86_64 | |
echo update limits.conf | |
echo '' >> /etc/security/limits.conf | |
cat <<EOT >> /etc/security/limits.conf | |
oracle hard nofile 65536 | |
oracle soft stack 10240 | |
oracle hard stack 32768 | |
EOT | |
echo update kernel parameters | |
cat <<EOT >> /etc/sysctl.conf | |
kernel.sem = 250 32000 100 128 | |
kernel.shmall = 594650 | |
kernel.shmmax = 3044612096 | |
kernel.shmmni = 4096 | |
kernel.sem = 250 32000 100 128 | |
fs.file-max = 6815744 | |
fs.aio-max-nr = 1048576 | |
net.ipv4.ip_local_port_range = 9000 65535 | |
net.core.rmem_default = 262144 | |
net.core.rmem_max = 4194304 | |
net.core.wmem_default = 262144 | |
net.core.wmem_max = 1048576 | |
EOT | |
sysctl -p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment