Ivan Kartik - Oracle and Linux Blog

Installation of Oracle Database 12c Release 2 on Redhat 7, Oracle Linux 7

Here is short installation HOWTO for Oracle Database 12c Release 2 for Redhat 7, Oracle Linux 7 (and possibly CentOS 7 which is not officially certified and supported distribution). This post covers Oracle Database software installation (only). In case you want to use ASM or other Grid features and you don't have Grid Infrastructure 12c R2 installed refer to my previous post: http://ivan.kartik.sk/index.php?controller=post&action=view&id_post=76 If you don't need ASM or GI features you can continue with this part directly.
This post also contains some steps which were used during Oracle Grid Infrastructure 12c R2 installation, so you can skip those if you followed my GI installation HOWTO.

1. OS preparation

# - stands for "root" action
$ - stands for "oracle" (owner of Oracle software)

Note: You can skip this step if you have installed the Grid Infrastructure Software.

# groupadd dba
# groupadd oinstall
# useradd -g oinstall -G dba oracle

Create ORACLE_HOME directory. (Note: In my example I use /opt/oracle/12201 directory, change it to your preferred location):

# mkdir -p /opt/oracle/12201
# chown -R oracle:oinstall /opt/oracle

2. Install required packages

Note: You can skip this step completely once you have installed the Grid Infrastructure Software (as described in my previous post related to Grid Infrastructure installation).

First install required packages (use this command if your computer has access to Internet or you have registered and enabled your media as yum repository).

Add/set kernel parameters to/in /etc/sysctl.d/99-sysctl.conf file:

fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500

Execute sysctl -p command to apply settings:

# sysctl -p

Add/set limits to/in /etc/security/limits.d/99-oracle-rdbms.conf file:

oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc    16384
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768
oracle   hard   memlock    134217728
oracle   soft   memlock    134217728

4. Software download and install

Download installation archive (linuxx64_12201_database.zip) from http://www.oracle.com/technetwork/database/enterprise-edition/downloads/oracle12c-linux-12201-3608234.html

Unpack the installation archive and start the installer:

$ unzip linuxx64_12201_database.zip
$ cd database
$ ./runInstaller

Next steps after installation

In case you want startup your Oracle Database(s) automatically and you don't have Oracle Grid Infrastructure installed, you can follow the steps described in the post Configuring automatic startup of Oracle Database under systemd on RHEL 7/OEL 7/CentOS 7 at http://ivan.kartik.sk/index.php?controller=post&action=view&id_post=65




Installation article for 11g Release 2 for Solaris 11 Express (2010.11)

