Installing and Configuring Oracle 12c in RHEL/CentOS/Oracle Linux 6.5 – Part II

In our previous article, we’ve shown you how to setup prerequisites for Oracle 12c installation. In this article we will cover installation and configuration of Oracle 12c in RHEL/CentOS/Oracle Linux 6.5, along with some Oracle post installation instructions.

Oracle 12c Installation in Centos
Oracle 12c Installation

Requirements

  1. Installing Prerequisites for Oracle 12c in RHEL/CentOS/Oracle Linux 6.5 – Part I

Installing Oracle 12c Database in CentOS 6.5

1. After extracting, we will get database directory which has 2.6GB in size. So, next we can go-head and install the oracle. Let us start the installation by running runInstaller. Navigate the installer Directory and run the Installer.

# cd database/
# ./runInstaller

Our Installer has been launched here. For every steps we need to move forward by Clicking Next or OK.

Oracle 12c Installer in RHEL
Oracle 12c Installer
Configure Security Updates

2. I’m going to skip this step as I don’t want security updates. Un-check the check box and mark the checkbox that says “Wish to receive security updates via My Oracle Support“.

Oracle Security Updates
Security Updates

Click on Next, you will get a error saying that you’ve not provided and email address click Yes to continue.

Enter Email Address
Enter Email Address
Software Updates

3. While we skiped the email step by default it will choose skip software updates Click next to continue.

Skip Software Updates
Skip Software Updates

Here I have resolved every dependencies but still it says that I have not reached the minimum requirements. Don’t worry, you can move forward to choose Yes to continue.

Oracle Requirement Check
Oracle Requirement Check
Installation Option

4. Next, choose the type of installation, I’m choosing the first option to Create and configure a database.

Oracle Installer type
Oracle Installer type
System Class

5. I’m going to choose Server Class here. If we need to install in any Desktop machines we can choose the above Option as Desktop Class.

System Class Installation
System Class Installation
Grid Installation Options

6. We are going to setup only single instance database installation here. So, select the first option.

Single Instance Database
Single Instance Database
Install Type

7. Choose the Advance install option to get more option while going through Installation steps.

Select Oracle Advance Install
Select Advance Install
Product Languages

8. By Default Language will be chooses as English. If you need to change according to your language, choose from the below list.

Select Oracle Language Type
Select Language Type
Database Edition

9. Time to choose which edition of database installation we looking for. For large scale Productions we can use Enterprise or if we need standard edition or we can choose the options as mentioned there. We need more than 6.5 GB space for Enterprise installation because database Population will grow soon/increase.

Select Oracle Database Edition
Select Database Edition
Installation Location

10. Enter the Oracle base installation location, here all installed configurations files will be stored. Here you need to define the location of oracle installation path, as we created the location in step #12 in the first part of this article.

Select Oracle Installation Location
Select Oracle Installation Location
Creating Inventory

11. For the first time installation, every Inventory files will be created under ‘/u01/app/oralnventory‘ directory. We have created the group oracle for installation. So now the oracle group has permission to access Inventory Directory. Let us choose the Oracle as the Group for Operating system group.

Create Oracle Inventory
Create Inventory
Configuration Type

12. Select the type of database, you want to create. Since, we are using for General purpose, so choosing general from the below options and click Next.

Oracle Configuration Type
Configuration Type
Database identifiers

13. Specify the Global Database name for uniquely identified and un-check the Create as Container database, as here we are not going to create multiple databases.

Database Identifiers
Database Identifiers
Configuration Options

14. In my installation, I have assigned 4GB of Memory to my virtual machine, but this is not enough for Oracle. Here we need to Enable allocate memory automatically for the use of system global Area.

Check the box that says Enable Automatic Memory Management and keep the default allocate memory. If we need some sample schema’s we can check and continue for installation.

Oracle Configuration Options
Configuration Options
Database Storage

15. We need to choose the location to store the database storage. Here I’m going to assign ‘/u01/app/oracle/oradata‘ location to save the databases and Click Next to continue to installer steps.

Define Database Storage
Define Database Storage
Management Options

16. I don’t have a Cloud control manager credentials from oracle, so I have to skip this step.

Management Options
Management Options
Recovery Options

17. If we have to Enable recovery options, then we have to check the Enable Recovery. In real environment these options are Compulsory to setup. Here to enable this option we need to add separate group and we need to define one of the file system location rather than default location where our database save.

Recovery Options
Recovery Options
Schema Passwords

18. We need to define the password for starter database which is all pre-loaded while the installations. Password must contain alphanumeric, upper_case and lower_case. For example, my password is Redhat123. This password we will use in web interface login too.

