Install Oracle 12C Release 2 (12.2) on Fedora 25

This article presents installation of Oracle database 12C(12.2) on Fedora 25. Read following article to install Fedora 25 Linux: Install Fedora 25(for comfort set 4G memory for your virtual machine).


Software for 12CR2 is available on OTN or edelivery

Database software

OS configuration and preparation

OS configuration is executed as root. To login as root just execute following command in terminal.

su - root

It’s recommended to update your Fedora 25 kernel to latest version as root

dnf update

The “/etc/hosts” file must contain a fully qualified name for the server.

<IP-address>  <fully-qualified-machine-name>  <machine-name>

For example. fedora localhost.localdomain localhost

Set hostname

hostnamectl set-hostname --static

Add groups

#groups for database management
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
groupadd -g 54324 backupdba
groupadd -g 54325 dgdba
groupadd -g 54326 kmdba
groupadd -g 54327 asmdba
groupadd -g 54328 asmoper
groupadd -g 54329 asmadmin
groupadd -g 54330 racdba
Add user Oracle for database software
useradd -u 54321 -g oinstall \
-G dba,oper,backupdba,dgdba,kmdba,racdba oracle

Change password for user Oracle

passwd oracle


Check which packages are installed and which are missing

rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n' binutils \
compat-libcap1 \
compat-libstdc++-33 \
glibc \
glibc-devel \
ksh \
libaio \
libaio-devel \
libX11 \
libXau \
libXi \
libXtst \
libgcc \
libstdc++ \
libstdc++-devel \
libxcb \
make \
nfs-utils \
smartmontools \
net-tools \

NOTE – compat-libcap1 will fail but can be ignored. It is needed only for grid not for database

Install missing packages (two options)

  • from dvd. It’s just example:
#directory with mounted Oracle Fedora 25 install disk 

cd /media/<Fedora 25>/Server/Packages 

#install missed packages (example for package ksh) 

rpm -Uvh ksh
  • or install via internet connection. It’s just example:
dnf install ksh

Add kernel parameters to /etc/sysctl.conf

# kernel parameters for 12gR2 installation

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

Apply kernel parameters

/sbin/sysctl -p

Add following lines to set shell limits for user oracle in file /etc/security/limits.conf

# shell limits for users oracle 12gR2

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

Disable firewall

service iptables stop
chkconfig iptables off

Additional steps

Add following lines in .bash_profile for user oracle

# Oracle Settings
export TMP=/tmp

export ORACLE_BASE=/ora01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.2.0/db_1


export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;

alias cdob='cd $ORACLE_BASE'
alias cdoh='cd $ORACLE_HOME'
alias tns='cd $ORACLE_HOME/network/admin'
alias envo='env | grep ORACLE'

umask 022

if [ $USER = "oracle" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
       ulimit -u 16384 
       ulimit -n 65536
       ulimit -u 16384 -n 65536


Directory structure

Create directory structure as user root

ORACLE_BASE – /ora01/app/oracle

ORACLE_HOME – /ora01/app/oracle/product/12.2.0/db_1

mkdir -p /ora01/app/oracle/product/12.2.0/db_1
chown oracle:oinstall -R /ora01

SSH server

I use it for later connection as user oracle in GNOME using command ssh oracle@fedora -X. Without it it won’t be possible to run X interfaces like Oracle Universal Installer.

Install ssh server. In workstation it should be already installed.

dnf install openssh-server

start ssh server

systemctl start sshd

verify it works

systemctl status sshd

Install database software

Let’s start with database software installation as oracle user. Usually I’m connected as my personal user tomasz in GNOME so you need to use ssh.

Connect as user Oracle

[tomasz@fedora ~]$ ssh -X

and start universal installer after unzipping binaries

--unizp software it will create directory "database" 
--where you can find installation software


--I defined 4 aliases in .bash_profile of user oracle to make 
--administration easier :)

[oracle@fedora ~]$ alias envo cdob cdoh tns
alias envo='env | grep ORACLE'
alias cdob='cd $ORACLE_BASE'
alias cdoh='cd $ORACLE_HOME'
alias tns='cd $ORACLE_HOME/network/admin'

--run alias command envo to display environment settings

--run alias command cdob and cdoh 
[oracle@fedora ~]$ cdob
[oracle@fedora oracle]$ pwd

[oracle@fedora db_1]$ cdoh
[oracle@fedora db_1]$ pwd

--run installation from "database" directory

1. Ignore first message and click “Yes”. On next screen uncheck checkbox “I wish to receive security updates via My Oracle Support” and then click “Next” button.

2. Ignore following message and click “Yes” button.

3. Select “Create and configure a database” then click “Next” button.

4. Select “Server class” and click “Next” button.

5. Accept default “Single instance database installation” and click “Next” button.

6. Select “Advanced install” to later select more options during database installation and click “Next” button.

7. You can select here type of binaries to install. Once it’s done click “Next” button.

8. Here you should see directories for ORACLE_BASE and ORACLE_HOME for your binaries according to environmental settings. Click “Next” button.

9. Accept default and click “Next” button.

10. Accept default “General Purpose/ transaction Processing” and click “Next” button.

11. Check checkbox “Create as Container database” and enter “Pluggable database name” to add your first container database ORA12C and pluggable database PORA12C1, click “Next” button.

12. Specify more details about your database on 3 tabs where you can define memory settings, character set and if to install sample schema on your database. Once you are happy with your settings click “Next” button.

13. Specify directory where you want to install your database files then click “Next” button.

14. On this page you can register your database in Oracle Enterprise Manager”. Accept default settings and click “Next” button.

15. Check checkbox “Enable Recovery” to specify directory for your recovery area “Recovery area location” and click “Next” button.

16. Specify password for each user or enter the same for all. Once it’s done click “Next” button.

17. Here you can specify OS group for each oracle group. Accept default settings and click “Next” button.

18. Checks are started to verify if OS is ready to install database software.

19. If everything is right click “Install” button. It’s the last moment to come back to each of previous point and make changes.

20. Installation in progress … go play FIFA on PS4 :p

21. Once binaries are installed the last step is to run 2 scripts as user root.

--execute scripts

Second script enables to install Oracle Trace File Analyzer (TFA). It’s worth to install it.

23. Installation will continue … but suddenly error occurred

It was problem with listener. I had to start it manually. Once LISTENER is started click “Retry” button and installation should continue

[oracle@fedora ~]$ lsnrctl start

24. You are lucky 12C installation is completed. Click “Close” button.

25.Another summary with information about “Enterprise manager database express”

26. Try to login as SYS to Enterprise manager Database express 12C .

NOTE – It requires to install flash plug-in and running listener. In addition don’t provide container name to connect.

27. Try to connect to container database as user SYS using sqlplus tool

[oracle@fedora ~]$ sqlplus / as sysdba

SQL*Plus: Release Production on Mon Apr 10 15:52:07 2017

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release - 
64bit Production



In release following bugs can be encountered

  1. Problem with LISTNER. It doesn’t started and DBCA recognized it as bug.

Have a fun 🙂


One thought on “Install Oracle 12C Release 2 (12.2) on Fedora 25

  1. i followed the same steps on fedora 26 , the installation hangs on 92% database configuration assistant .
    i hope we can see a post regarding installation oracle 12.2 on fedora 26 soon.
    best regards..

Leave a Reply

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