Finger Exercise 2
  getting an Oracle 12 c up and running

In the previous article we only made the first tiny steps and possibly to your disappointment, we are still not installing the database. We rather continue preparing the operating system and there are quite a few things to do. Not just that we need prepare for darker nights but we need to prepare our system for everyday operation. Install software, configure the operating system….. etc

Previous articles:

Finger Exercise 1 – getting an Oracle 12 c up and running

Here it’s important to note, I didn’t install an Oracle database for a while and I expect that the oracle installer will throw the one or the other error. According to that yield, I’ll re-visit the first two articles and adapt them. Nevertheless  I’ll publish the first two articles now.

More steps to configure the operating system

There are a few things that should be installed on our RedHat system (Scientific Linux) in a recent version:

binutils,
compat-db
control-center
gcc and
gcc-c++
glibc and
glibc-common
libstdc++
libstdc++-devel
make
ksh – the korn shell
sysstat
libaio-devel
unixODBC
unixODBC-devel
compat-libcap1-1.10

Note:
Of course this depends on the OS-Version and on the Linux-
Distribution you finally chose. Unfortunatelly I have made the
experience, that two installations are not completely identical
even if you used the exact identical installation procedure as long
as you don’t clone the systems. It seems, Linux distributors do not
absolutely control the installation process. The installation
scheme with all the dependencies is a mess.

Next we check a few kernel-parameters:

cat /proc/sys/kernel/shmmax       18446744073692774399
cat /proc/sys/kernel/shmmni       4096
cat /proc/sys/kernel/shmall       18446744073692774399
ipcs -lm | grep "min seg size"    min seg size (bytes) = 1 
cat /proc/sys/kernel/sem          250 32000 32 128
cat /proc/sys/fs/file-max         353282

These are the values my system is configured after being newly installed.

There will be a few things to fix and in order to get that, we’ll use the system-file /etc/sysctl.conf
I suggest the following changes to this file:

# new settings for running Oracle 12c
 fs.file-max = 6553600
 net.ipv4.ip_local_port_range = 1024 65000
 net.core.rmem_default=4194304
 net.core.rmem_max=4194304
 net.core.wmem_default=262144
 net.core.wmem_max=262144

Next we apply this set of changes.

su - root # if you haven't already done this
sysctl -p

Next change the SEMOPM paramater:

sysctl -w kernel.sem="250 32000 100 128"

To make this change permanent do the following

echo "kernel.sem=250 32000 100 128" >> /etc/sysctl.conf

Now this line is also in /etc/sysctl.conf and will be set at every system start.

And there is another file: /etc/security/limits.conf

Add the following lines to this file:

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

You may want to visit oracle’s documentation about the configuration of the Linux-kernel:

B.4.1 Minimum Parameter Settings for Installation
B.4.2 Changing Kernel Parameter Values
B.4.4 Setting UDP and TCP Kernel Parameters Manually

Note: These links may be subject to change and you may need to search for them.

In this example, I do not address the settings for UDP and TCP Kernel Parameters, since we will be far from a system workload that would require this. If you build a system with a high workload, you will need to consult an expert anyway. My current system parameters are close to Oracle’s recommendations, so for the time being I see no reason to act.

cat /proc/sys/net/ipv4/ip_local_port_range
1024 65000

And finally we need to create a group dba and a user oracle.

Since these two are not related to a natural person but to a very technical aspect of the system, their numerical IDs will be under 1000. Before we create the two, we make sure that we pick the correct numerical IDs and check out /etc/group and /etc/passwd.

For my current system, I’ll use gid=98 for the group dba

groupadd -g 97 oinstall
groupadd -g 98 dba

and uid=98 for the user oracle

mkdir /opt/oracle # if it doesn't already exist
useradd -d /opt/oracle -g 97 -g 98 -u 98 -s /usr/bin/ksh oracle
passwd oracle

Changing password for user oracle.
New password: **********
Retype new password: **********

cd /opt
chown -R oracle:dba oracle
echo "ulimit -S -s 16384" > /opt/oracle/.profil

The ulimit -s (stack size) will be one of the values the oracle installer will complain about if it’s less than 10240.

Now we go to the directory /data and unpack the zip-file with oracle’s database software.

cd /data
chown oracle:dba linuxx64_12201_database.zip

We are not finished here. We need to deal with a

Next we’ll run the Oracle-Installer and that will be described in Finger Exercise 3.

Subsequent articles:

Finger Exercise 3 – getting an Oracle 12 c up and running