Set Password
Set Password
Operating system Groups

19. We need to provide system privileges to create database for that we need to choose the oracle group. Choose oracle for every options.

Select Oracle Group
Select Oracle Group
Summary

20. At last we can review every settings before database population. If we need any changes we can edit the settings.

Review Summary
Review Summary
Install Product

21. Installation started to Preparation and copying files. This will take long time to complete according to our Hardware Resource.

Oracle Installation Process
Oracle Installation Process

22. During setup process, it will ask to run two scripts as a root user as shown in the below picture.

Run Configuration Scripts
Run Configuration Scripts

Login into your Oracle Server as root user and switch to ‘/‘ partition and execute below scripts as shown.

# cd /
# ./u01/app/oralnventory/orainstRoot.sh
# ./u01/app/oracle/product/12.1.0/db_1/root.sh

During the script execution process, might it will ask you to enter the full path-name of the local bin directory, just enter the path as shown below and press Enter.

/usr/bin
Script Execution Process
Script Execution Process

23. After successfully execution of above two scripts, we need to move forward by clicking on OK.

Copying Database Files
Copying Database Files

24. After finishing all the above tasks successfully, we will receive the Database Configuration Assistant window with the all the details and it will show you the EM Database Express URL. Click OK to move forward.

https://oracle12c.tecmint.local:5500/em
Database Configuration Assistant
Database Configuration Assistant

If you wish to change the database accounts password, you can use the password management.

Password Management
Password Management

That’s it! We’ve successfully completed Database Configuration, now click Next to continue installation process.

Database Configuration Completed
Database Configuration Completed

Finally Oracle Database installation was successfully completed. Click on Close to quit the Oracle Installer.

Oracle Installation Completed
Oracle Installation Completed

25. After completing the Database installation, now move ahead to do some Post installation configuration. Open file ‘oratab‘ using vi editor.

# vim /etc/oratab

After opening file, search for the the following line.

orcl:/u01/app/oracle/product/12.1.0/db_1:N 

And change the parameter N to Y as shown.

orcl:/u01/app/oracle/product/12.1.0/db_1:Y

Restart the machine to take new changes.

26. After restarting machine, verify that the listener is up and running using ‘lsnrctl status‘ command.

# lsnrctl status
Verify Oracle Listener
Verify Oracle Listener

If it does not start automatically, you will need to start it manually using ‘lsnrctl start‘ command.

# lsnrctl start
Start Oracle Listener
Start Oracle Listener

Note: If the lsnrctl does not start, read the troubleshooting step (mentioned at the end of the article) to get fix the errors if any and try to start the listener.

27. Next login into Oracle database as a Operating system user using sysdba and start-up the database.

# sqlplus / as sysdba
# startup
Connect Oracle Database
Connect Oracle Database

28. Now it’s time to access Oracle Web interface at the following addresses.

https://oracle12.tecmint.local:5500/em

OR

https://192.168.0.100:5500/em

When EM Express prompts you for your username and password, Use to log in as a user with DBA privilege such as SYS or SYSTEM and use the password which we used for Schema password.

Login User = SYSTEM
Password   = Redhat123
Login Oracle Web
Login Oracle Web

29. After login into the Oracle panel, you can see the main interface as Database Home and few screen shot as shown below.

Oracle Database Home
Oracle Database Home
Oracle Memory Management
Oracle Memory Management
Tablespaces
Tablespaces
Performance Hub
Performance Hub

Step: Troubleshooting Oracle

30. If listener does not start, you need to replace the domain name with local IP address 127.0.0.1 in below file.

/u01/app/oracle/product/12.1.0/db_1/network/admin/listener.ora
Troubleshooting Listener
Troubleshooting Listener

That’s it! Finally we’ve successfully completed Oracle 12c installation and configuration in CentOS 6.5. If in-case any errors you get while setting up Oracle database 12c, feel free to drop your comments.

Hey TecMint readers,

Exciting news! Every month, our top blog commenters will have the chance to win fantastic rewards, like free Linux eBooks such as RHCE, RHCSA, LFCS, Learn Linux, and Awk, each worth $20!

Learn more about the contest and stand a chance to win by sharing your thoughts below!

Babin Lonston
I'm Working as a System Administrator for last 10 year's with 4 years experience with Linux Distributions, fall in love with text based operating systems.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

48 Comments

