Oracle_RAC_数据库集群12C_安装文档
- 格式:docx
- 大小:2.95 MB
- 文档页数:71
WindowsServer2016虚拟机安装Oracle12c_RAC群集磁盘2:ASM第1章安装环境确认1.1 硬件平台(Hyper-V)RAC-A 1G内存双网卡RAC-B 1G内存双网卡iscsi服务器1G内存1.2 软件环境操作系统:Windows Server 2016Oracle软件:Oracle Database 12c Release 1 (12.1.0.2.0)集群工具:Oracle Database Grid Infrastructure (12.1.0.2.0)磁盘管理工具:ASM1.3 安装平台信息第2章环境准备2.1 修改主机名在两台主机上分别执行,计算机——右键(属性),主机名设置为RAC-A和RAC-B。
2.2 关闭防火墙关闭所有防火墙。
停止Windows Firewall系统服务。
在主机1和主机2上ping对方的公用和私用地址,要求都能ping通。
2.3 配置DEP在两台主机上,计算机——右键(属性)——更改设置——高级(设置)——数据执行保护(DEP),选择仅为基本windows程序和服务启用(重启后才能生效)。
2.4 关闭UAC在两台主机上,控制面板(小图标方式查看)——用户账户——更改用户账户控制设置,改为从不通知,确定(重启后生效)。
2.5 禁用媒体感知功能因为在网络调试时,Windows 的“媒体感知”功能会检测出本机和局域网设备没有正常连通,接着可能就会禁用捆绑在网卡上的某些网络协议,其中就包括TCP/IP 协议。
由于TCP/IP 协议被禁用了,这样该TCP/IP 应用程序就无法进行调试了。
(该设置重启生效)在HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters中添加键值如下:Value Name: DisableDHCPMediaSense Data Type: REG_DWORD -Boolean Value: 12.6 停止MSDTC服务2.7 修改虚拟内存按照Oracle的官方文档,虚拟内存至少为实际内存的2倍。
Centos7Oracle12C超详细安装[1] 先决环境Install Desktop Environment, refer to here.[2] Install required packages.[root@dlp ~]# yum -y install binutils compat-libcap1 gcc gcc-c++ glibc glibc.i686 glibc-devel glibc.i686 ksh libaio libaio.i686 libaio-devel libaio-devel.i686 libgcc libgcc.i686 libstdc++ libstdc++l7.i686 libstdc++-devel libstdc++-devel.i686 compat-libstdc++-33 compat-libstdc++-33.i686 libXi libXi.i686 libXtst libXtst.i686 make sysstat[3] Edit Kernel parameters.[root@dlp ~]# MEMTOTAL=$(free -b | sed -n '2p' | awk '{print $2}')[root@dlp ~]# SHMMAX=$(expr $MEMTOTAL / 2)[root@dlp ~]# SHMMNI=4096[root@dlp ~]# PAGESIZE=$(getconf PAGE_SIZE) [root@dlp ~]# cat >> /etc/sysctl.conf << EOFfs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmmax = $SHMMAXkernel.shmall = `expr \( $SHMMAX / $PAGESIZE \) \* \( $SHMMNI / 16 \)`kernel.shmmni = $SHMMNIkernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576EOF [root@dlp ~]# sysctl -pfs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmmax = 6274715648 kernel.shmall = 392169728 kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576[4] Create user and groups for Oracle Database service.[root@dlp ~]# i=54321; for group in oinstall dba backupdba oper dgdba kmdba; dogroupadd -g $i $group; i=`expr $i + 1` done [root@dlp~]#useradd-u1200-goinstall-Gdba,oper,backupdba,dgdba,kmdba -d /home/oracle oracle[root@dlp ~]# passwd oracle Changing password for user oracle. New password: Retype new password:passwd: all authentication tokens updated successfully. [root@dlp ~]# mkdir -p /u01/app/oracle [root@dlp ~]# chown -R oracle:oinstall /u01/app [root@dlp ~]# chmod -R 775 /u01[root@dlp ~]# vi /etc/pam.d/login # near line 14: add1 2 session required pam_selinux.so open session required pam_namespace.so1 s ession required pam_limits.so1 2 3 session optional pam_keyinit.so force revoke session include system-auth -session optional pam_ck_connector.so[root@dlp ~]# vi /etc/security/limits.conf # add to the end1 2 3 4 5 6 oracle softnproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 oracle soft stack 10240 oraclehardstack 32768[5]图形化安装Oracle 12C Login with the user "oracle" and set environment variables.dlp login: oracle Password:[oracle@dlp ~]$ vi ~/.bash_profile # add to the end umask 022export ORACLE_BASE=/u01/app/oracle # create a temporary directory for installation[oracle@dlp ~]$ mkdir tmp[1]Login and work with oracle admin user which you create in pre-requirements settings.[2] Download Oracle Databse 12c for Linux and upload on your server. ?/technology/software/products/database/index.html [3] After uploading Oracle files, move to a tmp directory and run an Installer like follows.[oracle@dlp ~]$ cd tmp [oracle@dlp tmp]$ unzip linuxamd64_12102_database_1of2.zip [oracle@dlptmp]$unziplinuxamd64_12102_database_2of2.zip[oracle@dlp tmp]$ ./database/runInstaller[4] Oracle Installer starts like follows. First, Set your email address and password for receiving some infomation from Oracle likesecurity issues and so on.[5] On this example, Select "Install database software only".[6] On this example, Select "Single Instance Database ***".[7] Select your language.[8] Select which edition you install.[9]Specify the base directory and files for Oracle. On this example, keep default and proceed to next.[10]Specify the installed directory. On this example, keep default and proceed to next.[11]Specify the priviledged group. On this example, keep default and proceed to next.[12] Pre-requirements are checked. If some settings are not configuredfor recomendations, notification is displayed likefollows.Confirm them again.[13]The summary is shown for configuration. Click "Install" if it's OK all.[14] Installation starts.[15]Following screen is shown, then open a terminal and execute follwong commands with the root user.[root@dlp ~]# /u01/app/oraInventory/orainstRoot.sh1 2 Changing permissions of /u01/app/oraInventory. Adding read,write permissions for group.3 4 5 6 7Removing read,write,execute permissions for world. Changing groupname of /u01/app/oraInventory to oinstall. The execution of the script is complete. [root@dlp ~]# [root@dlp~]#/u01/app/oracle/product/12.1.0/dbhome_1/root.sh12345Performing root user operation. The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/12.1.0/dbhome_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: # Enter12 3 4 5 6 7 8 9 10Copying 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.[16] Installation completed. Click "Close" button.[17] Set Environment variables for Oracle user.[oracle@dlp ~]$ vi ~/.bash_profile # add to the end exportORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1exportPATH=$PATH:$ORACLE_HOME/bin[oracle@dlp~]$ source ~/.bash_profile[oracle@dlp ~]$ rm -rf tmp创建监听Create Oracle Net Listener that is the network service onOracle.[1]Login with the oracle admin user and input a command "netca" like follows.[oracle@dlp ~]$ netca[2] Check a box "Listener Configuration" and go next.[3] Go next.[4] Set Listner's name. Input any one you like.[5] This example goes next with keeping default "TCP".[6] Set a port. This example goes next with keeping default.[7]If you'd like to create more Listeners, Answer "Yes". This example selects "No".[8] Configuration completed.[9]After creating Listener, tnslsnr listens on the port you configured like follows.[oracle@dlp ~]$ ss -napt123456789StateRecv-QSend-QLocalAddress:Port Peer Address:Port LISTEN 0 128 *:22 *:* LISTEN 0 128 127.0.0.1:631 *:* LISTEN 0 100 127.0.0.1:25 *:* ESTAB 0 52 10.0.0.30:22 10.0.0.5:50113 LISTEN 0 128 :::1521 :::* users:(("tnslsnr",3988,9)) LISTEN 0 128 :::22 :::* LISTEN 0 128 ::1:631 :::*LISTEN 0 100 ::1:25 :::* [oracle@dlp ~]$ tnsping localhost 12TNS Ping Utility for Linux: Version 12.1.0.2.0 - Productionon 04-JUL-2015 01:03:0734567891 0 Copyright (c) 1997, 2014, Oracle. All rights reserved. Used parameter files:Used HOSTNAME adapter to resolve the alias Attempting to contact(DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADD RESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))OK (0 msec)创建数据库 Create a Database.[1] Login with the oracle admin user and input acommand "dbca" like follows.[oracle@dlp ~]$ dbc[2] Select "Create Database" and go next.[3] On this example, select "Advanced Mode" and go next.[4] This example selects "General Purpose ***" and go next.[5]Set Grobal Database name and SID like follows. Input any one you like.[6] This example goes next with keeping default.[7] Set passwords. Please set a password for a user for security.[8] Configure Listener. On this example, keep default and go next.[9]Configure Storage settings. On this example, keep default and go next.[10]Configure sample schema and scripts. If you'd like to add them, Set them.[11] Configure memory settings. After setting, go to next tab.[12] Specify max processes.[13] Set Character setting.[14] Select a connection mode. If your server does not have many clients, Select Dedicated server mode. If your server has manyclients, Select Shared server mode.[15] Go next.[16] Configuration completed. Click "Finish" button to finish.[17] Database creation starts.[18] After completing to create a database, Click "Close" to finish.[19] Add Database SID to the environment variables.[oracle@dlp ~]$ vi /etc/oratab # change like followsdlp:/u01/app/oracle/product/12.1.0/dbhome_1: Y [oracle@dlp ~]$ vi ~/.bash_profile # add to the endexport ORACLE_SID=dlpTo access to the Enterprise Manager, it's possible to manage Database on Web GUI.[1] After creating database, database service is running and it'spossible to access to Enterprise Manager, too. Access to the URL which was displayed when database creation finished, then Login form is shown and it's possible to login with a database user.[2] Just logined. It's possible to manage Database on here.Create Systemd file for Oracle Database services.[1] Login as root user and create Systemd files.[root@dlp ~]# vi /etc/sysconfig/dlp.oracledb # create new : define environment variablesORACLE_BASE=/u01/app/oracleORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1ORACLE_SID=dlp # configure listener service[root@dlp~]#vi/usr/lib/systemd/system/*******************#thisis an example, modify for free12 3 4 5 6 7 8 9 10 11 12 13[Unit]Description=oracle net listener After=network.target [Service] Type=forkingEnvironmentFile=/etc/sysconfig/dlp.oracledbExecStart=/u01/app/oracle/product/12.1.0/dbhome_1/bin/lsnrctl start ExecStop=/u01/app/oracle/product/12.1.0/dbhome_1/bin/lsnrctl stop User=oracle [Install] WantedBy=multi-user.target # configure database service[root@dlp~]#vi/usr/lib/systemd/system/********************#this is an example, modify for free1 2 3 4 5 6 7 8 9 10 11 12 13 [Unit]Description=oracle net listenerAfter=network.target lsnrctl.service [Service] Type=forkingEnvironmentFile=/etc/sysconfig/dlp.oracledbExecStart=/u01/app/oracle/product/12.1.0/dbhome_1/bin/dbstart /u01/app/oracle/product/12.1.0/dbhome_1ExecStop=/u01/app/oracle/product/12.1.0/dbhome_1/bin/dbshut /u01/app/oracle/product/12.1.0/dbhome_1 User=oracle [Install] WantedBy=multi-user.target[root@dlp ~]# systemctl daemon-reload[root@dlp ~]# systemctl enable dlp@lsnrctl dlp@oracledb。
oracle12c安装教程linux一、安装环境准备1、操作系统:Oracle 12c 支持的操作系统:(1)Linux x86-64 (Red Hat Enterprise Linux 5、6、7、Oracle Linux 5、6、7、Suse Linux Enterprise Server 11 SP2)(2)Solaris x86-64 (Solaris 11.2)(3)AIX 7.12、硬件环境:(1)CPU:双核或更多(2)内存:2GB以上(3)硬盘:至少有4GB的空闲空间二、安装步骤1、下载安装文件从官网下载Oracle 12c的安装文件,本文以linux x86-64为例,安装文件名为linuxx64_12201_database.zip。
2、解压安装文件将下载的安装文件解压到指定的安装目录,本文以/opt/oracle/product/12.2/dbhome_1为例,解压后的文件如下:[oracle@localhost ~]$ ls -l /opt/oracle/product/12.2/dbhome_1total 20drwxr-xr-x 4 oracle oinstall 4096 Apr 24 17:43 cdrom-rwxr-xr-x 1 oracle oinstall 1219 Apr 24 17:43 .ouidrwxr-xr-x 2 oracle oinstall 4096 Apr 24 17:43 installdrwxr-xr-x 2 oracle oinstall 4096 Apr 24 17:43 response-rwxr-xr-x 1 oracle oinstall 735 Apr 24 17:43 runInstaller3、添加用户为了安装Oracle 12c,需要添加一个用户,本文以oracle为例:[oracle@localhost ~]$ groupadd oinstall[oracle@localhost ~]$ groupadd dba[oracle@localhost ~]$ useradd -g oinstall -G dba oracle[oracle@localhost ~]$ passwd oracle4、设置环境变量为了方便使用,需要设置环境变量,本文以oracle为例:[oracle@localhost ~]$ vi .bash_profile# Oracle Settingsexport ORACLE_HOME=/opt/oracle/product/12.2/dbhome_1 export ORACLE_SID=orclexport ORACLE_BASE=/opt/oracleexport ORACLE_TERM=xtermexport PATH=$ORACLE_HOME/bin:$PATHexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib exportCLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms /jlib5、安装Oracle 12c使用root用户登录,进入安装目录,执行安装程序:[oracle@localhost ~]$ su - root[root@localhost ~]。
Oracle 12C 安装实例■ 陕西 王金国 解宝琦本实例所在的系统环境为:操作系统:CentOS7.5;数据库版本:12.1.0.2.0;主机名:Oracle 12C ;ORACLE_SID :Oracle12c ;容器数据库:Oracle12cp db操作系统环境准备及数据库安装要点因为操作系统安装相关文章已经非常多了。
笔者认为安装Oracle 数据库的重点和难点在于操作系统环境准备部分以及补丁安装部分,因此将略过操作系统安装和数据库安装过程,重点详细描述以上环境准备和补丁安装内容。
1.安装centos7.5,安装过程中需要选择gnome 图形桌面,并配置磁盘为LVM 管编者按:Oracle 作为企业级数据库产品。
目前依然是各大中型企业数据库管理软件的翘楚。
本文以生产环境为应用场景。
详细阐述了CentOS7.5系统下Oracle 12C 数据库的安装及补丁升级涉及的重点过程,包含了完整的数据库日志模式启用及全库备份需要进行的配置,很好的满足了生产环境对Oracle 稳定性和日常备份的要求。
理模式。
便于未来数据增长后进行磁盘的动态扩展和管理。
2.操作系统参数配置及优化,使用vi/etc/sysctl.conf 命令编辑/etc/sysctl.conf 文件,并在文件末尾增加如图1所示。
fs.aio-max-nr 参数Oracle 默认设置为 1M 即 1048576,一般不用更改,其他参数具体详解可以参考Oracle 官方文档。
3.对Oracle 用户设置限制,提高软件运行性能,图1 具体命令通过命令vi etc/security/limits.conf 编辑该文件,并加入如下内容:oracle soft nofile 1024oracle hard nofile 65536o r a c l e s o f t n p r o c 2047o r a c l e h a r d n p r o c 16384o r a c l e s o f t s t a c k 10240o r a c l e h a r d s t a c k 327684.关联设置,通过命令vi /etc/pam.d/login,添加如下内容:s e s s i o n r e q u i r e d /l i b 64/s e c u r i t y /p a m _limits.sosession required pam_limits.so5.设置环境变量,通过命令vi etc/profile 添加如图2所示。
RAC Assurance Support Team: RAC and Oracle Clusterware Starter Kit and Best Practices (Generic) [ID 810394.1]修改时间09-FEB-2011 类型BULLETIN 状态PUBLISHEDIn this DocumentPurposeScope and ApplicationRAC Assurance Support Team: RAC and Oracle Clusterware Starter Kit and Best Practices (Generic) RAC Platform Specific Starter Kits and Best PracticesRAC Platform Generic Load Testing and System Test Plan OutlineRAC Platform Generic Highlighted RecommendationsRAC Platform Generic Best PracticesGetting Started - Preinstallation and Design ConsiderationsClusterware ConsiderationsNetworking ConsiderationsStorage ConsiderationsInstallation ConsiderationsPatching ConsiderationsUpgrade ConsiderationsOracle VM ConsiderationsDatabase Initialization Parameter ConsiderationsPerformance Tuning ConsiderationsGeneral Configuration ConsiderationsE-Business Suite (with RAC) ConsiderationsPeoplesoft (with RAC) ConsiderationsTools/Utilities for Diagnosing and Working with Oracle Support11gR2 Specific Considerations11.2.0.2 Specific ConsiderationsCRS / RAC Related ReferencesRAC / RDBMS Related ReferencesVIP ReferencesASM References11.2 ReferencesInfiniband ReferencesMAA / Standby ReferencesPatching ReferencesUpgrade ReferencesE-Business ReferencesUnix ReferencesWeblogic/RAC ReferencesReferences Related to Working with Oracle SupportModification HistoryApplies to:Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 11.2.0.1.0 - Release: 10.2 to 11.2 Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 11.1.0.7 [Release: 10.2 to 11.1] Information in this document applies to any platform.PurposeThe goal of the Oracle Real Application Clusters (RAC) Starter Kit is to provide you with the latest information on generic and platform specific best practices for implementing an Oracle RAC cluster. This document is compiled and maintained based on Oracle's experience with its global RAC customer base.This Starter Kit is not meant to replace or supplant the Oracle Documentation set, but rather, it is meant as a supplement to the same. It is imperative that the Oracle Documentation be read, understood, and referenced to provide answers to any questions that may not be clearly addressed by this Starter Kit.All recommendations should be carefully reviewed by your own operations group and should only be implemented if the potential gain as measured against the associated risk warrants implementation. Risk assessments can only be made with a detailed knowledge of the system, application, and business environment.As every customer environment is unique, the success of any Oracle Database implementation, including implementations of Oracle RAC, is predicated on a successful test environment. It is thus imperative that any recommendations from this Starter Kit are thoroughly tested and validated using a testing environment that is a replica of the target production environment before being implemented in the production environment to ensure that there is no negative impact associated with the recommendations that are made.Scope and ApplicationThis article is intended for use by all new (and existing) Oracle RAC implementers.RAC Assurance Support Team: RAC and Oracle Clusterware Starter Kit and Best Practices (Generic)RAC Platform Specific Starter Kits and Best PracticesWhile this note focuses on platform generic RAC Best Practices, the following notes contain detailed platform specific best practices including Step-By-Step installation cookbooks.Document 811306.1 RAC Assurance Support Team: RAC Starter Kit and Best Practices (Linux)Document 811280.1 RAC Assurance Support Team: RAC Starter Kit and Best Practices (Solaris)Document 811271.1 RAC Assurance Support Team: RAC Starter Kit and Best Practices (Windows)Document 811293.1 RAC Assurance Support Team: RAC Starter Kit and Best Practices (AIX)Document 811303.1 RAC Assurance Support Team: RAC Starter Kit and Best Practices (HP-UX)RAC Platform Generic Load Testing and System Test Plan OutlineA critical component of any successful implementation, particularly in the High Availability arena, is testing. For a RAC environment, testing should include both load generation, to monitor and measure how the system works under heavy load, and a system test plan,to understand how the system reacts to certain types of failures. To assist with this type of testing, this document contains links to documents to get you started in both of these areas.Click here for a White Paper on available RAC System Load Testing ToolsClick here for a platform generic RAC System Test Plan Outline for 10gR2 and 11gR1Click here for a platform generic RAC System Test Plan Outline for 11gR2Use these documents to validate your system setup and configuration, and also as a means to practice responses and establish procedures in case of certain types of failures.RAC Platform Generic Highlighted RecommendationsHighlighted Recommendations are recommendations that are thought to have the greatest impact, or answer most commonly addressed questions or issues. In this case, Generic Highlighted Recommendations talk about commonly asked or encountered issues that are generic to RAC implementations across all platforms.Having a step-by-step plan for your RAC project implementation is invaluable. The following OTN article contains a sample projectoutline: /technetwork/articles/haskins-rac-project-guide-099429.html∙To simplify the stack and simplify vendor interactions, Oracle recommends avoiding 3rd party clusterware, unless absolutely necessary.∙Automatic Storage Management (ASM) is recommended for datafile storage. This link references the ASM Overview and Technical Best Practices White Paper.Reference: /technetwork/database/asm-10gr2-bestpractices.pdf∙The RAC Assurance Team recommends placement of Oracle Homes on local drives whenever possible. The following white paper contains an analysis of the pros andcons of shared versus local OracleHomes: /technetwork/database/clustering/overview/oh-rac-133684.pdf∙Having a system test plan to help plan for and practice unplanned outages is crucial.The following paper discusses Best Practices for Optimizing Availability DuringUnplanned Outages Using Oracle Clusterware and Oracle Real Application Clusters: /technology/deploy/availability/pdf/MAA_WP_10gR2_FastReco veryOracleClusterwareandRAC.pdfIn addition, this note has an attached sample System Test Plan Outline, to guide your system testing to help prepare for potential unplanned failures.∙Develop a proactive patching strategy, to stay ahead of the latest known issues. Keep current with the latest Patch Set Updates (as documented in Document 850471.1) and be aware of the most current recommended patches (as documentedin Document 756671.1). Plan for periodic (for example: quarterly) maintenancewindows to keep current with the latest recommended patch (set) updates andpatches.∙Understanding how to minimize downtime while patching is a key piece of this strategy. The following paper discusses patching strategies geared towardsminimizing downtime in a RAC/Clusterwareenvironment: /technetwork/database/asm.pdf ∙For all Unix platforms running Oracle version 11.1.0.6 or 11.1.0.7: Take note / implement the solution explained in Document 858279.1.∙When patching, be sure to use the latest version of OPATCH. Available for download from My Oracle Support under Patch 6880880.RAC Platform Generic Best PracticesBeyond the Highlighted Recommendations above, the RAC Assurance Team has recommendations for various different parts/components of your RAC setup. These additional recommendations are broken into categories and listed below.Getting Started - Preinstallation and Design Considerations∙Check with the Disk Vendor that the Number of Nodes, OS version, RAC version, CRS version, Network fabric, and Patches are certified, as some Storage/San vendors may require special certification for a certain number of nodes.∙Check the support matrix to ensure supportability of product, version and platform combinations or for understanding any specific steps which need to be completed which are extra in the case of some such combinations. Document 337737.1∙Avoid SSH and XAUTH warning before RAC 10G installation. Reference Document 285070.1∙Consider configuring the system logger to log messages to one central server.∙For CRS, ASM, and Oracle ensure one unique User ID with a single name, is in use across the cluster. Problems can occur accessing OCR keys when multiple O/S users share the same UID. Also this results in logical corruptions and permission problems which are hard to diagnose.∙Make sure machine clocks are synchronized on all nodes to the same NTP source.Implementing NTP (Network Time Protocol) on all nodes prevents evictions and helps to facilitate problem diagnosis. Use the -x option (ie. ntpd -x, xntp -x) ifavailable. Running ntp or ntpd with the '-x' flag (ie. ntpd -x, xntp -x) will call for gradual time changes (known as slewing). Large time changes (which are the default if the -x flag is not used) could result in (what could be) unnecessary node evictions Document 759143.1∙Eliminate any single points of failure in the architecture. Examples include (but are not limited to): Cluster interconnect redundancy (NIC bonding etc), multiple access paths to storage, using 2 or more HBA's or initiators and multipathing software, and Disk mirroring/RAID∙Plan and document capacity requirements. Work with server vendor to produce detailed capacity plan and system configuration, but consider: Use normal capacity planning process to estimate number of CPUs required to run workload. Both SMP and RAC clusters have synchronization costs as the number of CPUs increase. SMPs normally scale well for small number of CPUs, RAC clusters normally scale better than SMPs for large number of CPUs. Typical synchronization cost: 5-20%∙Use proven high availability strategies. RAC is one component in a high availability architecture. Make sure all parts are covered. Review Oracle's MaximimumAvailability Architecture recommendations and references further down in thisdocument.∙It is strongly advised that a production RAC instance does not share a node with a DEV, TEST, QA or TRAINING instance. These extra instances can often introduce unexpected performance changes into a production environment.∙Configure Servers to boot from SAN disk, rather than local disk for easier repair, quick provisioning and consistency.∙For Oracle 10g and 11gR1 it is recommended to utilize Oracle redundancy for the OCR and Voting Disks. These files should be stored on RAW or block devices(depending on the OS and Oracle Version). Voting Disks should always be created in odd numbers (1,3,5,etc). This is because losing 1/2 or more of all of your voting disks will cause nodes to get evicted from the cluster, or nodes to evict themselves out of the cluster. Document 428681.1 explains how to add OCR mirror and how to add additional voting disks.∙For Oracle 11gR2 it is a best practice to store the OCR and Voting Disk within ASM and to maintain the ASM best practice of having no more than 2 diskgroups (FlashRecovery Area and Database Area). This means that the OCR and Voting disk will be stored along with the database related files. If you are utilizing external redundancy for your disk groups this means you will have 1 Voting Disk and 1 OCR.For those who wish to utilize Oracle supplied redundancy for the OCR and Votingdisks one could create a separate (3rd) ASM Diskgroup having a minimum of 2 failgroups (total of 3 disks). This configuration will provide 3 Voting Disks and a singleOCR which takes on the redundancy of that disk group (mirrored within ASM). Theminimum size of the 3 disks that make up this normal redundancy diskgroup is 1GB.∙If you are planning to use T-Series servers in a RAC environment, review Document 1181315.1 'Important Considerations for Operating Oracle RAC on T-Series Servers'Clusterware Considerations∙For versions prior to 11gR2, configure three or more voting disks (always an odd number). This is because losing 1/2 or more of all of your voting disks will causenodes to get evicted from the cluster, or nodes to evict themselves out of the cluster. Networking Considerations∙Underscores should not be used in a host or domainname according to RFC952 - DoD Internet host table specification. The same applies for Net, Host, Gateway, or Domain name. Reference: /rfcs/rfc952.html∙Ensure the default gateway is on the same subnet as the VIP. Otherwise this can cause problems with racgvip and cause the vip and listener to keep restarting.∙Make sure network interfaces have the same name on all nodes. This is required. To check - use ifconfig (on Unix) or ipconfig (on Windows).∙Use Jumbo Frames if supported and possible in the system. Reference: Document 341788.1∙Use non-routable network addresses for private interconnect; Class A: 10.0.0.0 to10.255.255.255, Class B: 172.16.0.0 to 172.31.255.255, Class C: 192.168.0.0 to192.168.255.255. Reference: /rfcs/rfc1918.html and Document338924.1∙Make sure network interfaces are configured correctly in terms of speed, duplex, etc.Various tools exist to monitor and test network: ethtool, iperf, netperf, spray and tcp.Document 563566.1∙Configure nics for fault tolerance (bonding/link aggregation). Document 787420.1.∙Performance: check for faulty switches, bad hba's or ports which drop packets. Most cases we see with network related evictions is when either there is too much traffic on the interconnect (so the interconnect capacity is exhausted which is whereaggregation or some other hardware solution helps) or the switch, network card is not configured properly and this is evident from the "netstat -s | grep udp" settings (if usingUDP protocol for IPC for RAC) where this will register underflows (buffer sizeconfiguration for UDP) or errors due to bad ports, switches, network card, network card settings. Please review the same in the context of errors reported from packets sent through the interface.∙For more predictable hardware discovery, place hba and nic cards in the same corresponding slot on each server in the Grid.∙Ensure that all network cables are terminated in a grounded socket. A switch is required for the private network. Use dedicated redundant switches for privateinterconnect and VLAN considerations. RAC and Clusterware deployment bestpractices recommend that the interconnection be deployed on a stand-alone,physically separate, dedicated switch.∙Deploying the RAC/Clusterware interconnect on a shared switch, segmented VLAN may expose the interconnect links to congestion and instability in the larger IP network topology. If deploying the interconnect on a VLAN, there should be a 1:1 mapping of VLAN to non-routable subnet and the VLAN should not span multiple VLANs (tagged) or multiple switches. Deployment concerns in this environment include Spanning Tree loops when the larger IP network topology changes, Asymmetric routing that may cause packet flooding, and lack of fine grained monitoring of theVLAN/port. Reference Bug 9761210.∙Consider using Infiniband on the interconnect for workloads that have high volume requirements. Infiniband can also improve performance by lowering latency,particularly with Oracle 11g, with the RDS protocol. See Document 751343.1.∙Configure IPC address first in listener.ora address list. For databases upgraded from earlier versions to 10gR2 the netca did not configure the IPC address first in thelistener.ora file. In 10gR2 this is the default but if you upgrade this isn't changed unless you do it manually. Failure to do so can adversely impact the amount of time it takes the VIP to fail over if the public network interface should fail. Therefore, check the 10gR1 and 10gR2 listener.ora file. Not only should the IPC address be contained in the address list but it should be FIRST. Document 403743.1∙Increase the SDU (and in older versions the TDU as well) to a higher value (e.g. 4KB 8KB, up to 32KB), thus reducing round trips on the network, possibly decreasingresponse time and over all perceived user responsiveness of the system. Document 44694.1∙To avoid ORA-12545 errors, ensure that client HOSTS files and/or DNS are furnished with both VIP and Public hostnames.∙Starting with Oracle 10g the TNSListener is secure out of the box. The 10g listener uses local OS authentication. If you want to allow a secondary user to administer the listener you have to set a listener password as described in Document 260986.1.∙Please note that IPv6 addressing is currently not yet supported with RAC. For more information, reference:/content/dav/oracle/Users/Users-K/kant.patel/IPv6/OracleD atabase_IPv6_SOD.pdf∙Network Interface Card (NIC) names must not contain " . "∙For version 11.2.0.2 multicast traffic must be allowed on the private network for the 230.0.1.0 subnet. Reference: Document 1212703.1.Storage Considerations∙Ensure Correct Mount Options for NFS Disks when RAC is used with NFS.The documented mount options are detailed in Document 359515.1 for each platform.∙Implement multiple access paths to storage array using two or more HBAs or initiators with multi-pathing software over these HBAs. Where possible, use the pseudo devices (multi-path I/O) as the diskstring for ASM. Examples are: EMC PowerPath, VeritasDMP, Sun Traffic Manager, Hitachi HDLM, IBM SDDPC, Linux 2.6 Device Mapper.This is useful for I/O loadbalancing and failover. Reference: Document 294869.1 and Document 394956.1. See also our Multipathing Best Practicespaper: /technetwork/database/asm.pdf∙Adhere to ASM best practices. Reference: Document 265633.1 ASM Technical Best Practices∙ORA-15196 (ASM block corruption) can occur, if LUNs larger than 2TB are presented to an ASM diskgroup. As a result of the fix, ORA-15099 will be raised if a disk largerthan 2TB is specified. This is irrespective of the presence of asmlib. Workaround: Do not add more than 2 TB size disk to a diskgroup. Reference: Document 6453944.8∙On some platforms repeat warnings about AIO limits may be seen in the alert log: "WARNING:Oracle process running out of OS kernel I/O resources." Apply Patch6687381, available on many platforms. This issue affects 10.2.0.3, 10.2.0.4, and11.1.0.6. It is fixed in 11.1.0.7. Document 6687381.8∙Create two ASM disk groups, one for database area and one for flash recovery area, on separate physical disks. RAID storage array LUNs can be used as ASM disks tominimize the number of LUNs presented to the OS . Place database and redo log files in database area.∙The occurrence of Bug 5100163 (possible metadata corruption) has being identified during an ASM upgrade from release 10.2 to release 11.1 or 11.2, this bug could only occur having ASM diskgroups with an AU > 1 MB (before the ASM upgrade isperformed). This bug is not encountered with brand new diskgroups created directlyon release 11.1 or 11.2.In order to prevent any occurrence of Bug 5100163, a public alert has been generated and it is visible through My Oracle Support. Reference: Document 1145365.1 Alert:Querying v$asm_file Gives ORA-15196 After ASM Was Upgraded From 10gR2 To11gR2. In short, you would want to run an "alter diskgroup <DG_NAME> check allrepair" to validate and repair any upgraded diskgroups.Installation Considerations∙Check Cluster Prequisites Using cluvfy (Cluster Verification Utility). Use cluvfy at all stages prior to and during installation of Oracle software. Also, rather than using theversion on the installation media, it is crucial to download the latest version of cluvfyOTN:/technetwork/database/clustering/downloads/cvu-download-homepage-099973.html. Document 339939.1 and Document 316817.1 contain morerelevant information on this topic.∙It is recommended to patch the Clusterware Home to the desired level before doing any RDBMS or ASM home install.For example, install clusterware 10.2.0.1 and patch to 10.2.0.4 before installing10.2.0.1 RDBMS.∙Install ASM in a separate ORACLE_HOME from the database for maintenance and availability reasons (eg., to independently patch and upgrade).∙If you are installing Oracle Clusterware as a user that is a member of multiple operating system groups, the installer installs files on all nodes of the cluster withgroup ownership set to that of the user's current active or primarygroup. Therefore: ensure that the first group listed in the file /etc/ group is thecurrent active group OR invoke the Oracle Clusterware installation using the following additional command line option, to force the installer to use the proper group whensetting group ownership on all files: runInstaller s_usergroup=current_active_group(Bug 4433140)Patching ConsiderationsThis section is targeted towards customers beginning a new implementation of Oracle Real Application Clusters, or customers who are developing a proactive patching strategy for an existing implementation. For new implementations, it is strongly recommended that the latest available patchset for your platform be applied at the outset of your testing. In cases where that latest version of the RDBMS cannot be used because of lags in internal or 3rd party application certification or due to other limitations, it is still supported to have the CRS Home and ASM Homes running at a later patch level than the RDBMS Home, therefore, it may still be possible to run either the CRS or ASM Home at the latest patchset level. As a best practice (with some exceptions, see the Note in the references section below), Oracle Support recommends that the following be true:∙The CRS_HOME must be at a patch level or version that is greater than or equal to the patch level or version of the ASM Home. The CRS_HOME must be a patch levelor version that is greater than or equal to the patch level or version of the RDBMShome.∙The ASM_HOME must be at a patch level or version that is greater than or equal to the patch level or version of the RDBMS Home. The ASM_HOME must be a patchlevel or version that is equal to but not greater than the patch level or version of theCRS_HOME.∙Before patching the database, ASM or clusterware homes using opatch check the available space on the filesystem and use Document 550522.1 in order to estimatehow much space will be needed and how to handle the situation if the filesystemshould fill up during the patching process.∙Document 557934.1 provides a basic overview of patching Oracle Clusterware and clarifies how the Oracle Clusterware components are updated through patching ∙Develop a proactive patching strategy, to stay ahead of the latest known issues. Keep current with the latest Patch Set Updates (as documented in Document 850471.1) and be aware of the most current recommended patches (as documented in Document756671.1). Plan for periodic (for example: quarterly) maintenance windows to keepcurrent with the latest recommended patch (set) updates and patches.For more detailed notes and references on patching in a RAC environment, see the patching section below, in the "RAC Platform Generic References" sectionat the end of this note.Upgrade Considerations∙Begin with minimum version 10.2.0.3 when upgrading 10.2.0.X to 11.X in accordance with the following Oracle documentation(/docs/cd/B28359_01/server.111/b28300/upgrade.htm#BA BCEGBC) where it is stated:Note: A new prerequisite check has been added to ensure that Oracle Clusterware release 10.2.0.x is at release 10.2.0.3 (or higher), before you attempt to upgrade it to Oracle Clusterware 11g release 1 (11.1). If this check fails, then you are instructed to apply Oracle Clusterware patch set release 10.2.0.3.0 or later to your existing release 10.2.0.1 or 10.2.0.2 before it can be upgraded. All other upgrade paths and fresh install cycles are unaffected by this prerequisite check.∙Use rolling upgrades where appropriate for Oracle Clusterware (CRS) Document 338706.1. For detailed upgrade assistance, refer to the appropriate UpgradeCompanion for your release: Document 466181.1 10g Upgrade Companion andDocument 601807.1 Oracle 11gR1 Upgrade Companion∙For information about upgrading a database using a transient logical standby, refer to: Document 949322.1 : Oracle11g Data Guard: Database Rolling Upgrade ShellScript∙If upgrading ASM to 11.X run an "alter diskgroup <DG_NAME> check all repair" to validate and repair any upgraded diskgroups.Oracle VM Considerations∙Oracle Real Application Clusters in Oracle VM Environments:/technetwork/database/clustering/oracle-rac-in-oracle-vm-environment-131948.pdfDatabase Initialization Parameter Considerations∙Set PRE_PAGE_SGA=false. If set to true, it can significantly increase the time required to establish database connections. In cases where clients might complainthat connections to the database are very slow then consider setting this parameter to false, doing so avoids mapping the whole SGA and process startup and thus savesconnection time.∙Be sure to monitor the number of active servers and calculate the average value to be applied for PARALLEL_MIN_SERVERS. This can be done by:Select * from v$pq_syssstat;Then: Get/save the value for row "Servers Highwater"∙Tune PARALLEL_MAX_SERVERS to your hardware. Start with (2 * ( 2 threads ) *(CPU_COUNT)) = 4 x CPU count and repeat test for higher values with test data.∙Consider setting FAST_START_PARALLEL_ROLLBACK. This parameter determines how many processes are used for transaction recovery, which is doneafter redo application. Optimizing transaction recovery is important to ensure anefficient workload after an unplanned failure. As long as the system is not CPU bound, setting this to a value of HIGH is a best practice. This causes Oracle to use four times the CPU count (4 X cpu_count) parallel processes for transaction recovery. Thedefault for this parameter is LOW, or two times the CPU count (2 X cpu_count).∙Set FAST_START_MTTR_TARGET to a non-zero value in seconds. Crash recovery will complete within this desired time frame.∙In 10g and 11g databases, init parameter ACTIVE_INSTANCE_COUNT should no longer be set. This is because the RACG layer doesn't take this parameter intoaccount. As an alternative, you should create a service with one preferred instance.∙For versions prior to 11gR2, increase PARALLEL_EXECUTION_MESSAGE_SIZE from default (normallly 2048) to 8192. This can be set higher for datawarehousingbased systems where there is a lot of data transferred through PQ. In version 11gR2, the default for PARALLEL_EXECUTION_MESSAGE_SIZE is 16K, which shouldprove sufficient in most cases.∙Set OPTIMIZER_DYNAMIC_SAMPLING = 1 or simply analyze your objects because 10g Dynamic sampling can generate extra CR buffers during execution of SQLstatements.∙Tune DataGuard to avoid cluster related waits. Improperly tuned DataGuard settings can cause high LOG FILE SYNC WAIT and GLOBAL CACHE LOG FLUSH TIME.Reference:/technetwork/database/features/availability/maa-wp-10gr2-data guardnetworkbestpr-134557.pdf,/technetwork/database/features/availability/maa-wp-10gr2-reco verybestpractices-131010.pdfPerformance Tuning Considerations。
oracle12c操作手册摘要:一、前言二、安装准备1.确保系统满足安装要求2.下载所需的安装文件三、安装过程1.配置DNS2.创建必要的用户和组3.安装Oracle 数据库服务器4.设置密码5.完成安装四、安装后的操作1.验证安装是否成功2.创建数据库实例3.管理数据库五、总结正文:一、前言Oracle 12c 是甲骨文公司推出的一款强大的数据库管理系统,适用于各种规模的企业和组织。
本操作手册将为您提供在Linux 系统上安装和配置Oracle 12c 数据库的详细步骤。
二、安装准备1.确保系统满足安装要求在安装Oracle 12c 之前,请确保您的Linux 系统满足以下要求:- 64 位处理器- 16 核CPU- 384G 内存- 16T 硬盘- CentOS 7.4 及以上版本2.下载所需的安装文件请从Oracle 官方网站下载Oracle 12c 数据库安装包和预安装脚本。
三、安装过程1.配置DNS为了确保安装过程中网络连接的稳定性,需要先配置DNS。
2.创建必要的用户和组由于Oracle 不允许root 用户进行安装,因此需要创建三个用户组,并将Oracle 添加到这些组中。
```bashgroupadd -g 54321 oinstallgroupadd -g 54322 dbagroupadd -g 54323 operuseradd -u 54321 -g oins```3.安装Oracle 数据库服务器接下来,使用root 用户执行以下命令安装Oracle 数据库服务器:```bashsudo yum install -y oracle-rdbms-server-12cr1-preinstallpasswd ```4.设置密码根据提示设置Oracle 数据库的初始密码。
5.完成安装安装完成后,可以使用以下命令启动Oracle 数据库服务:```bashsudo service oracle- Database start```四、安装后的操作1.验证安装是否成功登录到Oracle 数据库,查看数据库实例是否已经创建成功:```sqlSELECT * FROM v$instance;```2.创建数据库实例使用以下命令创建一个名为"mydb"的数据库实例:```bashsudo oracle-dbca -S -d mydb```3.管理数据库使用Oracle 提供的工具,如sql*plus、sql*developer 等,对数据库进行管理。
L i n u x+O r a c l e12c R A C 安装配置详细记录过程(V1.0)图文并茂目录1 Oracle12c RAC 数据库安装准备工作 (3)1.1 安装环境介绍 (4)1.2 数据库安装软件下载 (4)2 Oracle12c RAC 数据库安装环境配置 (4)2.1 安装主机或虚拟机 (4)2.2 安装操作系统 (4)2.3 hosts 文件配置 (7)2.4 添加组与用户 (7)2.5 添加文件系统 (8)2.6 修改操作系统参数 (8)2.7 禁止NTP (11)2.8 配置grid 和oracle 用户的环境变量 (11)2.9 配置SSH 信任关系 (15)2.10 调整页面交换空间 (16)2.11 配置磁盘 (16)2.12 使用Xmanager 远程桌面到Linux (18)3 安装12c Grid Infrastructure 组件 (19)3.1 解压安装文件 (19)3.2 开始安装GRID (19)3.3 指定安装和配置Grid Cluster (20)3.4 选择产品语言,添加简体中文 (22)3.5 配置SCAN (23)3.6 配置节点IP 与SSH 测试 (23)3.7 选择网卡 (24)3.8 选择是否配置GRID Management Repository (24)3.9 配置存储选项选择asm (25)3.10 输入asm 密码 (26)3.11 选择操作系统组 (27)3.12 选择ORACLE_BASE 和ORACLE_HOME (27)3.13 Root 脚本执行 (28)3.14 操作系统环境检测 (29)3.15 安装程序汇总 (29)3.16 开始安装 (30)3.17 按照提示在主机上运行orainstRoot.sh 和root.sh (31)3.18 安装完成后检查状态 (37)4 创建ASM 磁盘组 (38)5 安装ORACLE 12c RAC 数据库软件 (40)5.1 运行安装命令 (40)5.2 配置安装选项,选择install database software only (42)5.3 选择安装语言 (43)5.4 选择企业版安装 (43)5.5 选择安装路径 (44)5.6 默认指定相关组 (44)5.7 安装检查 (45)5.8 开始安装 (46)5.9 安装完成后,主机运行root.sh 文件 (47)6 创建Oracle 12c RAC 数据库实例 (48)6.1 运行dbca 创建数据库实例 (48)6.2 选择“Cluster database” (48)6.3 选择“Create database” (49)6.4 选择Advanced Mode (50)6.5 选择自定义数据库 (50)6.6 输入“Global Database Name”和“Sid Prefix” (51)6.7 选择集群节点 (52)6.8 配置EM (52)6.9 选择“Use the Same Password for all Accounts” (53)6.10 选择“Automatic Storage Management (ASM)” (53)6.11 配置数据库选项 (54)6.12 配置数据库参数 (55)6.13 数据库创建选项建议 (57)6.14 开始创建数据库 (58)6.15 数据库创建完成 (58)6.16 查看资源组状态 (59)1 Oracle12c RAC 数据库安装准备工作1.1 安装环境介绍Red H a t E n t e r p r i s e L i nu x S e r v e r r e l ea s e6.3X86_64两台内存至少4GO r a c l e D a t a b a s e12.1.0.1采用A S M存储方式备注:o r a c l e12c 不支持32 位的环境1.2 数据库安装软件下载请在O r a c l e官方网站下载:li nu x a m d64_12c_g r i d_1o f2;li nu x a m d64_12c_g r i d_2o f2;li nu x a m d64_12c_d a t a b a s e_1o f2li nu x a m d64_12c_d a t a b a s e_2o f2下载地址:h tt p://www.o r a c l e.c o m/t e c hn e t w o r k/d a t a b a s e/e n t e r p r i s e-e d i t i o n/do w n l o a d s/i n d e x.h t m l2 Oracle12c RAC 数据库安装环境配置2.1 安装主机或虚拟机安装步骤略。
1系统配置及环境检查4.1 系统配置4.1.1 主机环境(主机工程师职责)建议操作系统版本:●适用于ORACLE11g数据库:Oracle Linux或 Redhat或CentOS 64位Linux 6.5或以上且 < Linux 7之间的版本。
●适用于ORACLE12c数据库:Oracle Linux或 Redhat或CentOS 64位 Linux 7的版本。
操作系统安装要求:建议:主机名在8位以内;不带_和-;数字不在第一位;主机名尽量都小写。
Oracle版本推荐使用11g(11.2.0.4)或12c(12.2.0.1)4.1.2 网络环境(Linux工程师职责)至少2个网卡:1个用于业务访问,1个用于私有及心跳( 建议做双网卡绑定)关于IP规划(以下仅ORACLE集群数据库需要):●每台机器1个IP(一般C类网)用于私有心跳,心跳线也需要连接交换机,不建议直连●若是RAC集群数据库生产业务IP分配共需要5个(2个机器物理IP、3个数据库虚拟IP),若是单机数据库则仅需要1个业务IP。
4.1.3 集群RAC数据库存储要求环境(存储工程师职责)●需要存储工程师在操作系统上安装部署好存储多路径软件●ORACLE 11gR2/12cR2 集群需要:1、准备3个100G的小磁盘,用作ocr vote disk (集群心跳盘、资料盘)。
2、准备至少3个500G磁盘用于存放业务应用数据。
3、准备1个500G磁盘存放归档及闪回数据。
(以上仅是基本原则,若存储裸余空间很多,则建议剩下空间划分成若干500G/个以备日后候用)以上所有的存储划分出来的LUN磁盘均需要影射给所有主机并都能同时读写访问。
4.2 环境检查4.2.1 操作系统环境要求(主机工程师职责)Oracle rac的OS空间需求如下:/tmp >10GBORACLE软件存放目录建议/u01 >=100GSwap的大小取决于内存,2G~32G按实际内存大小,大于32G按:实际内存的二分之一4.2.2 操作系统RPM包检查(主机工程师职责)●配置好本地Linux安装光盘YUM安装环境●执行以下命令检查缺少的包,若有缺少,请补安装上:rpm -q binutils compat-libstdc++-33 \elfutils-libelf \elfutils-libelf-devel \gcc \gcc-c++ \glibc\glibc-common \glibc-devel \libaio \libaio-devel \libgcc \libstdc++ \libstdc++-devel \make\sysstat \unixODBC \unixODBC-devel | grep "not installed"4.3 ORACLE数据库安装前信息准备(甲方或集成商职责)1、ORACLE数据库名称是什么?如orcl2、ORACLE数据库字符集是什么?(如简体中文、UTF8、西文等等)3、数据库创建时,是否开启归档?。
Oracle12c安装与卸载20151106 机器基础环境:Windows8(x64)安装Oracle12c R2 for Windows (x64)准备版本:winx64_oracle_12c_database一.安装:1、准备1.1、下载oracle12c R2for Windows的版本下载地址:/technetwork/database/enterprise-edition/downloa ds/index.html其中包括两个压缩包:winx64_12c_database_1of2.zip,winx64_12c_database_2of2.zip1.2、解压oracle12c R2for Windows的版本将两个压缩包解压到同一个目录下,即“database”,然后单击解压目录下的“setup.exe”文件:2、安装过程2.1、安装双击”setup.exe”,软件会加载并初步校验系统是否可以达到了数据库安装的最低配置, 检查监视器参数,如果达到要求,就会直接加载程序并进行下一步的安装;2.2、配置安全更新在出现的“配置安全更新”窗口中,取消“我希望通过My Oracle Support 接受安全更新”,单击“下一步”:注:电子邮件(可选)我希望通过My Oracle Support接收安全更新(W)(可选)一般情况下,这两项不必要勾选。
2.3、软件更新安装时请连接网络,选择跳过更新,点击“下一步”:2.4、安装选项注:创建和配置数据库(C)(本文档选该项,下一步)安装数据库软件并创建一个数据库实例(初学者)仅安装数据库软件(D)安装数据库软件,不会创建数据库实例(非初学者)升级现有的数据库(U)升级低版本的Oracle数据库2.5、系统类默认为“桌面类”;如果是安装在服务器上,选择“服务器类”,如Windows Server系列,Ubuntu Server等。
2.6、指定Oracle主目录用户(1)使用现有的Windows用户(X)选择该项,有错误提示,如果选择该项,则需要指定没有管理权限的用户。
ORACLE 12C R2 RAC集群部署搭建目录1、ORACLE 12.2软硬件要求 (2)1.1 硬件最低配置要求 (2)1.2 ORACLE 12.2认证的OS软件版本 (2)2、整体规划部分 (3)2.1 IP地址规划 (3)2.2 操作系统本地磁盘分区规划 (3)2.3 共享存储与ASM磁盘组规划 (4)3、操作系统配置部分 (4)3.1 配置hosts文件 (4)3.2 安装RPM包 (4)3.3创建用户组 (5)3.4 创建文件目录及权限配置 (6)3.5 配置环境变量 (6)3.6 安装cvuqdisk (7)4、修改操作系统配置 (8)4.1 开启nscd (8)4.2 关闭防火墙 (8)4.3 禁用selinux (8)4.4 关闭TransparentHugePages (8)4.5 配置/etc/security/limits.conf (9)4.6 配置/etc/sysctl.conf (9)4.7 配置/etc/pam.d/login (10)4.8 配置DNS (10)4.9 修改时间同步方式 (10)4.10 修改nsswitch.conf (11)4.10 配置NOZEROCONF (11)4.11 配置互信 (11)5、ASM磁盘配置部分 (12)5.1 UDEV配置asm磁盘(两个节点都执行) (12)5.2 验证asm disk生成 (12)5.2 修改磁盘属性 (13)6、grid软件安装 (13)6.1 检测安装环境 (13)6.2 安装GI(Grid Infrastructure) (15)7 、asmca创建其它asmdiskgroup (25)8、database软件安装 (26)9、创建CDB (31)10、创建PDB (36)10.1 以命令方式创建PDB (36)10.2 查看创建成功的PDB (37)3、操作系统配置部分3.1 配置hosts文件Vi /etc/hosts192.168.1.189 GNS192.168.1.191 rac1 192.168.1.192 rac1-vip 10.1.1.191 rac1-pri1 10.1.1.192 rac1-pri2 192.168.1.193 rac2 192.168.1.194 rac2-vip 10.1.1.193 rac2-pri1 10.1.1.194 rac2-pri2 192.168.1.195 rac-scan 192.168.1.196 rac-scan 192.168.1.197 rac-scan3.2 安装RPM包binutils-2.20.51.0.2-5.11.el6 (x86_64)compat-libcap1-1.10-1 (x86_64)compat-libstdc++-33-3.2.3-69.el6 (x86_64)compat-libstdc++-33-3.2.3-69.el6 (i686)gcc-4.4.4-13.el6 (x86_64)gcc-c++-4.4.4-13.el6 (x86_64)glibc-2.12-1.7.el6 (i686)glibc-2.12-1.7.el6 (x86_64)glibc-devel-2.12-1.7.el6 (x86_64)glibc-devel-2.12-1.7.el6 (i686)kshlibgcc-4.4.4-13.el6 (i686)libgcc-4.4.4-13.el6 (x86_64)libstdc++-4.4.4-13.el6 (x86_64) libstdc++-4.4.4-13.el6 (i686)libstdc++-devel-4.4.4-13.el6 (x86_64) libstdc++-devel-4.4.4-13.el6 (i686) libaio-0.3.107-10.el6 (x86_64)libaio-0.3.107-10.el6 (i686)libaio-devel-0.3.107-10.el6 (x86_64) libaio-devel-0.3.107-10.el6 (i686) libXext-1.1 (x86_64)libXext-1.1 (i686)libXtst-1.0.99.2 (x86_64)libXtst-1.0.99.2 (i686)libX11-1.3 (x86_64)libX11-1.3 (i686)libXau-1.0.5 (x86_64)libXau-1.0.5 (i686)libxcb-1.5 (x86_64)libxcb-1.5 (i686)libXi-1.3 (x86_64)libXi-1.3 (i686)make-3.81-19.el6sysstat-9.0.4-11.el6 (x86_64) unixODBC.x86_64 0:2.2.14-12.el6_3 nscd3.3创建用户组#/usr/sbin/groupadd –g 501 oinstall #/usr/sbin/groupadd –g 502dba#/usr/sbin/groupadd –g 503oper#/usr/sbin/groupadd –g 504asmadmin#/usr/sbin/groupadd –g 505asmdba#/usr/sbin/groupadd –g 506 asmoper#/usr/sbin/useradd –u 501 –g oinstall –G asmadmin,asmdba,asmoper grid #/usr/sbin/useradd –u 502 –goinstall –G dba,asmdba oraclepasswd oraclepasswd grid3.4 创建文件目录及权限配置#mkdir -p /dba/app/grid--this is the GI ORACLE_BASE#mkdir -p /dba/app/12.2.0/grid--this is the ORACLE_HOME FOR GI#mkdir -p /dba/app/oracle--this is the RDBMS ORACLE_BASE#mkdir -p /dba/app/oracle/product/12.2.0/db_1--this is the RDBMSORACLE_HOME#mkdir -p /dba/app/oraInventory--this is oraInventory location#chown -R grid:oinstall/dba/app#chown -Roracle:oinstall /dba/app/oracle#chmod -R 775 /dba/app3.5 配置环境变量#su – grid$vi .bash_profileexport TMPDIR=$TMPexport ORACLE_BASE=/dba/app/gridexport ORACLE_HOME=/dba/app/12.2.0/gridexport ORACLE_SID=+ASM1export PATH=/usr/sbin:$PATHexport PATH=$ORACLE_HOME/bin:$PATHexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libexport CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlibalias sqlplus="rlwrap sqlplus"$source .bash_profile#su – oracle$vi .bash_profileexport PATHexport TMP=/tmpexport TMPDIR=$TMPexport ORACLE_BASE=/dba/app/oracleexport ORACLE_HOME=$ORACLE_BASE/product/12.2.0/db_1export ORACLE_SID=naridbexport PATH=/usr/sbin:$PATHexport PATH=$ORACLE_HOME/bin:$PATHexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libexport CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlibalias sqlplus="rlwrap sqlplus"alias rman="rlwrap rman"3.6 安装cvuqdiskcvuqdisk存于oracle GI安装介质的cv/rpm目录下export CVUQDISK_GRP=asmadminrpm –ivh cvuqdisk-1.0.10-1.rpm4、修改操作系统配置4.1 开启nscd#chkconfig nscd onchkconfig --level 35 nscd onservice nscd start4.2 关闭防火墙#chkconfig iptables off#chkconfig ip6tables off#service iptables stop#service ip6tables stop4.3 禁用selinux修改/etc/selinux/config编辑文本中的SELINUX=enforcing为SELINUX=disabled4.4 关闭TransparentHugePages(1)查看验证transparent_hugepage的状态cat/sys/kernel/mm/redhat_transparent_hugepage/enabled always madvise [never] 结果为never表示关闭(2)关闭transparent_hugepage的配置4.5 配置/etc/security/limits.confgrid soft nproc 2047grid hard nproc 16384grid soft nofile 1024grid hard nofile 65536grid soft stack 10240grid hard stack 32768oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536oracle soft stack 10240oracle hard stack 327684.6 配置/etc/sysctl.conf增加以下内容fs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmall = 67108864kernel.shmmax = 274877906944kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500 net.ipv4.tcp_rmem = 4096 87380 4194304 net.ipv4.tcp_wmem = 4096 16384 4194304 net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576针对rp_filter部分,如果没有多张私有网卡,则不需要配置,文档 ID1286796.1有描述。
oracle12c操作手册(实用版)目录一、前言二、安装前的准备工作1.确保系统满足安装要求2.准备安装所需的软件包三、安装 Oracle 12c 数据库1.解压缩安装文件2.运行安装向导3.配置安装选项4.完成安装四、配置 Oracle 12c 数据库1.设置环境变量2.初始化数据库3.创建数据库实例4.配置数据库选项五、Oracle 12c 数据库的管理与维护1.管理数据库用户和权限2.监控数据库性能3.数据库备份与恢复4.数据库的安全与优化六、总结正文一、前言Oracle 12c 是 Oracle 公司推出的一款强大的数据库管理系统,适用于各类企业级应用。
本操作手册将为您详细介绍如何在 Linux 系统上安装和配置 Oracle 12c 数据库。
二、安装前的准备工作1.确保系统满足安装要求在安装 Oracle 12c 数据库之前,首先需要确保您的系统满足以下要求:- 操作系统:CentOS 7.4 及以上版本- CPU:16 核- 内存:384G- 硬盘:16T2.准备安装所需的软件包在安装 Oracle 12c 之前,需要先安装一些必要的软件包,例如:- compat-libcap1-1.10-7.el7.x8664.rpm- compat-libstdc-33-3.2.3-72.el7.x8664.rpm三、安装 Oracle 12c 数据库1.解压缩安装文件将下载的 Oracle 12c 安装文件解压到一个目录中。
2.运行安装向导双击运行解压后的安装向导程序,开始安装 Oracle 12c 数据库。
3.配置安装选项在安装向导中,需要进行以下配置:- 选择安装目录:建议选择/u01- 设置数据库名称:根据需要设置- 设置数据库选项:根据需要设置,例如字符集、存储选项等- 设置密码:为 root 用户设置密码4.完成安装按照向导提示完成安装过程,安装成功后,可以在/u01 目录下看到oracle 文件夹。
Oracle Linux 7.1 安装Oracle 12C RACOS环境:[root@rac12c1 ~]#uname -aLinux rac12c1 3.8.13-55.1.6.el7uek.x86_64 #2 SMP Wed Feb 11 14:18:22 PST 2015 x86_64 x86_64x86_64 GNU/LinuxIP规划:[root@rac12c1 ~]# cat /etc/hosts127.0.0.1 localhostlocalhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6# Public IP for Oracle 12C RAC172.16.30.221 rac12c1.localdomain rac12c1172.16.30.222 rac12c2.localdomain rac12c2# Private IP for Oracle 12C RAC192.168.30.221 rac12c1pri.localdomain rac12c1pri192.168.30.222 rac12c1pri.localdomain rac12c2pri# Virtual IP for Oracle 12C RAC172.16.30.223 rac12c1vip.localdomain rac12c1vip172.16.30.224 rac12c2vip.localdomain rac12c2vip#SCAN172.16.30.225 rac12c-scan.localdomain rac12c-scan禁用Selinux:[root@rac12c1 ~]# cat /etc/selinux/config# This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:# enforcing - SELinux security policy is enforced.# permissive - SELinux prints warnings instead of enforcing.# disabled - No SELinux policy is loaded.SELINUX=disabled# SELINUXTYPE= can take one of three two values:# targeted - Targeted processes are protected,# minimum - Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection.SELINUXTYPE=targeted[root@rac12c1 ~]#setenforce 0修改/dev/shm大小为8Gtmpfs /dev/shm tmpfs rw,exec,size=2048M 0 0[root@rac12c1 ~]# mount -o remount /dev/shm/禁用防火墙:[root@rac12c1 ~]#systemctl start firewalld.service[root@rac12c1 ~]#systemctl stop firewalld.service[root@rac12c1 ~]# ]# systemctl disable firewalld.servicerm '/etc/systemd/system/basic.target.wants/firewalld.service'rm '/etc/systemd/system/dbus-org.Fedora project.FirewallD1.service'重启各个节点操作系统,检查各个节点网络连通性:123[root@rac12c1 ~]# ping rac12c2pri[root@rac12c1 ~]# ping rac12c2,,,配置YUM:[root@rac12c1 ~]# cat /etc/yum.repos.d/base.repo[ol7_latest]name=Oracle Linux $releasever Latest ($basearch)baseurl=file:///mntgpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oraclegpgcheck=0enabled=1安装oracle相关的依赖包:[root@rac12c1 ~]# yum install oracle-rdbms-server-12cR1-preinstall –y创建用户组和用户,上步操作依据创建了oinstall 54321 dba 54322用户组)和用户oracle (54321),所以执行如下操作创建相关的用户组和用户添加组[root@rac12c1 ~]#groupadd -g 54323 oper[root@rac12c1 ~]# groupadd -g 54325 asmdba[root@rac12c1 ~]#groupadd -g 54328 asmadmin[root@rac12c1 ~]#groupadd -g 54329 asmoper添加grid用户[[root@rac12c1 ~]#useradd -u 54322 -g oinstall -G dba,asmdba,asmadmin,asmoper grid为oracle和grid用户设置密码12[[root@rac12c1 ~]#passwd oracle[root@rac12c1 ~]#passwd grid确保oracle是oper,asmdba组成员1[root@rac12c1 ~]# usermod -g oinstall -G dba,oper,asmdba oracle 修改用户资源限制:grid soft nofile 1024grid hard nofile 65536grid soft nproc 16384grid hard nproc 16384grid soft stack 10240grid hard stack 32768grid hard memlock 134217728grid soft memlock 134217728## # Oracle useroracle soft nofile 1024oracle hard nofile 65536oracle soft nproc 16384oracle hard nproc 16384oracle soft stack 10240oracle hard stack 32768oracle hard memlock 13217728oracle soft memlock 134217728# End of file修改内核参数,fs.file-max = 6815744kernel.sem = 250 32000 100 128kernel.shmmni = 4096kernel.shmall = 1073741824kernel.shmmax = 4398046511104kernel.panic_on_oops = 1net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576fs.aio-max-nr = 1048576net.ipv4.ip_local_port_range = 9000 65500[root@rac12c1 ~]# /sbin/sysctl -p安装oracleasm-support and oracleasmlib,配置共享磁盘。
ORACLE12CR2RAC安装配置指南>> fromASM磁盘空间最低要求求12C R2相⽐前⼀版本,OCR的磁盘占⽤需求有了明显增长。
为了⽅便操作,设置如下:External: 1个卷x40GNormal: 3个卷x30GHight: 5个卷x25GFlex: 3个卷x30GOCR+VOLTING+MGMT存储通常放到⼀个磁盘组,且选择Normal的冗余⽅式,也即最少3块asm磁盘80G空间。
操作系统安装操作系统安装时把“Server with GUI“和”Compatibility Libraries”勾上,其他都不⽤选择。
版本采⽤CentOS 7、RHEL 7或者Oracle Linux 7安装oracle预安装包创建⽤户和组oracle⽤户和dba、oinstall组已经在上⼀步创建完毕。
rac所有节点的oracle⽤户和grid⽤户的uid和gid必须⼀致,所以创建的时候最好制定uid和gid。
groupadd --gid 54323 asmdbagroupadd --gid 54324 asmopergroupadd --gid 54325 asmadmingroupadd --gid 54326 opergroupadd --gid 54327 backupdbagroupadd --gid 54328 dgdbagroupadd --gid 54329 kmdbausermod --uid 54321 --gid oinstall --groups dba,oper,asmdba,asmoper,backupdba,dgdba,kmdba oracle useradd --uid 54322 --gid oinstall --groups dba,asmadmin,asmdba,asmoper grid安装⽬录mkdir -p /u01/app/12.2.0/gridmkdir -p /u01/app/gridmkdir -p /u01/app/oraclechown -R grid:oinstall /u01chown oracle:oinstall /u01/app/oraclechmod -R 775 /u01/环境变量grid环境变量cat <<EOF >>/home/grid/.bash_profileORACLE_SID=+ASM1ORACLE_HOME=/u01/12.2.0/gridPATH=$ORACLE_HOME/bin:$PATHLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlibexport ORACLE_SID CLASSPATH ORACLE_HOME LD_LIBRARY_PATH PATHEOF在节点2,ORACLE_SID=+ASM2oracle环境变量cat <<EOF >>/home/oracle/.bash_profileORACLE_SID=starboss1ORACLE_HOME=/u01/app/oracle/product/12.2.0/db_1ORACLE_HOSTNAME=rac01PATH=$ORACLE_HOME/bin:$PATHLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlibexport ORACLE_SID ORACLE_HOME ORACLE_HOSTNAME PATH LD_LIBRARY_PATH CLASSPATH EOF在节点2,ORACLE_SID=starboss2,ORACLE_HOSTNAME=rac02修改logind.conf# vi /etc/systemd/logind.confRemoveIPC=no# systemctl daemon-reload# systemctl restart systemcd-logind加载pam_limits.so模块echo "session required pam_limits.so" >> /etc/pam.d/login禁⽤selinuxsetenforce 0vi /etc/sysconfig/selinux禁⽤防⽕墙# systemctl stop firewalld && systemctl disable firewalld修改ulimitcat <<EOF >> /etc/security/limits.d/99-grid-oracle-limits.conforacle soft nproc 16384oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536oracle soft stack 10240oracle hard stack 32768grid soft nproc 16384grid hard nproc 16384grid soft nofile 1024grid hard nofile 65536grid soft stack 10240grid hard stack 32768EOF创建⾃定义的ulimitcat <<EOF >> /etc/profile.d/oracle-grid.shif [ $USER = "oracle" ]; thenif [ $SHELL = "/bin/ksh" ]; thenulimit -u 16384ulimit -n 65536elseulimit -u 16384 -n 65536fifiif [ $USER = "grid" ]; thenif [ $SHELL = "/bin/ksh" ]; thenulimit -u 16384ulimit -n 65536elseulimit -u 16384 -n 65536fifiEOF修改共享内存分区⼤⼩将如下参数添加到/etc/fstab,具体⼤⼩数值根据实际情况调整,因为这个数值和物理内存以及MEMORY_TARGET有关。
Oracle 12d RAC for rhellinux 6.4 install1.环境介绍系统:redhatlinux 6.4 64bit数据库:oracledatabase.2 &2.介质包linuxamd64_12102_database_1of2.ziplinuxamd64_12102_database_2of2.ziplinuxamd64_12102_grid_1of2.ziplinuxamd64_12102_grid_2of2.zip3.网络配置信息(两个节点一致)每台物理主机四个网卡,每两个网卡绑定为一个网卡,分别命名为bond0 和bond1,bond0 用于Public,bond1用于Private。
4.禁用防火墙和SELinux(以node1为例,两节点相同)5.DNS服务器配置:安装DNS的三个支持包[rootdns12c ~]# rpm -ivh /mnt[rootdns12c ~]# rpm -ivh /mnt[rootdns12c ~]# rpm -ivh /mntDNS配置:DNS服务器,这里选择dns12c这个节点作为DNS服务器。
修改配置文件:[rootdns12c ~]# cat /etc/named.conf//// named.conf//// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS // server as a caching only nameserver (as a localhost DNS resolver only).//// See /usr/share/doc/bind*/sample/ for example named configuration files.//options {// listen-on port 53 ; };// listen-on-v6 port 53 { ::1; };directory "/var/named";dump-file "/var/named/data/cache_dump.db";statistics-file "/var/named/data/named_stats.txt";memstatistics-file "/var/named/data/named_mem_stats.txt";// allow-query { localhost; };recursion yes;dnssec-enable yes;dnssec-validation yes;dnssec-lookaside auto;/* Path to ISC DLV key */bindkeys-file "/etc/";managed-keys-directory "/var/named/dynamic";};logging {channeldefault_debug {file "data/named.run";severity dynamic;};};zone "." IN {type hint;// file "named.ca";file "/dev/null";};include "/etc/named.rfc1912.zones";include "/etc/";[rootdns12c ~]#修改文件/etc[rootdns12c ~]# cat /etc/named.rfc1912.zones// named.rfc1912.zones://// Provided by Red Hat caching-nameserver package//// ISC BIND named zone configuration for zones recommended by// RFC 1912 section 4.1 : localhost TLDs and address zones// (c)2007 R W Franks//// See /usr/share/doc/bind*/sample/ for example named configuration files. //zone "localhost.localdomain" IN {type master;file "named.localhost";allow-update { none; };};zone "localhost" IN {type master;file "named.localhost";allow-update { none; };};zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN { type master;file "named.loopback";allow-update { none; };};zone "1.0.0.127.in-addr.arpa" IN {type master;file "named.loopback";allow-update { none; };};zone "0.in-addr.arpa" IN {type master;file "named.empty";allow-update { none; };};zone "ractms " IN {type master;file "";allow-update { none; };};zone "racecs " IN {type master;file "";allow-update { none; };};zone "ractos " IN {type master;file "";allow-update { none; };};zone ".in-addr.arpa" IN {type master;file ".local";allow-update { none; };};[rootdns12c ~]#配置区域:[rootdns12c ~]# cat /var/named/$TTL 86400IN . root.ractms . (42 ; serial (d.adams)3H ; refresh15M ; retry1W ; expiry1D) ; minimumIN NS dns.ractms .dns IN A .244scan IN A .242scan IN A .241scan IN A .240[rootdns12c ~]#[rootdns12c ~]# cat /var/named/$TTL 86400IN . root.ractms . (42 ; serial (d.adams)3H ; refresh15M ; retry1W ; expiry1D) ; minimumIN NS dns.ractms .dns IN A .244scan IN A .249scan IN A .248scan IN A .247[rootdns12c ~]#[rootdns12c ~]# cat /var/named/$TTL 86400IN . root.ractms . (42 ; serial (d.adams)3H ; refresh15M ; retry1W ; expiry1D) ; minimumIN NS dns.ractms .dns IN A .244scan IN A .235scan IN A .234scan IN A .233[rootdns12c ~]#[rootdns12c ~]# cat /var/named/.local$TTL 86400IN . root.ractms . (1997022700 ; Serial28800 ; Refresh14400 ; Retry3600000 ; Expire86400) ; MinimumIN NS dns.ractms .242 IN PTR scan.ractms .241 IN PTR scan.ractms .240 IN PTR scan.ractms .249 IN PTR scan.racecs .248 IN PTR scan.racecs .247 IN PTR scan.racecs .235 IN PTR scan.ractos .234 IN PTR scan.ractos .233 IN PTR scan.ractos .[rootdns12c ~]#6.设置DNS 服务# chkconfig named on# chkconfig --list namednamed 0:off 1:off 2:on 3:on 4:on 5:on 6:off## service named restartStopping named: [ OK ]Starting named: [ OK ]7.两个节点配置DNSa)节点一:[roottmsnode1 ~]# cat /etc/resolv.conf# Generated by NetworkManager# No nameservers found; try putting DNS servers into your # ifcfg files in /etc/sysconfig/network-scripts like so:## DNS1=# DNS2=domain ractmsnameserver.244options rotateoptions timeout:2options attempts:5[roottmsnode1 ~]#b)节点二:[roottmsnode2 ~]# cat /etc/resolv.conf# Generated by NetworkManager# No nameservers found; try putting DNS servers into your # ifcfg files in /etc/sysconfig/network-scripts like so:## DNS1=# DNS2=domain ractmsnameserver.244options rotateoptions timeout:2options attempts:5[roottmsnode2 ~]#8.DNS解析测试:(两个节点测试)[roottmsnode1 ~]# nslookupServer: .244Address: .244#53Address: .247Address: .249Address: .248[roottmsnode1 ~]#[roottmsnode1 ~]# nslookupServer: .244Address: .244#53Address: .242Address: .241Address: .240[roottmsnode1 ~]# nslookupServer: .244Address: .244#53Address: .234Address: .233Address: .235[roottmsnode1 ~]#[roottmsnode1 ~]# nslookup.233Server: .244Address: .244#53233..in-addr.arpa name = scan.ractos .[roottmsnode1 ~]# nslookup.234Server: .244Address: .244#53234..in-addr.arpa name = scan.ractos .[roottmsnode1 ~]# nslookup.235Server: .244Address: .244#53235..in-addr.arpa name = scan.ractos .[roottmsnode1 ~]# nslookup.240Server: .244Address: .244#53240..in-addr.arpa name = scan.ractms .[roottmsnode1 ~]# nslookup.241Server: .244Address: .244#53241..in-addr.arpa name = scan.ractms .[roottmsnode1 ~]# nslookup.242Server: .244Address: .244#53242..in-addr.arpa name = scan.ractms .[roottmsnode1 ~]# nslookup.247Server: .244Address: .244#53247..in-addr.arpa name = scan.racecs .[roottmsnode1 ~]# nslookup.248Server: .244Address: .244#53248..in-addr.arpa name = scan.racecs .[roottmsnode1 ~]# nslookup.249Server: .244Address: .244#53249..in-addr.arpa name = scan.racecs .[roottmsnode1 ~]#9.配置/etc/hosts 文件:(两个节点执行,以节点tmsnode1为例)# vi /etc/hosts127.0.0.1 localhostlocalhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6# For ORACLE# PUBLIC IP.244 tmsnode1.ractms tmsnode1.246 tmsnode2.ractms tmsnode2# VIP IP.243 tmsnode1-vip.ractms tmsnode1-vip.245 tmsnode2-vip.ractms tmsnode2-vip# PRIVATE IP10.158.25.252 tmsnode1-priv.ractms tmsnode1-priv10.158.25.253 tmsnode2-priv.ractms tmsnode2-priv# SCAN IP#### DNS SERVER[roottmsnode1 ~]#10.上传并解压软件[roottmsnode1 ~]# cd /soft/oracle/[roottmsnode1 oracle]# lltotal 5860048-rw-r--r--. 1 root root 918555219 Feb 17 09:53 linuxamd64_12102_client.zip-rw-r--r--. 1 root root 1673544724 Dec 18 14:57 linuxamd64_12102_database_1of2.zip -rw-r--r--. 1 root root 1014530602 Dec 18 14:54 linuxamd64_12102_database_2of2.zip -rw-r--r--. 1 root root 1747043545 Dec 18 15:39 linuxamd64_12102_grid_1of2.zip-rw-r--r--. 1 root root 646972897 Dec 18 15:08 linuxamd64_12102_grid_2of2.zip[roottmsnode1 oracle]#[roottmsnode1 oracle]# unzip linuxamd64_12102_grid_1of2.zip[roottmsnode1 oracle]# unzip linuxamd64_12102_grid_2of2.zip[roottmsnode1 oracle]# unzip linuxamd64_12102_database_1of2.zip[roottmsnode1 oracle]# unzip linuxamd64_12102_database_2of2.zip[roottmsnode1 oracle]# lltotal 5860048drwxr-xr-x. 7 root root 4096 Jul 7 2014 databasedrwxr-xr-x. 7 root root 4096 Jul 7 2014 grid-rw-r--r--. 1 root root 918555219 Feb 17 09:53 linuxamd64_12102_client.zip-rw-r--r--. 1 root root 1673544724 Dec 18 14:57 linuxamd64_12102_database_1of2.zip-rw-r--r--. 1 root root 1014530602 Dec 18 14:54 linuxamd64_12102_database_2of2.zip -rw-r--r--. 1 root root 1747043545 Dec 18 15:39 linuxamd64_12102_grid_1of2.zip-rw-r--r--. 1 root root 646972897 Dec 18 15:08 linuxamd64_12102_grid_2of2.zip[roottmsnode1 oracle]#11.配置软件所需要的用户组与用户(两节点执行):groupadd -g 1001 oinstallgroupadd -g 1002 dbagroupadd -g 1003 opergroupadd -g 1004 backupdbagroupadd -g 1005 dgdbagroupadd -g 1007 asmdbagroupadd -g 1008 asmopergroupadd -g 1009 asmadminuseradd -g oinstall -G asmadmin,asmdba,asmoper,dba griduseradd -g oinstall -G dba,backupdba,dgdba,asmadmin oraclepasswd gridpasswd oracle12.暂时禁用ntp服务(两节点执行)mv /etc/ntp.conf /etc/13.创建软件安装目录与授权(两节点执行)mkdir -p /u01/app/gridmkdirmkdirchown -R grid:oinstall /u01chown -R oracle:oinstall /u01/app/oraclechmod -R 755 /u01/14.修改用户环境变量(两节点执行)节点一:[roottmsnode1 ~]# vi /home/grid/.bash_profile# .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then. ~/.bashrcfi# User specific environment and startup programsPATH=$PATH:$HOME/binexport PATHexport TMP=/tmpexport TMPDIR=$TMPexportexport ORACLE_BASE=/u01/app/gridexportexport ORACLE_SID=+ASM1export PATH=/usr/sbin:$PATHexport PATH=$ORACLE_HOME/bin:$PATHexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libexport CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib [roottmsnode1 ~]# vi /home/oracle/.bash_profile# .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then. ~/.bashrcfi# User specific environment and startup programsPATH=$PATH:$HOME/binexport PATHexport TMP=/tmpexport TMPDIR=$TMPexportexport ORACLE_UNQNAME=tmsdb1export ORACLE_BASE=/u01/app/oracleexportexport ORACLE_SID=tmsdb1export PATH=/usr/sbin:$PATHexport PATH=$ORACLE_HOME/bin:$PATHexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libexport CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib节点二:[roottmsnode2 ~]# vi /home/grid/.bash_profile# .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then. ~/.bashrcfi# User specific environment and startup programsPATH=$PATH:$HOME/binexport PATHexport TMP=/tmpexport TMPDIR=$TMPexportexport ORACLE_BASE=/u01/app/gridexportexport ORACLE_SID=+ASM2export PATH=/usr/sbin:$PATHexport PATH=$ORACLE_HOME/bin:$PATHexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libexport CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib [roottmsnode2 ~]# vi /home/oracle/.bash_profile# .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then. ~/.bashrcfi# User specific environment and startup programsPATH=$PATH:$HOME/binexport PATHexport TMP=/tmpexport TMPDIR=$TMPexportexport ORACLE_UNQNAME=tmsdb2export ORACLE_BASE=/u01/app/oracleexportexport ORACLE_SID=tmsdb2export PATH=/usr/sbin:$PATHexport PATH=$ORACLE_HOME/bin:$PATHexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libexport CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib 15.配置本地yum源:(两节点执行)节点一:[roottmsnode1 dev]# mount /dev/sr0 /media/mount: block device /dev/sr0 is write-protected, mounting read-only[roottmsnode1 dev]#[roottmsnode1 ]# catrhel-source.repo[rhel-source]name=Red Hat Enterprise Linux $releasever - $basearch - Sourcebaseurl=file:///media/enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release[rhel-source-beta]name=Red Hat Enterprise Linux $releasever Beta - $basearch - Sourcebaseurl=ftp://ftp.redhat /pub/redhat/linux/beta/$releasever/en/os/SRPMS/enabled=0gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release[roottmsnode1 ]#节点二:[roottmsnode2 dev]# mount /dev/sr0 /media/mount: block device /dev/sr0 is write-protected, mounting read-only[roottmsnode2 dev]#[roottmsnode2 ]# catrhel-source.repo[rhel-source]name=Red Hat Enterprise Linux $releasever - $basearch - Sourcebaseurl=file:///media/enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release[rhel-source-beta]name=Red Hat Enterprise Linux $releasever Beta - $basearch - Sourcebaseurl=ftp://ftp.redhat /pub/redhat/linux/beta/$releasever/en/os/SRPMS/enabled=0gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release[roottmsnode2 ]#16.安装软件授权(两节点执行,node1 为例):[roottmsnode1 ~]# cd /soft/oracle/[roottmsnode1 oracle]# lsdatabase linuxamd64_12102_database_1of2.zip linuxamd64_12102_grid_1of2.zipgrid linuxamd64_12102_database_2of2.zip linuxamd64_12102_grid_2of2.zip[roottmsnode1 oracle]#[roottmsnode1 oracle]# chown -R grid:oinstall grid[roottmsnode1 oracle]# chmod -R 755 grid[roottmsnode1 oracle]# chown -R oracle:oinstall database[roottmsnode1 oracle]# chmod -R 755 database[roottmsnode1 oracle]# lltotal 4963016drwxr-xr-x. 7 oracle oinstall 4096 Jul 7 2014 databasedrwxr-xr-x. 7 grid oinstall 4096 Jul 7 2014 grid-rw-r--r--. 1 root root 1673544724 Dec 18 14:57 linuxamd64_12102_database_1of2.zip-rw-r--r--. 1 root root 1014530602 Dec 18 14:54 linuxamd64_12102_database_2of2.zip-rw-r--r--. 1 root root 1747043545 Dec 18 15:39 linuxamd64_12102_grid_1of2.zip -rw-r--r--. 1 root root 646972897 Dec 18 15:08 linuxamd64_12102_grid_2of2.zip [roottmsnode1 oracle]#17.开始安装grid 软件(node1节点执行):[roottmsnode1 ~]# su - grid[gridtmsnode1 ~]$cd /soft/oracle/grid[gridtmsnode1 grid]$ lsinstall response rpm runcluvfy.sh runInstallersshsetup stage welcome.html [gridtmsnode1 grid]$ export DISPLAY=10.158.62.236:0.0[gridtmsnode1 grid]$ export LANG=EN[gridtmsnode1 grid]$ ./runInstallerStarting Oracle Universal Installer...Checking Temp space: must be greater than 415 MB. Actual 1020745 MB Passed Checking swap space: must be greater than 150 MB. Actual 32767 MB PassedChecking monitor: must be configured to display at least 256 colors. Actual 16777216 PassedPreparing to launch Oracle Universal Installer from /tmp/OraInstall2016-02-23_11-32-13AM. Please wait ...[gridtmsnode1 grid]$这里设置ASM实例管理用户密码为:QqctI2016检查报错有可以使用这个脚本修复可修复的配置:All Fix-up operations were completed successfully. [roottmsnode1 ~]#All Fix-up operations were completed successfully. [roottmsnode2 ~]#在两个节点分别执行上面弹出的两个脚本,使用root用户执行(两节点执行):[roottmsnode1 ~]# /u01/app/oraInventory/orainstRoot.shChanging permissions of /u01/app/oraInventory.Adding read,write permissions for group.Removing read,write,execute permissions for world.Changing groupname of /u01/app/oraInventory to oinstall.The execution of the script is complete.[roottmsnode1 ~]#Performing root user operation.The following environment variables are set as:ORACLE_OWNER= gridORACLE_HOME= /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 byDatabase Configuration Assistant when a database is createdFinished running generic part of root script.Now product-specific root actions will be performed.crs/install/crsconfig_params2016/02/23 13:03:48 CLSRSC-4001: Installing Oracle Trace File Analyzer (TFA) Collector.2016/02/23 13:04:10 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.2016/02/23 13:04:11 CLSRSC-363: User ignored prerequisites during installationOLR initialization - successfulroot walletroot wallet certroot cert exportpeer walletprofile reader walletpa walletpeer wallet keyspa wallet keyspeer cert requestpa cert requestpeer certpa certpeer root cert TPprofile reader root cert TPpa root cert TPpeer pa cert TPpa peer cert TPprofile reader pa cert TPprofile reader peer cert TPpeer user certpa user cert2016/02/23 13:04:52 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.conf'CRS-4133: Oracle High Availability Services has been stopped.CRS-4123: Oracle High Availability Services has been started.CRS-4133: Oracle High Availability Services has been stopped.CRS-4123: Oracle High Availability Services has been started.CRS-2672: Attempting to start 'ora.evmd' on 'tmsnode1'CRS-2672: Attempting to start 'ora.mdnsd' on 'tmsnode1'CRS-2676: Start of 'ora.mdnsd' on 'tmsnode1' succeededCRS-2676: Start of 'ora.evmd' on 'tmsnode1' succeededCRS-2672: Attempting to start 'ora.gpnpd' on 'tmsnode1'CRS-2676: Start of 'ora.gpnpd' on 'tmsnode1' succeededCRS-2672: Attempting to start 'ora.cssdmonitor' on 'tmsnode1'CRS-2672: Attempting to start 'ora.gipcd' on 'tmsnode1'CRS-2676: Start of 'ora.cssdmonitor' on 'tmsnode1' succeededCRS-2676: Start of 'ora.gipcd' on 'tmsnode1' succeededCRS-2672: Attempting to start 'ora.cssd' on 'tmsnode1'CRS-2672: Attempting to start 'ora.diskmon' on 'tmsnode1'CRS-2676: Start of 'ora.diskmon' on 'tmsnode1' succeededCRS-2676: Start of 'ora.cssd' on 'tmsnode1' succeededASM created and started successfully.Disk Group OCR created successfully.CRS-2672: Attempting to start 'ora.crf' on 'tmsnode1'CRS-2672: Attempting to start 'ora.storage' on 'tmsnode1'CRS-2676: Start of 'ora.storage' on 'tmsnode1' succeededCRS-2676: Start of 'ora.crf' on 'tmsnode1' succeededCRS-2672: Attempting to start 'ora.crsd' on 'tmsnode1'CRS-2676: Start of 'ora.crsd' on 'tmsnode1' succeededCRS-4256: Updating the profileSuccessful addition of voting disk afe23c829f974fa7bf86a8597e6416c9.Successfully replaced voting disk group with +OCR.CRS-4256: Updating the profileCRS-4266: Voting file(s) successfully replaced## STATE File Universal Id File Name Disk group-- ----- ----------------- --------- ---------1. ONLINE afe23c829f974fa7bf86a8597e6416c9 (/dev/asm-diskg) [OCR]Located 1 voting disk(s).CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'tmsnode1'CRS-2673: Attempting to stop 'ora.crsd' on 'tmsnode1'CRS-2677: Stop of 'ora.crsd' on 'tmsnode1' succeededCRS-2673: Attempting to stop 'ora.storage' on 'tmsnode1'CRS-2673: Attempting to stop 'ora.mdnsd' on 'tmsnode1'CRS-2673: Attempting to stop 'ora.gpnpd' on 'tmsnode1'CRS-2673: Attempting to stop '' on 'tmsnode1'CRS-2677: Stop of 'ora.storage' on 'tmsnode1' succeededCRS-2673: Attempting to stop 'ora.crf' on 'tmsnode1'CRS-2673: Attempting to stop 'ora.ctssd' on 'tmsnode1'CRS-2673: Attempting to stop 'ora.evmd' on 'tmsnode1'CRS-2673: Attempting to stop 'ora.asm' on 'tmsnode1'CRS-2677: Stop of '' on 'tmsnode1' succeededCRS-2677: Stop of 'ora.mdnsd' on 'tmsnode1' succeededCRS-2677: Stop of 'ora.gpnpd' on 'tmsnode1' succeededCRS-2677: Stop of 'ora.crf' on 'tmsnode1' succeededCRS-2677: Stop of 'ora.ctssd' on 'tmsnode1' succeededCRS-2677: Stop of 'ora.evmd' on 'tmsnode1' succeededCRS-2677: Stop of 'ora.asm' on 'tmsnode1' succeededCRS-2673: Attempting to stop '' on 'tmsnode1'CRS-2677: Stop of '' on 'tmsnode1' succeededCRS-2673: Attempting to stop 'ora.cssd' on 'tmsnode1'CRS-2677: Stop of 'ora.cssd' on 'tmsnode1' succeededCRS-2673: Attempting to stop 'ora.gipcd' on 'tmsnode1'CRS-2677: Stop of 'ora.gipcd' on 'tmsnode1' succeededCRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'tmsnode1' has completedCRS-4133: Oracle High Availability Services has been stopped.CRS-4123: Starting Oracle High Availability Services-managed resourcesCRS-2672: Attempting to start 'ora.mdnsd' on 'tmsnode1'CRS-2672: Attempting to start 'ora.evmd' on 'tmsnode1'CRS-2676: Start of 'ora.mdnsd' on 'tmsnode1' succeededCRS-2676: Start of 'ora.evmd' on 'tmsnode1' succeededCRS-2672: Attempting to start 'ora.gpnpd' on 'tmsnode1'CRS-2676: Start of 'ora.gpnpd' on 'tmsnode1' succeededCRS-2672: Attempting to start 'ora.gipcd' on 'tmsnode1'CRS-2676: Start of 'ora.gipcd' on 'tmsnode1' succeededCRS-2672: Attempting to start 'ora.cssdmonitor' on 'tmsnode1'CRS-2676: Start of 'ora.cssdmonitor' on 'tmsnode1' succeededCRS-2672: Attempting to start 'ora.cssd' on 'tmsnode1'CRS-2672: Attempting to start 'ora.diskmon' on 'tmsnode1'CRS-2676: Start of 'ora.diskmon' on 'tmsnode1' succeededCRS-2676: Start of 'ora.cssd' on 'tmsnode1' succeededCRS-2672: Attempting to start '' on 'tmsnode1'CRS-2672: Attempting to start 'ora.ctssd' on 'tmsnode1'CRS-2676: Start of 'ora.ctssd' on 'tmsnode1' succeededCRS-2676: Start of '' on 'tmsnode1' succeededCRS-2672: Attempting to start 'ora.asm' on 'tmsnode1'CRS-2676: Start of 'ora.asm' on 'tmsnode1' succeededCRS-2672: Attempting to start 'ora.storage' on 'tmsnode1'CRS-2676: Start of 'ora.storage' on 'tmsnode1' succeededCRS-2672: Attempting to start 'ora.crf' on 'tmsnode1'CRS-2676: Start of 'ora.crf' on 'tmsnode1' succeededCRS-2672: Attempting to start 'ora.crsd' on 'tmsnode1'CRS-2676: Start of 'ora.crsd' on 'tmsnode1' succeededCRS-6023: Starting Oracle Cluster Ready Services-managed resourcesCRS-6017: Processing resource auto-start for servers: tmsnode1CRS-6016: Resource auto-start has completed for server tmsnode1CRS-6024: Completed start of Oracle Cluster Ready Services-managed resourcesCRS-4123: Oracle High Availability Services has been started.2016/02/23 13:09:55 CLSRSC-343: Successfully started Oracle Clusterware stackCRS-2672: Attempting to start 'ora.asm' on 'tmsnode1'CRS-2676: Start of 'ora.asm' on 'tmsnode1' succeededCRS-2672: Attempting to start '' on 'tmsnode1'CRS-2676: Start of '' on 'tmsnode1' succeeded2016/02/23 13:11:12 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ...succeeded[roottmsnode1 ~]#节点二:[roottmsnode2 ~]# /u01/app/oraInventory/orainstRoot.shChanging permissions of /u01/app/oraInventory.Adding read,write permissions for group.Removing read,write,execute permissions for world.Changing groupname of /u01/app/oraInventory to oinstall.The execution of the script is complete.[roottmsnode2 ~]#Performing root user operation.The following environment variables are set as:ORACLE_OWNER= gridORACLE_HOME= /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 byDatabase Configuration Assistant when a database is createdFinished running generic part of root script.Now product-specific root actions will be performed.crs/install/crsconfig_params2016/02/23 14:13:10 CLSRSC-4001: Installing Oracle Trace File Analyzer (TFA) Collector.2016/02/23 14:13:32 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.2016/02/23 14:13:33 CLSRSC-363: User ignored prerequisites during installationOLR initialization - successful2016/02/23 14:14:44 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.conf'CRS-4133: Oracle High Availability Services has been stopped.CRS-4123: Oracle High Availability Services has been started.CRS-4133: Oracle High Availability Services has been stopped.CRS-4123: Oracle High Availability Services has been started.CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'tmsnode2'CRS-2673: Attempting to stop '' on 'tmsnode2'CRS-2677: Stop of '' on 'tmsnode2' succeededCRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'tmsnode2' has completedCRS-4133: Oracle High Availability Services has been stopped.CRS-4123: Starting Oracle High Availability Services-managed resourcesCRS-2672: Attempting to start 'ora.mdnsd' on 'tmsnode2'CRS-2672: Attempting to start 'ora.evmd' on 'tmsnode2'CRS-2676: Start of 'ora.mdnsd' on 'tmsnode2' succeededCRS-2676: Start of 'ora.evmd' on 'tmsnode2' succeededCRS-2672: Attempting to start 'ora.gpnpd' on 'tmsnode2'CRS-2676: Start of 'ora.gpnpd' on 'tmsnode2' succeededCRS-2672: Attempting to start 'ora.gipcd' on 'tmsnode2'CRS-2676: Start of 'ora.gipcd' on 'tmsnode2' succeededCRS-2672: Attempting to start 'ora.cssdmonitor' on 'tmsnode2'CRS-2676: Start of 'ora.cssdmonitor' on 'tmsnode2' succeededCRS-2672: Attempting to start 'ora.cssd' on 'tmsnode2'CRS-2672: Attempting to start 'ora.diskmon' on 'tmsnode2'CRS-2676: Start of 'ora.diskmon' on 'tmsnode2' succeededCRS-2676: Start of 'ora.cssd' on 'tmsnode2' succeededCRS-2672: Attempting to start '' on 'tmsnode2'CRS-2672: Attempting to start 'ora.ctssd' on 'tmsnode2'CRS-2676: Start of 'ora.ctssd' on 'tmsnode2' succeededCRS-2676: Start of '' on 'tmsnode2' succeededCRS-2672: Attempting to start 'ora.asm' on 'tmsnode2'CRS-2676: Start of 'ora.asm' on 'tmsnode2' succeededCRS-2672: Attempting to start 'ora.storage' on 'tmsnode2'CRS-2676: Start of 'ora.storage' on 'tmsnode2' succeededCRS-2672: Attempting to start 'ora.crf' on 'tmsnode2'CRS-2676: Start of 'ora.crf' on 'tmsnode2' succeededCRS-2672: Attempting to start 'ora.crsd' on 'tmsnode2'CRS-2676: Start of 'ora.crsd' on 'tmsnode2' succeededCRS-6017: Processing resource auto-start for servers: tmsnode2CRS-2672: Attempting to start 'work' on 'tmsnode2'CRS-2676: Start of 'work' on 'tmsnode2' succeededCRS-2672: Attempting to start 'ora.ons' on 'tmsnode2'CRS-2676: Start of 'ora.ons' on 'tmsnode2' succeededCRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'tmsnode1'CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'tmsnode1' succeededCRS-2673: Attempting to stop 'ora.scan1.vip' on 'tmsnode1'CRS-2677: Stop of 'ora.scan1.vip' on 'tmsnode1' succeededCRS-2672: Attempting to start 'ora.scan1.vip' on 'tmsnode2'CRS-2676: Start of 'ora.scan1.vip' on 'tmsnode2' succeededCRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'tmsnode2'CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'tmsnode2' succeededCRS-6016: Resource auto-start has completed for server tmsnode2CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources CRS-4123: Oracle High Availability Services has been started.。
Oracle12CR2RAC安装过程记录Oracle 12CR2 RAC安装过程记录环境: 服务器(vbox虚拟机) 操作系统: CentOS 7.2 内存: 8G 本地磁盘: 50G IP规划 主机 IP priv-ip vip rac1 10.19.100.5192.168.220.510.19.100.15 rac2 10.19.100.6192.168.220.610.19.100.16 scan-IP 10.19.100.19 其中“IP”和“priv-ip”各占⽤⼀个⽹卡或者bind⽹卡,“vip”和“scan-IP”为rac节点启动后配置的虚拟IP和scanIP。
共享存储规划 本演⽰不做冗余,采⽤最低配置。
12CR2 voting disk⾄少需要40G有效空余空间。
Data disk预留60G有效磁盘空间。
⼀、安装前准备⼯作此步骤需要在两台服务器上都执⾏关闭selinux、防⽕墙等操作不赘述。
创建⽤户# groupadd -g 501 oinstall# groupadd -g 502 dba# groupadd -g 504 asmadmin# groupadd -g 506 asmdba# groupadd -g 507 asmoper# useradd -u 501 -g oinstall -G asmadmin,asmdba,asmoper grid# useradd -u 502 -g oinstall -G dba,asmdba oracle# passwd oracle# passwd grid ⽂件⽬录准备# mkdir -p /u01/app/oraInventory# mkdir -p /u01/app/grid# mkdir -p /u01/app/12.2.0/grid# mkdir -p /u01/app/oracle/product/12.2.0/db_1# chown -R grid:oinstall /u01/app/oraInventory# chown -R grid:oinstall /u01/app/grid# chown -R grid:oinstall /u01/app/12.2.0/grid# chown -R oracle:oinstall /u01/app/oracle# chown -R oracle:oinstall /u01/app/oracle/product/12.2.0/db_1# chmod -R 775 /u01 检查依赖包# rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' binutils \compat-libstdc++-33 \elfutils-libelf \elfutils-libelf-devel \gcc \gcc-c++ \glibc \glibc-common \glibc-devel \glibc-headers \ksh \libaio \libaio-devel \libgcc \libstdc++ \libstdc++-devel \libXext \libXtst \libX11 \libXau \libxcb \libXi \make \sysstat \compat-libcap1 \unixODBC \unixODBC-devel根据输出结果补全缺失的依赖包。
Oracle 12c 安装
第一步:
下载oracle12c文件安装包/;
第二步:
进入安装界面:
选择下一步
第三步:
选择创建和配置数据库,然后点下一步第四步:
第五步:
选择单实例数据库安装:第六步:
第七步:
选择英文和中文,选择下一步:第八步:
选择企业版,点击下一步
第九步:
创建新的Windows用户和口令第十步:
选择安装路径
第十一步:
选择一般用途/事务处理第十二步:
自定义全局数据库名称第十三步:
默认
第十四步:
第十五步:
选择创建具有示例方案的数据库第十六步:
第十八步:
选择启动恢复
设置对所有账户使用相同第口令第二十步:
第二十一步:
检查最低安装配置第二十二步:
选择安装:第二十三步:
等待。
第二十四步:
选择口令管理
设置SYS | SYSTEM 账户第口令:第二十五步:
第二十六步:
选择确定
第二十七步:
完成最后对安装
第二十八步:
<终于大功告成>
主要:此安装十分第漫长(60分钟~90分钟)。
Oracle 12c for Linux 7.1安装手册2015年8月7日文档属性目录1.硬件要求31.1 存要求31.2 硬盘要求32.软件要求42.1 系统环境42.2 安装依赖软件包42.2.1安装软件42.2.2安装方法42.2.3配置本地YUM52.3 系统配置52.3.1创建用户与用户组52.3.2创建安装目录62.3.3 DISABLE SELINUX62.3.4修改系统核参数62.3.5设置用户限制72.3.6配置环境变量73.安装数据库83.1 解压安装文件83.2 开始安装84.配置数据库监听195.测试数据库241.硬件要求1.1 存要求Oracle 12c对系统存要求:最小:1G推荐:跟服务器存一样大1.2 硬盘要求Oracle 12c要求至少有10G的磁盘空间用来安装数据库,请使用df –h检查磁盘空间大小推荐:/ 1T或更大。
/boot 500Mswap 存一样大/home 剩下空间95%。
留5%备用2.软件要求2.1 系统环境◆操作系统:Oracle Linux 7.1◆Oracle版本:Oracle 12c2.2 安装依赖软件包2.2.1安装软件安装依赖软件包原则是尽量多装,否则在安装数据库时会报丢失软件包:binutils-2.17.50.0.6compat-libstdc++-33-3.2.3gcc-4.1.2gcc-c++-4.1.2glibc-2.5-58glibc-devel-2.5-58kshlibaio-0.3.106libaio-devel-0.3.106libgcc-4.1.2libstdc++-4.1.2libstdc++-devel 4.1.2libXext-1.0.1libXtst-1.0.1libX11-1.0.3libXau-1.0.1libXi-1.0.1make-3.81sysstat-7.0.2compat-libcap1*compat-libstdc++libaio-devex*2.2.2安装方法可采用rpm安装或者yum安装,本文档采用yum本地安装,配置本地yum源请参考如下 yum –y install 软件包名,因为后面要有图形化界面,所以yum –y install x*,将相关的包都装上。
Oracle RAC 12C安装文档目录Oracle RAC 12C安装文档 (1)1 Rac 安装 (2)1.1 规划介绍 (2)1.1.1 集群示意图(内部和外部交换机为同一交换机) (2)1.1.2 硬件环境: (2)1.1.3 软件列表: (3)1.1.4 集群规划 (3)1.2 环境搭建配置 (5)1.2.1 多路径设置 (5)1.2.2 关闭iptables (6)1.2.3 关闭Selinux (6)1.2.4 删除DNS数据 (6)1.2.5 必须的安装包利用yum安装 (6)1.2.6 上传软件包 (7)1.2.7 配置安装环境 (7)1.3 Cluster软件安装 (13)1.3.1 解压软件包 (13)1.3.2 安装图示 (14)1.3.3 安装失败解决 (31)1.4 ASM磁盘组分为两大部分一个用于数据文件存储一个用于闪回空间 (31)1.4.1 ASMCA调起 (31)1.4.2 安装图示 (31)1.5 数据库软件安装 (33)1.5.1 解压数据库安装包,运行runInstaller (33)1.5.2 安装图示 (34)1.6 数据库安装 (40)1.6.1 运行dbca (40)1.6.2 安装图示 (40)1.7 查看集群是否正常 (48)1.8 redo 在线日志信息 (49)1.8.1 日志设置列表(实际生产环境时填写位置,以下设置都按照填写中配置)491.8.2 查看目前日志情况确认在共享存储放置位置执行节点:rac1 (49)1.8.3 删,添加在线日志。
执行节点:rac1、rac2、rac3、rac4 (49)1.8.4 查看目前日志情况确认建立成功执行节点:rac1 (51)1.9 多控制文件设置 (51)1.10 设置归档 (51)1.10.1 归档日志路径 (51)1.10.2 目录建立 ......................................................................................................... 51 1.10.3 设置方式 ......................................................................................................... 52 1.11 备份 . (52)1.11.1 备份规划表 ..................................................................................................... 52 1.11.2 磁盘备份 ......................................................................................................... 53 1.11.3 磁带库备份 ..................................................................................................... 58 1.12 监控脚本 ................................................................................................................. 59 1.13 设置DG . (63)1.13.1 DataGuard 规划 .............................................................................................. 63 1.13.2 配置 ................................................................................................................. 63 1.13.3 故障处理 (71)1 Rac 安装1.1规划介绍1.1.1 集群示意图(内部和外部交换机为同一交换机)应用程序Oracle集群管理软件操作系统应用程序Oracle集群管理软件操作系统H2H2H1H1H5H4H4H6H1 硬件服务器H4 硬件多网卡H5 硬件内部交换机H3 硬件共享存储H6 硬件外部交换机APP ServerH3H2 硬件HBA 卡H4H1H2应用程序Oracle集群管理软件操作系统Node1Node2Node3应用程序Oracle集群管理软件操作系统H2H1H4Node4集群环境上图为数据库集群示意图,四节点,一存储。
存储与节点间两台光纤交换机连接。
1.1.2硬件环境:服务器信息HP存储RAID:5磁盘:SSDvolumn分组:10组,每组200G1.1.3软件列表:1.1.4集群规划1.1.4.1数据库ID1.1.4.2节点用途划分此用途只是为了更方便使用,其实各节点功能相同,都可以实现对应用途。
1.1.4.3ASM规划1.1.4.4集群信息1.1.4.5表空间信息1.1.4.6业务用户信息1.2环境搭建配置1.2.1多路径设置Linux需要重启才可认到划分的存储。
root#yum install device-mapper-multipathmodprobe dm-multipathmodprobe dm-round-robinservice multipathd startservice multipath reloadmultipath -ll1.2.2关闭iptables1.2.3关闭Selinux1.2.4删除DNS数据1.2.5必须的安装包利用yum安装以下包:binutilscompat-db(i386)compat-db(x86-64)package compat-libstdc++control-center (x86_64)gcc (x86_64)gcc-c++-(x86_64)glibc(i686)glibc(x86_64)glic-common(x86_64)gnome-libs(x86_64)libstdc++-(i386)libstdc++(x86_64)libstdc++-devel-(x86_64)make(x86_64)pdksh(x86_64)sysstat(x86_64)xscreensaver(x86_64)setarch(x86_64)glibc-devel(x86_64)glib-devel(i386)libaio(i386)libaio(x86_64)libXp*xorg*安装:yum install binutils* compat-db* compat-db* compat-libstdc++* control-center* gcc* gcc-c++-* glibc* glibc* glibc-common* gnome-libs* libstdc++-* libstdc++* libstdc++-devel-* make* pdksh* sysstat* xscreensaver* setarch* glibc-devel* libaio* libXp* xorg* elfutils-libelf-devel* compat-libcap1* elfutils-libelf-devel* libaio-devel* libgcc* libstdc++* unixODBC* unixODBC-devel* ksh*1.2.6上传软件包将软件列表中软件上传到dbrac1的/download目录下。
利用ftp。
1.2.7配置安装环境1.2.7.1配置IP地址各节点配置1.2.7.2编辑hosts文件root#vi /etc/hosts IP后接的名称需与主机名对应添加以下内容1.2.7.3修改主机名vi /etc/sysconfig/network配置HOSTNAME=主机名1.2.7.4禁用动态配置协议vi /etc/sysconfig/networkNOZEROCONF=yes #禁用动态配置协议此项是在grid安装前检查时发出警告再配置1.2.7.5创建组、用户1.2.7.6环境变量配置1.2.7.7配置内核参数1.2.7.8安装cvuqdisk包此软件包位于解压后的grid/rpm目录下。
如不安装,集群验证程序无法发现共享磁盘。
安装过程如下(每个节点都执行):1.2.7.9创建目录赋予权限1.2.7.10提高用户的shell限制修改安全限制1.2.7.11删除NTP服务1.2.7.12安装OracleASMlib程序包Redhat 6后oracleasm包为RHEL支持,Oracle不再支持。
利用uname –a查看内核参数选择对应的包。
上为redhat6.7 x86_64所支持的。
利用rmp –ivh安装。
每个节点都要安装。
kmod-oracleasm-2.0.8-5.el6_7.x86_64.rpmoracleasmlib-2.0.4-1.el6.x86_64.rpmoracleasm-support-2.1.8-1.el6.x86_64.rpm安装时出现的问题:1、ERROR:ld.so:object‘/lib/libcwait.so’64为系统没有这个文件导致报错。
2、oracleasm包下载问题进入Oracle官方搜索3、缺少包根据提示安装4、Package openmotif21-2.1.30-11.EL5.i386.rpm is not signed更改/etc/yum.conf中的gpgcheck=0取消检查5、oracleasmlib oracleasm-support 文件版本根据平台确认oracleasm 文件版本根据系统内核版本确认1.2.7.13配置ASM两种方式,使用哪种依据现场情况定。
优先使用第一种。
1.2.7.13.1利用ASMLIB配置ASM2、创建asm磁盘1.3Cluster软件安装1.3.1解压软件包1.3.2安装图示1、选择安装类型,选择第一项install and configure Oracle Grid Infrastructure for a Cluster2、选择集群类型,第一项标准安装3、选择安装方式,自定义安装4、选择安装语言,英语5、定义集群的名字、SCAN名字及监听端口和GNS。