Silent install Oracle 12c release 1

1. groupadd -g 54321 oinstall
2. groupadd -g 54322 dba
3. useradd oracle -u 54321 -g oinstall -G dba
4. echo oracle:oracle | sudo chpasswd
(optional) make oracle sudoer: sudo usermod -aG wheel oracle
5. make sure the following are set up correctly for oracle user by modifying /etc/security/limits.conf
Open file descriptors
nofile
at least 1024
at least 65536
Number of processes available to a single user
nproc
at least 2047
at least 16384
Size of the stack segment of the process
stack
at least 10240 KB
at least 10240 KB, and at most 32768 KB

To see the hard and soft values of open file descriptors:
ulimit -Hn
ulimit -Sn

To see the hard and soft values of processes available:
ulimit -Hu
ulimit -Su

To see the hard and soft values of stack segment
ulimit -Hs
ulimit -Ss
6. make a copy of database install response file: database/response/db_install.rsp
7. edit the response file db_install.rsp by following the instructions in the file and change its permission to 700
chmod 700 database/response/db_install.rsp
8. if use /opt as the parent folder of oracle home, make sure to set the group of the folder to dba and add group write privilege
sudo chown :dba /opt
sudo chmod g+w /opt

8. need to run runfixup.sh as root

9. you may need to increase the swap size
(reference: https://unix.stackexchange.com/questions/294600/i-cant-enable-swap-space-on-centos-7)
sudo dd if=/dev/zero of=/swapfile count=4096 bs=1MiB (add 4G swap)
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

10. install missming packages
sudo 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

11. update kernel parameters
a) edit /etc/sysctl.conf to add or edit the following lines:
# Recommended value for kernel.sem
kernel.sem = 250 32000 100 128
# Recommended value for kernel.shmmax
kernel.shmmax = 3044612096
# Recommended value for kernel.shmmni
kernel.shmmni = 4096
# Recommended value for kernel.shmall
kernel.shmall = 594650
# Recommended value for fs.file-max
fs.file-max = 6815744
# Recommended value for net.ipv4.ip_local_port_range
net.ipv4.ip_local_port_range = 9000 65535
# Recommended value for net.core.rmem_default
net.core.rmem_default = 262144
# Recommended value for net.core.rmem_max
net.core.rmem_max = 4194304
# Recommended value for net.core.wmem_default
net.core.wmem_default = 262144
# Recommended value for net.core.wmem_max
net.core.wmem_max = 1048576
# Recommended value for fs.aio-max-nr
fs.aio-max-nr = 1048576

b) sudo sysctl -p

12. run: ./runInstaller -silent -responseFile [response file full path]

13. after installation completes, following the instructions to run generated scripts. You need to create a password response file to run configToolAllCommands script.
touch ~/cfgrsp.properties
chmod 600 ~/cfgrsp.properties
Add the following to cfgrsp.properties file:
oracle.assistants.server|S_SYSPASSWORD=password
oracle.assistants.server|S_SYSTEMPASSWORD=password
oracle.assistants.server|S_DBSNMPPASSWORD=password
oracle.assistants.server|S_PDBADMINPASSWORD=password
oracle.assistants.server|S_EMADMINPASSWORD=password
oracle.assistants.server|S_ASMSNMPPASSWORD=password

14. add the following line to ~/.bashrc
ORACLE_HOME=/opt/oracle/product/12.1.0/dbhome_1
ORACLE_SID=orcl
export ORACLE_HOME ORACLE_SID
export PATH=$PATH:$ORACLE_HOME/bin

15. config Oracle to start orcl when system starts using systemd

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s