Instalace Grid infrastructure na OEL 6.5 s použitím ASMLib Manuál a PDF vytvořil dne 17.7.2014 Tomáš Solař Oracle database Specialist Oracle ACE, OCE (10g,11g), OCP (10g,11g) Autor knihy "Oracle 11g - Hotová řešení" CZE Ebook pro Oracle DB 12c na webu. www.tomas-solar.com www.database-administrator.com www.databazovy-administrator.cz
Contents Instalace Grid infrastructure na OEL 6.5 s použitím ASMLib... 2 Instalace... 2 Konfigurace... 3 Instalace Grid infrastruktury... 5 Instalace ORACLE_HOME... 18 Vytvoření databáze... 33 Doporučení:... 38 Provozujete Vy nebo Vaši klienti databáze Oracle?... 38 Dotazy:... 38 Webináře:... 39 Workshopy:... 39 Jste DBA?... 39 Instalace Grid infrastructure na OEL 6.5 s použitím ASMLib [root@oracle4 ~]# cat /etc/issue Oracle Linux Server release 6.5 Instalace Install kmod-oracleasm package with YUM: [root@oracle4 ~]# yum install kmod-oracleasm Install oracleasm-support package with YUM: # yum install oracleasm-support The oracleasmlib package cannot be downloaded from YUM repository: OTN: http://www.oracle.com/technetwork/serverstorage/linux/asmlib/ol6-1709075.html [root@oracle4 ~]# rpm -iv oracleasmlib-2.0.4-1.el6.x86_64.rpm 2 P a g e
Připravuji balíčky pro instalaci... oracleasmlib-2.0.4-1.el6 [root@oracle4 ~]# rpm -q -i oracleasmlib-2.0.4-1.el6.x86_64.rpm balíček oracleasmlib-2.0.4-1.el6.x86_64.rpm není nainstalován [root@oracle4 ~]# rpm -q -i oracleasmlib Name : oracleasmlib Relocations: (not relocatable) Version : 2.0.4 Vendor: Oracle Corporation Release : 1.el6 Build Date: Po 26. březen 2012, 22:22:44 CEST Install Date: Čt 17. červenec 2014, 07:45:57 CEST ca-build44.us.oracle.com Group : System Environment/Kernel Source RPM: oracleasmlib-2.0.4-1.el6.src.rpm Build Host: Size : 27192 License: Oracle Corporation Signature : RSA/8, Po 26. březen 2012, 22:22:51 CEST, Key ID 72f97b74ec551f03 Packager URL : Joel Becker <joel.becker@oracle.com> : http://oss.oracle.com/ Summary : The Oracle Automatic Storage Management library userspace code. Description : The Oracle userspace library for Oracle Automatic Storage Management Konfigurace [root@oracle4 ~]# /usr/sbin/oracleasm configure -i Configuring the Oracle ASM library driver. This will configure the on-boot properties of the Oracle ASM library driver. The following questions will determine whether the driver is loaded on boot and what permissions it will have. The current values 3 P a g e
will be shown in brackets ('[]'). Hitting <ENTER> without typing an answer will keep that current value. Ctrl-C will abort. Default user to own the driver interface []: oracle Default group to own the driver interface []: dba Start Oracle ASM library driver on boot (y/n) [n]: y Scan for Oracle ASM disks on boot (y/n) [y]: y Writing Oracle ASM library driver configuration: done [root@oracle4 ~]# oracleasm createdisk ASM1 /dev/sdb1 Writing disk header: done Instantiating disk: done [root@oracle4 ~]# oracleasm createdisk ASM2 /dev/sdc1 Writing disk header: done Instantiating disk: done [root@oracle4 ~]# oracleasm createdisk ASM3 /dev/sdd1 Writing disk header: done Instantiating disk: done [root@oracle4 ~]# oracleasm createdisk ASM4 /dev/sde1 Writing disk header: done Instantiating disk: done [root@oracle4 ~]# oracleasm createdisk ASM5 /dev/sdf1 Writing disk header: done Instantiating disk: done [root@oracle4 ~]# oracleasm listdisks ASM1 ASM2 ASM3 ASM4 ASM5 [root@oracle4 ~]# 4 P a g e
Instalace Grid infrastruktury 5 P a g e
6 P a g e
7 P a g e
8 P a g e
9 P a g e
10 P a g e
11 P a g e
12 P a g e
13 P a g e
14 P a g e
15 P a g e
16 P a g e
[root@oracle4 ~]# /u01/app/orainventory/orainstroot.sh Changing 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. [root@oracle4 ~]# /u01/app/oracle/product/12.1.0/grid/root.sh Performing root user operation for Oracle 12c The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/12.1.0/grid 17 P a g e
Enter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin... Copying oraenv to /usr/local/bin... Copying coraenv to /usr/local/bin... Creating /etc/oratab file... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root script. Now product-specific root actions will be performed. Using configuration parameter file: /u01/app/oracle/product/12.1.0/grid/crs/install/crsconfig_params LOCAL ADD MODE Creating OCR keys for user 'oracle', privgrp 'oinstall'.. Operation successful. LOCAL ONLY MODE Successfully accumulated necessary OCR keys. Creating OCR keys for user 'root', privgrp 'root'.. Operation successful. CRS-4664: Node oracle4 successfully pinned. 2014/07/17 09:09:56 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.conf' oracle4 2014/07/17 09:10:15 /u01/app/oracle/product/12.1.0/grid/cdata/oracle4/backup_20140717 _091015.olr 2014/07/17 09:10:15 CLSRSC-327: Successfully configured Oracle Grid Infrastructure for a Standalone Server Instalace ORACLE_HOME [oracle@oracle4 database]$ pwd /u01/database 18 P a g e
[oracle@oracle4 database]$ ls install response rpm runinstaller sshsetup stage welcome.html [oracle@oracle4 database]$./runinstaller Starting Oracle Universal Installer... Checking Temp space: must be greater than 500 MB. Actual 8519 MB Passed Checking swap space: must be greater than 150 MB. Actual 3071 MB Passed Checking monitor: must be configured to display at least 256 colors >>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<< Some requirement checks failed. You must fulfill these requirements before continuing with the installation, Continue? (y/n) [n] y >>> Ignoring required pre-requisite failures. Continuing... Preparing to launch Oracle Universal Installer from /tmp/orainstall2014-07-17_09-18-06am. Please wait... 19 P a g e
20 P a g e
21 P a g e
22 P a g e
23 P a g e
24 P a g e
25 P a g e
26 P a g e
27 P a g e
28 P a g e
29 P a g e
30 P a g e
[root@oracle4 ~]# /u01/app/oracle/product/12.1.0/dbhome_1/root.sh Performing root user operation for Oracle 12c 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]: The contents of "dbhome" have not changed. No need to overwrite. The contents of "oraenv" have not changed. No need to overwrite. The contents of "coraenv" have not changed. No need to overwrite. 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. 31 P a g e
Now product-specific root actions will be performed. 32 P a g e
Vytvoření databáze 33 P a g e
34 P a g e
35 P a g e
36 P a g e
37 P a g e
Doporučení: Provozujete Vy nebo Vaši klienti databáze Oracle? Mou primární oblastí je správa databází, konzultace a školení. Velmi rád s Vami bud spolupracovat. Kontaktujte me a můžeme si možnostech spolupráce pohovořit. Dotazy: Máte dotazy k daným příkládům nebo máte námět na jiné příklady? Zajimá vás jiná oblast? Napiště mi na tom@tomas-solar.com 38 P a g e
Webináře: Na webu www.tomas-solar.com máte k dispozi seznam webinářů, které proběhly nebo se chystají. Věřím, že témata pro Vás budou zajimavá a kdyby přece jen nebyla, napište mě, co Vás zajímá? Workshopy: Chtěli byste se účastit některého z jednodenních workshopů nebo máte námět na speciální školení? Napiště mi na tom@tomas-solar.com Jste DBA? Zaregistrujte se na komunitním webu http://database-administrator.com/ Hledáte další informace? Pak navštivte můj web http://www.tomas-solar.com/ Těším se na Vaše dotazy a brzy pošlu další pokračování. Pěkný den Tomáš Solař 39 P a g e