Deploying Oracle Database 12c on Red Hat Enterprise Linux 7

[Pages:94]Deploying Oracle Database 12c on Red Hat Enterprise Linux 7

Best Practices

Roger Lopez, Principal Software Engineer

Version 1.1 August 2016

100 East Davie Street Raleigh NC 27601 USA Phone: +1 919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 3701 PO Box 13588 Research Triangle Park NC 27709 USA

Linux is a registered trademark of Linus Torvalds. Red Hat, Red Hat Enterprise Linux and the Red Hat "Shadowman" logo are registered trademarks of Red Hat, Inc. in the United States and other countries. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. UNIX is a registered trademark of The Open Group. Intel, the Intel logo and Xeon are registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. All other trademarks referenced herein are the property of their respective owners.

? 2013 by Red Hat, Inc. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, V1.0 or later (the latest version is presently available at ).

The information contained herein is subject to change without notice. Red Hat, Inc. shall not be liable for technical or editorial errors or omissions contained herein.

Distribution of modified versions of this document is prohibited without the explicit permission of Red Hat Inc.

Distribution of this work or derivative of this work in any standard (paper) book form for commercial purposes is prohibited unless prior permission is obtained from Red Hat Inc.

The GPG fingerprint of the security@ key is: CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E

Send feedback to refarch-feedback@



ii

refarch-feedback@

Comments and Feedback

In the spirit of open source, we invite anyone to provide feedback and comments on any reference architectures. Although we review our papers internally, sometimes issues or typographical errors are encountered. Feedback allows us to not only improve the quality of the papers we produce, but allows the reader to provide their thoughts on potential improvements and topic expansion to the papers. Feedback on the papers can be provided by emailing refarch-feedback@. Please refer to the title within the email.

Staying In Touch

Join us on some of the popular social media sites where we keep our audience informed on new reference architectures as well as offer related information on things we find interesting.

Like us on Facebook:

Follow us on Twitter:

Plus us on Google+:

refarch-feedback@

III



Table of Contents

1 Executive Summary......................................................................................... 1

2 Reference Architecture Environment................................................................ 2

2.1 Reference Architecture Overview...................................................................................... 2 2.2 Network Toplogy................................................................................................................ 3 2.3 Hardware Details............................................................................................................... 4 2.4 File System Layout & Disk Space Details......................................................................... 5 2.5 Storage Layout.................................................................................................................. 6 2.6 Swap Space...................................................................................................................... 6 2.7 Security: Firewall Settings................................................................................................. 7 2.8 Security: SELinux.............................................................................................................. 7

3 Reference Architecture Configuration Details................................................... 8

3.1 Setting OS Hostname........................................................................................................ 8 3.2 Network Configuration....................................................................................................... 9

3.2.1 Configuring /etc/resolv.conf file.................................................................................... 9 3.2.2 Public Network Configuration...................................................................................... 9 3.3 OS Configuration............................................................................................................. 12 3.3.1 Using the Red Hat Subscription Manager................................................................. 12 3.3.2 NTP Configuration..................................................................................................... 14 3.3.3 Oracle Database 12c Release 1 (12.1) Package Requirements.............................. 15 3.3.4 Configuring Security-Enhanced Linux (SELinux)...................................................... 16 3.3.5 Configuring Firewall Settings..................................................................................... 17 3.3.6 Setting Virtual Memory.............................................................................................. 19 3.3.7 Setting Shared Memory (SHMMAX, SHMALL, SHMMNI)........................................ 20 3.3.8 Setting Semaphores (SEMMSL, SEMMNI, SEMMNS)............................................. 22 3.3.9 Ephemeral Network Ports.......................................................................................... 22 3.3.10 Optimizing Network Settings................................................................................... 23 3.3.11 Increasing synchronous I/O Requests..................................................................... 23 3.3.12 Increasing File Handles........................................................................................... 23 3.3.13 User Accounts & Groups......................................................................................... 25 3.3.14 Setting Shell Limits for the Grid and Oracle User.................................................... 26 3.4 Storage Configuration..................................................................................................... 29 3.4.1 Setting up DM-Multipath............................................................................................ 29 3.4.2 Partitioning Device Mapper Shared Disks................................................................. 31