Oracle killed the OpenSolaris project (fork of former OpenSolaris is now OpenIndiana - http://openindiana.org) and released Solaris 11 Express. So the new Solaris is officially out and comes with several very interresting features but I'll mention about few which user may facing to during his work with this version. Root account is now Root role In fact this thing is not new. RBAC was here for long but now it is the default. When you try to log on as the "root" user then logon will fail. So you can't to logon directly. You need to log on as non-root user and then execute "su -". For successfull logon via "su -" command you need to have granted "root" role otherwise you will get "Roles can only be assumed by authorized users" message. Only first created user (you are creating it during installation) has this role granted by default. So for the other users root role needs to be granted. Example:

usermod -R root johndoe

Of course you can specify role (root role in this case) also during user creation. Example:

useradd -R root -m -d /export/home/johndoe johndoe

You may ask "Is there possibility to set old fashioned behaviour?" Yes, it is but be sure you really want to do that. To enable login as root directly execute following command:

rolemod -K type=normal root

Also to enable connect using SSH and allow root login you need to change PermitRootLogin in SSH configuration and restart SSH service.

PermitRootLogin yes

and then

svcadm restart ssh

Done. Some keywords for study: RBAC, sudo, pfexec, pf(shell name) The home directory and default shell Root role is not the only thing that first user will get. When you create new user using following command:

useradd oracle

Assume that first account created (during installation) was "ivan". If you compare entries in /etc/passwd you will find one difference. "ivan" account has /bin/bash as default shell and "oracle" has /bin/sh (which is symlink to ksh93 in fact). For change of shell to Bash just use the usermod command:

usermod -s /bin/bash oracle

The second difference is that /home/oracle does not exist even if it is stored in /etc/passwd file. When you try to create it manually you will get: "mkdir: cannot create directory `oracle': Operation not applicable". You may delete the user and try to create it using -d an -m switch. In that case you will get: "UX: useradd: ERROR: Unable to create the home directory: Operation not applicable.". The answer for this is simple. You can't do that because /home directory is maintained by AutoFS. Possible solutions (classic well known way): 1. Use different (existing) home directory. Example:

useradd -R root -m -d /export/home/johndoe johndoe

2. Modify /etc/auto_home add relevant entry for future user and then create it. Example:

echo "johndoe localhost:/export/home/&" >> /etc/auto_home
useradd -m -d /home/johndoe johndoe

Bugs and Fun No, this is not name of some feature. This will be just light description of issues I was facing to during the installation of Oracle Database.

- version doesn't know Solaris 11 OS. In fact it will install correctly also it is functional it just skips the prerequistes check step. You need to download latest release from My Oracle Support website.

- version knows the Solaris 11 OS but during prerequisites check it requests to install non existing packages (replaced) packages i.e.: SUNWi1of and SUNWxwfnt (I belive there were replaced by SUNWfont-xorg-core and SUNWfont-xorg-iso8859-1 packages).

- version requests to set LoginGraceTime 0 but I don't think this is a good idea even there is limit to max connections.

- There is lot of URLs to OpenSolaris website and lot of "OpenSolaris" texts in configuration files.


Installation article you can find here http://ivan.kartik.sk/oracle/install_ora11gR2_solaris11.html or in menu of this page. I belive that this paper will work also for last OpenSolaris versions and OpenIndiana (I wish long life to this project) as well. Enjoy.

Installation article for 11g Release 2 on Redhat,OEL and Centos 5

I prepared short installation HOWTO for Redhat and it's clones (Oracle Enterprise Linux and Centos). Installation on first two of them was fine without significant problems but Centos needs couple of workarounds which are the reason why I created this article. In fact there is not problem with Centos as it is same as RHEL and OEL but as Centos is not certified operating system OUI and some scripts makes complications during installation process. You might say "Use certified distribution", but there are lot of Centos users which don't want to use other distribution (for example because of missing free updates) or they don't use some of Virtual machines for Oracle. But in fact some of certified distributions aren't fully supported by the new Database release. In case You are the Centos 5 user here are the fixes for successful installation of 11gR2:

1. Old good /etc/redhat-release and /etc/issue (Optional)

Solution which I posted years ago for 10gR1 release does not solve everything. Also modification of oraparam.ini (which was far better solution) does not solve anything. But to be sure apply this settings (backup /etc/redhat-release and /etc/issue before) change existing value to

Red Hat Enterprise Linux Server release 5 (Tikanga)

2. Install fake redhat-release RPM file

OUI checks for presence of redhat-release package and if it is missing then it will skip the prerequisites verification process. Unfortunatelly there is centos-release package installed on system (Don't uninstall it!). I created fake centos-fake.noarch.rpm RPM package to solve this issue. If you don't trust to my packages (I fully understand this) You can build your own package using this .spec file. Install downloaded (built) package:

rpm -i centos-fake.noarch.rpm

Don't worry about package name, after installation it will appear as "redhat-release" in RPM database.

3. Solve the "ADVM/ACFS is not supported" issue

This workaround solves Oracle Database 11g Release 2 Grid Infrastructure installation (neccessary for ASM or RAC). In fact ASMFS is not needed for for ASM but in case you want to test this new feature this workaround will help you. ASMFS feature is available only on Redhat and Oracle Enterprise Linux distribuion. So SUSE (SLES) is out of play at this moment (I won't speculate wh y it so but modules are provided for RH and OEL kernel only) so as You can see not all certified distributions are supported equally. During root.sh execution or ohasd initiation You could see one of these messages:

ADVM/ACFS is not supported on centos-release-5-4.el5.centos

ADVM/ACFS is not supported on centos-release-5-3.el5.centos

ADVM/ACFS is not supported on centos-release-5-2.el5.centos

ADVM/ACFS is not supported on centos-release-5-1.el5.centos


To workaround use this simple fix (I suggest to do it before GRID installation):

echo "redhat-release-5Server-5" > /tmp/.linux_release

To prevent deletion or modification of .linux_release file I suggest to set immunitable flag:

chattr +i /tmp/.linux_release

Note!: This workaround is working for Redhat clones (OEL, Centos) only! It will be not working on other distros.

Now your Centos will appear for Oracle 11g R2 as certified distribution. Full installation paper for all three distributions (including workarounds for Centos) You can find here or in menu of this page.

Installation article for 11g release 2 on Solaris x86_64

I was installing new (second) release of Oracle 11g database on Solaris x86 (Intel/AMD compatible) 64 bit version. Installation was fain, I had been facing just one error (.../root.sh: /usr/xpg4/bin/grep: not found) during execution of root.sh script at the end of the installation. As I was unable to find right package and during review of script (I found out there is not used grep -E) so I created symlink as workaround. As usual I made installation article which You can find on right menu of this page.

Hello Blog!

I was thinking about my own blog for long time. Final decision was made after answering couple of my questions such as: - Is there something meaningful you can write about? - Will you find some free time for writing posts? and so on... Answer is pretty simple: "Don't know. I'll will be writing about Oracle, Linux or other Unix-like OS and other thoughts what crossed my mind. Basicaly I will publish anything I find as interesting..." I decided to code my own blog because I couldn't found appropriate free blog software (which met all my needs) on Freshmeat site. So "Hello Blog" and I belive you enjoy it. My apologies for my English, corrections are welcomed.