CentOS and Oracle

# https://wiki.centos.org/HowTos/Oracle12onCentos7

# rsync -cEhikLmrtz --progress --delete-after KIT/Oracle/linuxamd64_12102_database_se2_* root@172.16.148.136:/root/KIT
# scp KIT/Oracle/linuxamd64_12102_database_se2_* root@172.16.148.137:/root/KIT

# run as root ...
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
passwd oracle

# For Intel N3150 CPU I changed the original "kernel.shmmax = 1987162112" like below.
echo "# oracle kernel parameters
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4093800448
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 = 1048586" >> /etc/sysctl.conf

# Check and apply the oracle kernel parameters:
# -p Load in sysctl settings from the file specified or /etc/sysctl.conf if none given. 
#    Specifying - as filename means reading data from standard input.
# -a Display all values currently available.
sysctl -p
sysctl -a

# Specify limits for oracle user in the /etc/security/limits.conf
echo "# limits for oracle user
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536" >> /etc/security/limits.conf

yum install -y zip unzip
unzip KIT/linuxamd64_12102_database_se2_1of2.zip -d /stage/
unzip KIT/linuxamd64_12102_database_se2_2of2.zip -d /stage/
chown -R oracle:oinstall /stage/

# Create /u01 directory for Oracle software and /u02 for database files.
mkdir /u01
mkdir /u02
chown -R oracle:oinstall /u01
chown -R oracle:oinstall /u02
chmod -R 775 /u01
chmod -R 775 /u02
chmod g+s /u01
chmod g+s /u02

# Check required packages are installed:
yum list binutils.x86_64 compat-libcap1.x86_64 gcc.x86_64 gcc-c++.x86_64 glibc.i686 glibc.x86_64 glibc-devel.i686 glibc-devel.x86_64 ksh compat-libstdc++-33 libaio.i686 libaio.x86_64 libaio-devel.i686 libaio-devel.x86_64 libgcc.i686 libgcc.x86_64 libstdc++.i686 libstdc++.x86_64 libstdc++-devel.i686 libstdc++-devel.x86_64 libXi.i686 libXi.x86_64 libXtst.i686 libXtst.x86_64 make.x86_64 sysstat.x86_64

# Install missing required packages:
yum install -y binutils.x86_64 compat-libcap1.x86_64 gcc.x86_64 gcc-c++.x86_64 glibc.i686 glibc.x86_64 glibc-devel.i686 glibc-devel.x86_64 ksh compat-libstdc++-33 libaio.i686 libaio.x86_64 libaio-devel.i686 libaio-devel.x86_64 libgcc.i686 libgcc.x86_64 libstdc++.i686 libstdc++.x86_64 libstdc++-devel.i686 libstdc++-devel.x86_64 libXi.i686 libXi.x86_64 libXtst.i686 libXtst.x86_64 make.x86_64 sysstat.x86_64

# Also install the "X Window System" package group (already included with GNOME, KDE, MATE, XFCE, Cinnamon).
yum groupinstall -y "X Window System"

# the only one working (after second boot) with CentOS on VMWare 12.1.0 on ASRock with Intel N3150
# login with oracle user created above
sudo yum -y groups install "MATE Desktop"
echo "exec /usr/bin/mate-session" > ~/.xinitrc
startx
# open a command prompt with oracle user and run:
/stage/database/runInstaller

...
# see Oracle Installer Screens at https://wiki.centos.org/HowTos/Oracle12onCentos7#head-539cfe4ae2bd6f126de557cbfc5d7d7a99826c04
...

# Firewall (run as root)
firewall-cmd --get-active-zones
firewall-cmd --zone=public --add-port=1521/tcp --add-port=5500/tcp --add-port=5520/tcp --add-port=3938/tcp --permanent
firewall-cmd --reload
firewall-cmd --list-ports

# Oracle Environment
# Login as oracle user and add the following values to the /home/oracle/.bash_profile
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/lib64; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
# Reload the bash_profile to apply the new settings:
. .bash_profile

# Login to the database
sqlplus system@orcl

# Manage database with Oracle Enterprise Manager:
https://<hostname>:5500/em

Leave a Reply

Your email address will not be published. Required fields are marked *