Leave a Reply
  1. I was facing following error,

    “Error in invoking target ‘irman ioracle’ of makefile ‘/u01/app/oracle/product/12.1.0/db_1/rdbms/lib/ins_rdbms.mk’ “

    I resolved this by copying libjavavm12.a to $ORACLE_HOME/llib directory.

    # cp /u01/app/oracle/product/12.1.0/db_1/javavm/jdk/jdk6/lib/libjavavm12.a /u01/app/oracle/product/12.1.0/db_1/lib/

    Hope this will help someone.

    Reply
    • @Chetan,

      Thanks for sharing the tip, hope it will help other users who face similar issue while installing Oracle in CentOS.

      Reply
      • I resolved the problem, in centos7 you have to create a script to start the listner and DB at the boot..

        this is the script :

        # /etc/systemd/system/oracle-rdbms.service
        # Invoking Oracle scripts to start/shutdown Instances defined in /etc/oratab
        # and starts Listener
        
        [Unit]
        Description=Oracle Database(s) and Listener
        Requires=network.target
        
        [Service]
        Type=forking
        Restart=no
        ExecStart=/opt/oracle/product/12.1.0/db_1/bin/dbstart /opt/oracle/product/12.1.0/db_1
        ExecStop=/opt/oracle/product/12.1.0/db_1/bin/dbshut /opt//oracle/product/12.1.0/db_1
        User=oracle
        
        [Install]
        WantedBy=multi-user.target
        
        Reply
    • If you logged in as Oracle user, then there is no need to run xhost + command, This is required when you login through root user and then switch the role to oracle user.

      Reply
  2. Hi Babin,

    After successful installation of 12c I am not able to access em. Can you suggest how to troubleshoot it..

    Best Regards,
    Nagaraju

    Reply
    • @Nagaraju,

      1. Please look into listener.ora host entry, Please add the host entry in the /etc/hosts if you don’t have a valid DNS server.
      2. If you have a valid DNS server please check the DNS address under /etc/resolv.conf.
      3. Check your iptables add a rule for web interface or flush it ( iptables -F), Check the lsnrctl status.

      Reply
  3. Just completed installation of 12c on Oracle linux 7. This webpage (both part1 and part2) is authentic and error free as far as my needs are concerned.

    Reply
  4. Hi Babin,

    I have successfuly installed Oracle 12c as per your installation guide. Thank you very much .

    Thanks,
    Suresh

    Reply
  5. hi sir,

    i followed ur steps ,i try this step to resolve listener (If listener does not start, you need to replace the domain name with local IP address 127.0.0.1 in below file.) its worked

    i tyed this but its not working
    28. Now it’s time to access Oracle Web interface at the following addresses.

    https://oracle12c.localdomain:5500/em –this my url i gotted while installation

    OR

    https://192.168.119.131:5500/em

    i am getting this error

    Unable to connect
    Firefox can’t establish a connection to the server at oracle12c.localdomain:5500.

    this my host file
    [oracle@oracle12c ~]$ cat /etc/hosts
    127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
    192.168.119.131 oracle12c oracle12c.localdomain
    [oracle@oracle12c ~]$

    and also i am getting while i logging to sqlplus / as sysdba

    [oracle@oracle12c ~]$ sqlplus / as sysdba

    SQL*Plus: Release 12.1.0.2.0 Production on Wed May 18 19:27:05 2016

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

    Connected to an idle instance.— see this i gott this error means it is not connected to database so please give me solution

    SQL> select dbms_xdb_config.gethttpsport() from dual;
    select dbms_xdb_config.gethttpsport() from dual
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    give me solution

    Reply
    • @balakrishna,

      Have you installed oracle in your local machine? Or in virtual box, vmware ?

      If you installed oracle in vb please add host entry under /etc/hosts, same we need those vb ip under base OS host entry.

      Here your issue is domain name not resolving that’s it.

      Regards

      Reply
  6. Hi All,

    I was able to run this “sqlplus / as sysdba” with success. But when I tried to run “startup”, I got this message,
    “ORA-01078: failure in processing system parameters
    LRM-00109: could not open parameter file ‘/home/u01/app/oracle/product/12.1.0.2/db_1/dbs/initcdb1.ora'”

    Can someone help me? I have installed Oracle 12C on fedora 23

    Reply
    • @Andre,

      Look like parameter file missing please run a find command as follows.

      find /home/u01/app/oracle/product/12.1.0.2/ -name *.ora -type f

      Reply
  7. Hi babin.
    Thanks for wonderful tutorial.
    My only problem is accessing it’s web interface.. I can’t go in there when I tried: http://oracle_12C.localdomain:1539/em firefox says :Unable to connect
    In my linux terminal is all ok:
    [oracle@localhost ~]$ startup

    [oracle@localhost ~]$ sqlplus / as sysdba

    SQL*Plus: Release 12.1.0.2.0 Production on Mon Apr 11 20:28:06 2016

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

    Connected to an idle instance.

    SQL> startup
    ORACLE instance started.

    Total System Global Area 792723456 bytes
    Fixed Size 2929400 bytes
    Variable Size 583011592 bytes
    Database Buffers 201326592 bytes
    Redo Buffers 5455872 bytes
    Database mounted.
    Database opened.

    Please help

    Reply
    • @elem,
      Can you try to disable iptables and try again to access from web.

      iptables -F
      service iptables stop

      Never run iptables -L once it stopped.

      Reply
  8. Hi team,

    I got below below error message after installing oracle 12c

    lsnrctl status
    -bash: lsnrctl: command not found

    Kindly quide me.

    Thanks,
    Senthil.

    Reply
  9. Hi babin,

    I am getting the below error while i run
    lsnrctl start as ‘oracle’ user

    Message 1053 not found; No message file for product=network, facility=TNSTNS-12541: Message 12541 not found; No message file for product=network, facility=TNS
    TNS-12560: Message 12560 not found; No message file for product=network, facility=TNS
    TNS-00511: Message 511 not found; No message file for product=network, facility=TNS
    Linux Error: 111: Connection refused

    Can you please help with this?

    i tried changiinig hostname in listener.ora as well,it did not work either.

    Reply
  10. hi, i was strucked in a question, when i installed oracle12c in database configureation stage. my OS is rhel7. I get a error “The EM Express port “”is not valid. Specify a valid unused port “. there is no port. then, i clicked ok button and continued with install, and get message at the end of install. then, i , as root, run the command sqlplus / as sysdba, and startup the database. i get another error, the screenshot was in below. i lookup the folder in ‘/u01/app/oracle/product/12.1.0/db_1/dbs/’, there is nothing besides a file named init.ora. please help me to solve it.

    ORA-01078: failure in processing system parameters
    LRM-00109: could not open parameter file ‘/u01/app/oracle/product/12.1.0/db_1/dbs/initorcl.ora

    Reply
  11. As per steps, I have installed Oracle db12c on RHEL6.5 , everything is working fine. I have started listner, started DB as well using #sqlplus / as sysdba
    #startup.

    done netstat -an |grep 80 , 443, 5500 which is em port. all are listing state but still I am not able to access db from console.

    Need help to resolve this issue ASAP.

    Reply
  12. HI,
    While runing the script orainstroo.sh gives the below error. Iam running as a root user, can you pls help me in resolving the issue

    /bin/cp: not writing through dangling symlink `/etc/oraInst.loc’
    /bin/chmod: cannot operate on dangling symlink `/etc/oraInst.loc’

    Reply
  13. when I reach Oracle Database Configuration Assitans I get ORA-12547 TNS Lost contact I tried everything two times with Linux Centos 7.

    Reply
  14. I have installed the db oracle and made changes to the file listener.ora but when i try to connect to web interface, i ‘m not able to connect!
    Can you help me?

    Reply
    • @Mario Principato

      If listener does not start, you need to replace the domain name with local IP address 127.0.0.1 in below file.

      /u01/app/oracle/product/12.1.0/db_1/network/admin/listener.ora

      Only if you don’t have a local DNS server make changes to this file, oracle12c.tecmint.local to 127.0.0.1

      Don’t forgot to restart the machine.
      Then restart the listener by switching to Oracle user, //lsnrctl start //
      Then check for status //lsnrctl status//
      Next login into Oracle database as a Operating system user using sysdba and start-up the database.

      # sqlplus / as sysdba
      # startup

      This will fix your issue.

      Reply
  15. I was trying to install 12c release 1 got install option at the end after around completion of 30-40% of installation i got error as /oracle/dbhome_01/____.sql file not found error can you help me….

    Reply
  16. I’m using centos 7 and I cannot find the 90-nproc.conf file which uses to limit the file limit for all users. How can I configure those limits in centos 7

    Reply
  17. Thank you.
    I’ve installed it on Oracle Linux Server 7 following Part I & Part 2 of your (well done) tutorial. It works fine.

    The only problem I got was connecting to https://oracle12.tecmint.local:5500/em
    Navigator told me that the ‘certificate’ wasn’t a good one.
    I’ve just told it to make an exception. (with chrome you need version 32, with the 31, I was stuck)
    stop & disable firewalld
    start & enable ssh.service
    Regards.

    Reply
    • I ‘ve forgotten to say that the install was made on a old Asus A8V Deluxe motherboard (2004) with 2 Gb ram and an AMD opteron 180 dual core as processor ;)

      Reply

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.