The Musings of CrashSensei

Random thoughts caught by the InterWeb

Install Oracle Database 12c Single Instance on OL7

By crashsensei | November 17, 2017 | 0 Comment


This article is a continuation of the “Installing Oracle Linux 7”.

Install Binaries

  1. Launch the Installer
    1. Login or Switch to the Oracle user su - oracle
    2. Setup the DISPLAY environment variable if needed
      [ `env | grep DISPLAY` ] && echo "Display already set" || \
      export DIPLAY=<MACHINE-NAME>:0.0
    3. Setup the ORACLE_BASE environment variable
      export ORACLE_BASE=/opt/oracle/app/oracle
    4. Run the database installer
      cd /opt/oracle/dump/database
  2. Uncheck I wish to receive security updates via My Oracle Support and click Next
  3. Acknowledge the warning message by clicking Yes
  4. Select Create and configure a database and click Next
  5. Select Server class and click Next
  6. Ensure Single instance database installation is selected and click Next
  7. Select Advanced Install and click Next
  8. Choose the database edition that matches your license and click Next
  9. Verify the software directories and click Next
  10. Verify the inventory directory and group then click Next
  11. Ensure General Purpose/Transaction Processing is selected and click Next
  12. Set database name to orcl, deselect Create as Container database, and click Next
  13. Accept the defaults for the configuration options by clicking Next
  14. Accept the storage defaults by clicking Next
  15. Skip EM Cloud registration by clicking Next
  16. Skip Recovery configuration by clicking Next
  17. Enter in the desired passwords and click Next
    Note: This database is used for tool reference and will not be started so really any password will do
  18. Verify the os groups and click Next
  19. Prerequisite Checks Screen
    1. If a check other than Swap Size fails resolve each of those issues prior to proceeding
    2. If the only remaining failed check is Swap Size
      1. Check Ignore All and then click Next
      2. On the ignore confirmation dialog click Yes
  20. On the Summary screen click Install
  21. Wait as the installation progresses
  22. Execute scripts as Root
    1. Near the end of the installation the Execute Configuration Scripts dialog will appear
    2. Launch a new console as Root
    3. Run the Oracle Inventory script /opt/oracle/app/oraInventory/
      # /opt/oracle/app/oraInventory/
      Changing permissions of /opt/oracle/app/oraInventory.
      Adding read,write permissions for group.
      Removing read,write,execute permissions for world.
      Changing groupname of /opt/oracle/app/oraInventory to oinstall.
      The execution of the script is complete.
    4. Run the Oracle Instance script /opt/oracle/app/oracle/product/12.2.0/dbhome_1/
      Note: Installing the Oracle Trace File Analyzer is highly recommended

      # /opt/oracle/app/oracle/product/12.2.0/dbhome_1/
      Performing root user operation.
      The following environment variables are set as:
          ORACLE_OWNER= oracle
          ORACLE_HOME=  /opt/oracle/app/oracle/product/12.2.0/dbhome_1
      Enter the full pathname of the local bin directory: [/usr/local/bin]:
         Copying dbhome to /usr/local/bin ...
         Copying oraenv to /usr/local/bin ...
         Copying coraenv to /usr/local/bin ...
      Creating /etc/oratab file...
      Entries will be added to the /etc/oratab file as needed by
      Database Configuration Assistant when a database is created
      Finished running generic part of root script.
      Now product-specific root actions will be performed.
      Do you want to setup Oracle Trace File Analyzer (TFA) now ? yes|[no] :
      Installing Oracle Trace File Analyzer (TFA).
      Log File: /opt/oracle/app/oracle/product/12.2.0/dbhome_1/install/root_oraman13c.washco.org_2017-11-02_11-11-58-046599678.log
      Finished installing Oracle Trace File Analyzer (TFA)
    5. Return back to the Oracle installer in click OK
  23. Click Close to end the installer
  24. Clean up ORCL database
    1. Setup env vars and connect to database
      chdb orcl
      sqlplus / as sysdba
    2. Disable EM Express
    3. Shutdown the database
      shutdown immediate;
    4. Stop the listener (needed for the next step) lsnrctl stop
  25. Setup Listener SystemD script
    1. Login/switch to the root user
    2. Copy & enable SystemD files
      cp /opt/linearsoft/toolbag/oracle/systemd/oralsnr@.service /etc/systemd/system/oralsnr@.service
      systemctl enable oralsnr@orcl.service
      systemctl start oralsnr@orcl.service
      cp /opt/linearsoft/toolbag/oracle/systemd/orashutdown.service /etc/systemd/system/orashutdown.service
      systemctl enable orashutdown.service
      systemctl start orashutdown.service