Install Oracle 12C Release 1 (12.1) on Fedora 20

This article presents how to install Oracle 12C( Release 1 on Fedora 20.

Read following article how-to install Fedora 20 Linux:Install Fedora 20 (for comfort set 2G memory for your virtual machine before proceeding with Oracle software installation).

Check following article for latest release Fedora 21: Install Oracle 12C Release 1 (12.1) on Fedora 21


Software for 12CR1 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

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
/usr/sbin/groupadd -g 501 oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/groupadd -g 503 oper
Add user Oracle for database software
/usr/sbin/useradd -u 501 -g oinstall -G dba,oper oracle

Change password for user Oracle

passwd oracle

Disable secure linux by editing the “/etc/selinux/config” file, making sure the SELINUX flag is set as follows. It requires REBOOT to be effective !!!


Edit the “/etc/redhat-release” file replacing the current release information “Fedora release 20 (Heisenbug)” with the following.

redhat release 5


Check which packages are installed and which are missing

rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n' binutils \
compat-libstdc++-33 \
gcc \
gcc-c++ \
glibc \
glibc-common \
glibc-devel \
glibc-headers \
ksh \
libaio \
libaio-devel \
libgcc \
libstdc++ \
libstdc++-devel \
libXext \
libXtst \
libX11 \
libXau \
libXi \
make \
sysstat \
unixODBC \
unixODBC-devel \

Install missing packages. It’s just example:

yum install compat-libstdc++-33 unixODBC unixODBC-devel sysstat
Add kernel parameters to /etc/sysctl.conf
# kernel parameters for 12gR1 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 12gR1

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

Additional steps

Create .bash_profile for user oracle

# Oracle Settings
export TMP=/tmp

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

export PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin

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


Directory structure

Create directory structure as user root

ORACLE_BASE – /ora01/app/oracle

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

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

Secure Linux

Disable secure linux by editing the “/etc/selinux/config” file, making sure the SELINUX flag is set as follows. It requires REBOOT to be effective !!!


Add the following line to the “/etc/pam.d/login” file, if it does not already exist.

session    required

In Fedora 20 /tmp data is stored on tmpfs which consumes memory and is too small. To revert it back to storage just run following command and REBOOT machine to be effective.

systemctl mask tmp.mount

Install database software

Let’s start with database software installation as oracle user.

su - oracle

--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 heaven :)

[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. 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 “Skip software updates” and click “Next” button.


4. Ignore following message. Just click “Yes” button.


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


6. Select “Desktop Class” and click “Next” button.


7. On the screen you need to define global database name and pluggable database name. Rest of options you can keep default. Then click “Next” button.


8. Accept default settings then click “Next” button.


9. Summary screen just before installation. It’s the last moment to make changes in previous steps. If you are ready click “Install” button.


10. Installation begins …


11. Unfortunately I received error during binaries linking


in log you should see

/usr/bin/ld: note: '__tls_get_addr@@GLIBC_2.3' is defined in 
DSO /lib64/ so try adding it to the linker 
command line /lib64/ could not read symbols: 
Invalid operation

INFO: collect2: error: ld returned 1 exit status

12. To solve this problem do following as user Oracle

  • remove directory /ora01/app/oracle/product/12.1.0/db_1/lib/stubs
rm -rf /ora01/app/oracle/product/12.1.0/db_1/lib/stubs
  • backup file $ORACLE_HOME/rdbms/lib/
cd $ORACLE_HOME/rdbms/lib/
  • make changes in $ORACLE_HOME/rdbms/lib/

modify line 176




modify line 279 and 280



LINK32=$(FORT_CMD) $(PURECMDS) $(ORALD) $(LDFLAGS32) $(COMPSOBJS) -Wl,--no-as-needed

modify line 3041 and 3042




Once it’s done click “Retry” button on screen from point 11 to continue with installation. Linking should finish properly and binaries installation should continue.

13. In the end you will be asked to run as root two scripts. Once they are completed click “OK” button – installation will proceed.


fedora_ora12_13 fedora_ora12_14

18. Once binaries are installed automatically DBCA (database configuration assistant) will start to create new database.


19. You should see summary screen for your database. You can click “Password Management” to unlock and change passwords for default account. Click “OK” button.


20. Installation is finished. Click “Close” button.


21. Post installation steps

Edit the “/etc/redhat-release” file to restore original release information.

Fedora release 20 (Heisenbug)

Edit the “/etc/oratab” file to set restart flag for ORA12C to ‘Y’.


Have a fun 🙂


15 thoughts on “Install Oracle 12C Release 1 (12.1) on Fedora 20

  1. Hello, thank you for your tutorial.
    Finishing this I will end up with a error message: “the em express port is not valid” I tried to install on Oracle Linux 6; CentOS 6; CentOS7 and Fedora 20. Always the same problem.
    any idea what this can be?

  2. Very good help, may be two little things to change :
    1] In your bash_profile :
    should be
    export PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin
    2] At the end, in the /etc/oratab :
    Should be

  3. Sorry, I am new to Oracle, I am installing it locally on Fedora to play around with. Can someone help me understand what this part of the instructions means?
    The “/etc/hosts” file must contain a fully qualified name for the server.

    For example. fedora localhost.localdomain localhost

  4. I know this is an old post, but thanks a lot for this guide.
    You helped me saving quite some time and I am late as hell learning these things.
    It works on Fedora 23 as well. 🙂

Leave a Reply

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