iv

refarch-feedback@

3.4.3 Configuring Oracle ASM Disks.................................................................................. 32 3.4.3.1 Oracle ASMLib Alternative: Configuring udev Rules........................................... 32

3.4.4 Optimizing Database Storage using Automatic System Tuning................................ 34

4 Oracle 12c R1 Configuration.......................................................................... 38

4.1.1 Installing Oracle Grid Infrastructure (Required for ASM)........................................... 38 4.1.2 Installing Oracle 12c R1 Database Software............................................................. 42 4.1.3 Creating ASM Diskgroups via the ASM Configuration Assistant (ASMCA)............... 47 4.1.4 Creating Pluggable Databases using Database Configuration Assistant (DBCA).... 49 4.1.5 Enabling HugePages................................................................................................. 57

5 Logging into the Oracle Container Database 12c Release 1 (12.1)............... 60

6 Common Tasks when Managing Container Database (CDB) and Pluggable Databases (PDB).............................................................................................. 63

6.1 Connect to a CDB............................................................................................................ 63 6.2 Connect to a PDB............................................................................................................ 65 6.3 Managing a CDB............................................................................................................. 66 6.4 Managing a PDB............................................................................................................. 67 6.5 Location of Data files of PDBs & CDB............................................................................ 68

7 Conclusion...................................................................................................... 70

Appendix A: Revision History............................................................................ 71

Appendix B: Contributors.................................................................................. 72

Appendix C: DM Multipath Configuration File.................................................... 73

Appendix D: Firewalld Configuration File.......................................................... 75

Appendix E: Huge Pages Script........................................................................ 76

Appendix F: Oracle Database Package Requirements Text File....................... 77

Appendix G: Kernel Parameters........................................................................ 78

Appendix H: Limits Configuration File (99-grid-oracle-limits.conf)..................... 79

Appendix I: 99-oracle-asmdevices.rules............................................................ 80

refarch-feedback@

v



Appendix J: Sample Kickstart File..................................................................... 81 Appendix K: Configuration Files........................................................................ 82 Appendix L: Troubleshooting ORA-* Errors....................................................... 83 Appendix M: References................................................................................... 87



vi

refarch-feedback@

1 Executive Summary

IT organizations face challenges of optimizing Oracle database environments to keep up with the ever increasing workload demands and evolving security risks. This reference architecture provides a step-by-step deployment procedure with the latest best practices to install and configure an Oracle Database 12c Release 1 (12.1)1 with Oracle Automatic Storage Management (ASM). It is suited for system, storage, and database administrators deploying Oracle Database 12c Release 1 (12.1) on Red Hat Enterprise Linux 7. It is intended to provide a Red Hat | Oracle reference architecture that focuses on the following tasks:

? Deploying Oracle Grid Infrastructure 12c Release 1 (12.1.0.2.0)

? Deploying Oracle Database Software 12c Release 1 (12.1.0.2.0)

? Deploying an Oracle Database 12c Release 1 (12.1.0.2.0) with shared SAN disks

? Using Oracle ASM disks with udev rules

? Securing the Oracle Database 12c environment with SELinux

1 Oracle Database 12c ? supported on version 12.1.0.2.0 or higher on Red Hat Enterprise Linux 7

refarch-feedback@

1



2 Reference Architecture Environment

This section focuses on the components used during the deployment of Oracle Database 12c with Oracle Automatic Storage Management (ASM) on Red Hat Enterprise Linux 7 x86_64 in this reference architecture.

2.1 Reference Architecture Overview

A pictorial representation of the environment used in this reference environment is shown in Figure 2.1.1: Reference Architecture Overview

Figure 2.1.1: Reference Architecture Overview



2

refarch-feedback@

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download