After installing Oracle 12c, the configuration will be performed through a graphical interface. That is the reason why we need a CentOS 7 server with the X Window System software group installed.
Read Also: Install GUI (Gnome) on RHEL/CentOS 7 Server
Additionally, please note that an Oracle account is required to download the Oracle Database 12c installation file (3.2 GB). Don’t worry about this, though, as you can create an account for free.
Finally, make sure your server has at least 2 GB of RAM and 30 GB of available disk space. These hardware requirements are safe for a testing environment such as ours, but will need to increase if you consider using Oracle in production.
Preparing for Oracle 12c Installation
1. To begin, make sure that all the packages currently installed on your RHEL/CentOS 7 system are updated to their latest versions.
2. Next, installed all the required dependencies for the RDBMS, along with the zip and unzip packages.
3. Create the user account and groups for Oracle.
Finally, set a password for the newly created oracle account.
4. Add the following kernel parameters to /etc/sysctl.conf file.
and apply them:
5. Set the limits for oracle in /etc/security/limits.conf file.
6. Create a directory named /stage and extract the zipped installation file.
Before proceeding, create other directories that will be used during the actual installation, and assign the necessary permissions.
We are now ready to run the installation script.
7. Open a GUI session in the RHEL/CentOS 7 server and launch the installation script.
and follow the steps presented by the installer.
Installing Oracle 12c on CentOS 7
8. Enter the email address associated with your Oracle account (optional).
9. Choose Create and configure a database.
10. Select Desktop class since we are setting up a minimal configuration and a starter database.
11. Select the following options for basic configuration.
- Oracle base: /u01/app/oracle
- Software location: /u01/app/oracle/product/12.2.0/dbhome_1
- Database file location: /u01
- OSDBA group: dba
- Global database name: your choice. We chose tecmint here.
- Take note of the password, as you will be using it when you first connect to the database.
- Uncheck Create as Container database.
12. Leave the default Inventory Directory as /u01/app/oraInventory.
13. Verify that the installation pre-checks are completed without errors.
The installer will not let you past this point if any errors are found.
14. Wait until the Oracle 12c installation completes.
It is possible that at some point during the installation you will be asked to run a couple of scripts to set up further permissions or correct issues. This is illustrated here:
And here:
15. After that, you will need to return to the previous screen in the GUI session and click OK so that the installation can continue.
When it is finished, you will be presented with the following message indicating the URL of the Oracle Enterprise Manager:
Oracle 12c Finishing Touches
16. To allow connections from outside the server, you will need to open the following ports:
As follows:
17. Next, login as oracle using the password that was chosen previously and add the following lines to .bash_profilefile.
18. Finally, replace localhost with 0.0.0.0 on.
19. The last step consists in reloading .bash_profile to apply the new settings.
20. And then login to the database using the system account and the password chosen in Step 11 of the previous section.
Optionally, let’s create a table inside the tecmint database where we will insert some sample records as follows.
Please note that IDENTITY columns were first introduced in Oracle 12c.
Enabling Oracle to Start on System Boot
21. To enable the database service to start automatically on boot, add the following lines to /etc/systemd/system/oracle-rdbms.service file.
22. Finally, we need to indicate that the tecmint database should be brought up during boot in /etc/oratab (Y: Yes).
Summary
In this article, we have explained how to install Oracle 12c on RHEL/CentOS 7, how to create and configure a database, and how to create tables and insert rows of data.
Additionally, it is important to note that the database server should be up and running when the system boots, and our default database should be available at that point.
If you have any questions or comments about this article, feel free to drop us a line using the form below.
Tidak ada komentar:
Posting Komentar