Installing And Creating An Oracle Database 19c On Linux 7 .

3y ago
166 Views
14 Downloads
1.49 MB
27 Pages
Last View : 11d ago
Last Download : 3m ago
Upload by : Sasha Niles
Transcription

Installing and Creating an Oracle Database 19c with ASMP a g e 1Tutorial:Installing and Creating an Oracle Database 19c on Linux 7 with ASMBy Ahmed BarakaTutorial OverviewIn this tutorial, we will demonstrated the procedure to create an Oracle database 19c on Linux 7 withASM.In high level, you will perform the following: Change the Settings of the Appliance srv1 Create Virtual Hardisks (to be used by ASM) Make the machine IP address static Configure Putty to connect to srv1 Set up the environment variables for the OS Accounts: grid and oracle Install ASM Packages and Create ASM disk volumes Change the kernel parameter values to the recommended values Install more packages Install Oracle Grid Infrastructure Software (Oracle Restart) Create ASM Disk Groups Install Oracle database software and create the sample databaseA tutorial edited by Ahmed Baraka

Installing and Creating an Oracle Database 19c with ASMP a g e 2Required Resources A PC with a free 8GB in its memory. This means the RAM memory in your PC should be at least12GB. At least 50GB free disk space. The PC is connected to the InternetInstallation ArchitectureThe tutorial builds a system the same as the following architecture diagram:A tutorial edited by Ahmed Baraka

Installing and Creating an Oracle Database 19c with ASMP a g e 3Required Software and PackagesTo implement this tutorial, you must have the following: Oracle VirtualBox, version 6. This tutorial was implemented on VirtualBox 6.0.22 for Windows. Itcan be obtained from the following link. Oracle Virtualbox appliance with a fresh installation of Oracle Linux 7.x. You can download apre-built one with Oracle Linux 7.8 from here.Alternatively, you can create one from scratch. The procedure to create an VM machine with Linux7.x is explained in many articles in the Internet. Just Google it! Oracle Grid Infrastructure 19c installation files for Linux x86-64. This can be downloaded fromOracle site. Search the Internet for “oracle grid infrastructure 19c download”. At the time of thiswriting, its link is here. This tutorial was implemented using Oracle Grid Infrastructure 19c (version19.3).Note: download the zip file, not the rpm file. Oracle Database 19c installation files for Linux x86-64. This can be downloaded from Oracle site.Search the Internet for “Oracle Database 19c installation files for Linux x86-64”. At the time of thiswriting, its link is here. This tutorial was implemented using Oracle Database 19c ( version 19.3)for Linux x86-64.Note: download the zip file, not the rpm file. Putty: which is a utility that provides a command line prompt to connect to a Linux server fromWindows.A tutorial edited by Ahmed Baraka

Installing and Creating an Oracle Database 19c with ASMP a g e 4Tutorial StepsA. Changing the Settings of the Appliance srv1In the following steps, you will prepare the appliance srv1 for the tutorial. The tutorial steps assumethat you have the appliance opened in the VirtualBox window.1. In VirtualBox Manager, open the "Settings" of srv1, click on "Shared Folders" link in the righthand pane. Add shared folder by pressing "plus" icon. Then select path to the location of theoracle software installation folder, and mark the checkbox "Auto-mount". You can change the"Folder Name", if you want to.This folder will be used to easily exchange files between the hosting PC and Linux in the VMmachine. In the rest of this tutorial document, this folder will be referred to as the stagingfolder.A tutorial edited by Ahmed Baraka

Installing and Creating an Oracle Database 19c with ASMP a g e 52. Make sure the Network adapter type Bridged Adapter and its name is the same as the networkcard of your PC. This makes your VM appliance appears in your network as a separate host andwill be assigned an IP address based on your network configuration.A tutorial edited by Ahmed Baraka

Installing and Creating an Oracle Database 19c with ASMP a g e 6B. Creating Virtual Hardisks for ASMIn OracleVirtualBox manager window, perform the following steps on srv1 to create two ASM disks:OCRDISK1 (12 GB) and DATADISK1 (40GB)3. In the Oracle VirtualBox manager window, perform the following steps:a.Open the settings of srv1b.Click on Storage then Ad “hard disk“ buttonc.Select VDI optionA tutorial edited by Ahmed Baraka

Installing and Creating an Oracle Database 19c with ASMd. Select Dynamically allocatede.Set the OCR disk file name and its size.A tutorial edited by Ahmed BarakaP a g e 7

Installing and Creating an Oracle Database 19c with ASMf.P a g e 8Perform the same steps again to create the DATA disk, of size 40 GB. You should end up withhaving two disks as follows:g. Optionally, set a description for the appliance and change its name to “Oracle 19c DB ASM”A tutorial edited by Ahmed Baraka

Installing and Creating an Oracle Database 19c with ASMP a g e 9C. Making the IP Address StaticIn the following steps, you will make the IP address assigned to srv1 static. We need to make thisstep because we want to make sure that the machine will always have the same IP address when it isrebooted.4. Start srv15. Login to the VirtualBox window of srv1 as root6. Open a terminal window, issue ifconfig command, and obtain the current IP address assigned tothe machine. It is the IP address assigned to the NIC enp0s3A tutorial edited by Ahmed Baraka

Installing and Creating an Oracle Database 19c with ASM7. Open Settings window: Applications - System Tools - Settings8. Open Network settingsA tutorial edited by Ahmed BarakaP a g e 10

Installing and Creating an Oracle Database 19c with ASMP a g e 119. Click on IPv4 tab, select the Manual option, then enter the IP address and DNS information.Then click on Apply button.10. In the Terminal window, ping the IP address to make sure that the changes are successful.11. Edit the /etc/hosts file and add the hostname and the IP address to it.vi /etc/hosts192.168.1.127 srv1.localdomain srv112. Verify that the changes are registered in the NIC configuration file.cat /etc/sysconfig/network-scripts/ifcfg-enp0s313. Ping srv1 to make sure the changes were successful.ping srv114. In the hosting PC, open a command line window and make sure you can ping the IP address ofsrv1.Note: Make sure the firewall in your PC allows communication with Oracle VirtualBox.C:\ ping 192.168.1.127A tutorial edited by Ahmed Baraka

Installing and Creating an Oracle Database 19c with ASMD. Configuring PuttyIn the following steps, you will configure Putty to connect to srv115. Open Putty then enter the IP address of srv1 in the Host Name field.16. Click on Connection then set the “Seconds between keepalives” to 9.A tutorial edited by Ahmed BarakaP a g e 12

Installing and Creating an Oracle Database 19c with ASM17. Save the configuration as srv1 then open the session.18. Login as root in the Putty session.A tutorial edited by Ahmed BarakaP a g e 13

Installing and Creating an Oracle Database 19c with ASMP a g e 14E. Setting up Environment Variables for OS Accounts: grid and oracleIn the following steps, you will configure the OS variables for the software owner accounts. oracle isthe software owner of the database software and grid is the software owner of the Grid Clusterwaresoftware.19. In the Putty session, switch current user to oracle and make a backup copy of the current bashprofile file:su - oraclemv /.bash profile /.bash profile bkp20. Open the .bash profile file with the vi editorvi /.bash profile21. Add the following to it.# .bash profile# OS User: oracle# Application: Oracle Database Software Owner# Version: Oracle 19c# # Get the aliases and functionsif [ -f /.bashrc ]; then. /.bashrcfiORACLE BASE /u01/app/oracle; export ORACLE BASEORACLE SID oradb; export ORACLE SIDORACLE HOME ORACLE BASE/product/19.0.0/db 1; export ORACLE HOMENLS DATE FORMAT "DD-MON-YYYY HH24:MI:SS"; export NLS DATE FORMATTNS ADMIN ORACLE HOME/network/admin; export TNS ADMINPATH PATH: HOME/.local/bin: HOME/binPATH {PATH}:/usr/bin:/bin:/usr/local/binPATH .: {PATH}: ORACLE HOME/binexport PATHLD LIBRARY PATH ORACLE HOME/libLD LIBRARY PATH {LD LIBRARY PATH}: ORACLE HOME/oracm/libLD LIBRARY PATH {LD LIBRARY PATH}:/lib:/usr/lib:/usr/local/libexport LD LIBRARY PATHCLASSPATH ORACLE HOME/JRECLASSPATH {CLASSPATH}: ORACLE HOME/jlibCLASSPATH {CLASSPATH}: ORACLE HOME/rdbms/jlibCLASSPATH {CLASSPATH}: ORACLE HOME/network/jlibexport CLASSPATHexport TEMP /tmpexport TMPDIR /tmpumask 022A tutorial edited by Ahmed Baraka

Installing and Creating an Oracle Database 19c with ASMP a g e 1522. Switch current user back to root then run the following code to create required groups, griduser and modify the accounts.su groupadd asmadmingroupadd oinstallgroupadd asmdbausermod -g oinstall oracleusermod -a -G asmdba oracleuseradd -u 54323 -g oinstall -G asmadmin,asmdba gridpasswd grid23. Add oracle and grid accounts to vboxsf group.The vboxsf group was created by VirtualBox Guest Additions and it allows its members to accessthe shared folder (staging folder) in the hosting machine.usermod -a -G vboxsf oracleusermod -a -G vboxsf grid24. Create Oracle Clusterware home -R-R/u01/app/oracle/product/19.0.0/db 1/u01/app/grid/u01/app/19.0.0/gridgrid:oinstall /u01oracle:oinstall /u01/app/oracle775 /u0125. Switch to grid user and modify its bash profile as follows:su - gridmv /.bash profile /.bash profile bkpvi /.bash profile# .bash profile# Get the aliases and functionsif [ -f /.bashrc ]; then. /.bashrcfiORACLE SID ASM; export ORACLE SIDORACLE BASE /u01/app/grid; export ORACLE BASEORACLE HOME /u01/app/19.0.0/grid; export ORACLE HOMEORACLE TERM xterm; export ORACLE TERMTNS ADMIN ORACLE HOME/network/admin; export TNS ADMINPATH .: {JAVA HOME}/bin: {PATH}: HOME/bin: ORACLE HOME/binPATH {PATH}:/usr/bin:/bin:/usr/local/binexport PATHexport TEMP /tmpexport TMPDIR /tmpumask 022A tutorial edited by Ahmed Baraka

Installing and Creating an Oracle Database 19c with ASMP a g e 16F. Installing ASM Packages and Creating ASM Disk VolumesIn the following steps, you will install ASM packages then create ASM disk volumes.26. Change the current user to root usersu -27. Install Oracle ASMLib packageyum install oracleasm-support# the following command will take a few minutes to finish:yum install kmod-oracleasm28. Configure and load the ASM kernel module. Respond to the command as illustrated by the codein red color.oracleasm configure -iConfiguring the Oracle ASM library driver.This will configure the on-boot properties of the Oracle ASM librarydriver. The following questions will determine whether the driver isloaded on boot and what permissions it will have. The current valueswill be shown in brackets ('[]'). Hitting ENTER without typing ananswer will keep that current value. Ctrl-C will abort.Default user to own the driver interface []: gridDefault group to own the driver interface []: oinstallStart Oracle ASM library driver on boot (y/n) [n]: yScan for Oracle ASM disks on boot (y/n) [y]: yWriting Oracle ASM library driver configuration: done29. Load the oracleasm kernel module:/usr/sbin/oracleasm init30. List the disks as seen by the OS. You should see the disks created in the VirtualBox and attachedto the appliance.fdisk -l grep "Disk /dev/sd"31. Use fdisk to create partitions in the disk.Do the following for the disks sdb and sdcfdisk device file then press: n, p, 1, ENTER, ENTER, w – to apply changesFollowing is the output done on sdb:[root@srv1 ]# fdisk /dev/sdbDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelBuilding a new DOS disklabel with disk identifier 0xd2973f79.Changes will remain in memory only, until you decide to write them.A tutorial edited by Ahmed Baraka

Installing and Creating an Oracle Database 19c with ASMAfter that, of course, the previous content won't be recoverable.Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)WARNING: DOS-compatible mode is deprecated. It's strongly recommended toswitch off the mode (command 'c') and change display units tosectors (command 'u').Command (m for help): nCommand actioneextendedpprimary partition (1-4)pPartition number (1-4): 1First cylinder (1-261, default 1):Using default value 1Last cylinder, cylinders or size{K,M,G} (1-261, default 261):Using default value 261Command (m for help): wThe partition table has been altered!Calling ioctl() to re-read partition table.Syncing disks.32. Verify that the partitions are created.fdisk -l grep "/dev/s"33. Create the ASM disksoracleasm createdisk OCRDISK1 /dev/sdb1oracleasm createdisk DATADISK1 /dev/sdc1oracleasm listdisksA tutorial edited by Ahmed BarakaP a g e 17

Installing and Creating an Oracle Database 19c with ASMP a g e 18G. Changing Kernel Parameter ValuesIn the following step, you will change the kernel parameter values to the values recommended byOracle.34. Create the following file then add the code that follows to it.vi -max-nr 1048576fs.file-max 6815744kernel.shmall 2097152kernel.shmmax 4294967295kernel.shmmni 4096kernel.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 104857635. Change the current values of the kernel parameters:/sbin/sysctl --system36. Reboot srv1A tutorial edited by Ahmed Baraka

Installing and Creating an Oracle Database 19c with ASMH. Install More PackagesIn the following step, you will install further packages in srv1 that are required by Oracle GridInfrastructure and database software.37. Open Putty and login to srv1 as root38. Run the following code to install further packages required by Oracle software.yum install kshyum install libaio-devel.x86 64A tutorial edited by Ahmed BarakaP a g e 19

Installing and Creating an Oracle Database 19c with ASMP a g e 20I. Installing Oracle Grid Infrastructure Software (Oracle Restart)In the following steps, you will install Oracle Grid Infrastructure software in srv1. The installationprocedure automatically creates and start the Clusterware services.39. Copy the Oracle Grid Infrastructure software installation file to the staging folder.At the time of this writing, the installation file name downloaded from Oracle site isLINUX.X64 193000 grid home.zip40. Extract the installation file into the Oracle Grid Infrastructure software home directorysu - gridunzip /media/sf staging/LINUX.X64 193000 grid home.zip -d ORACLE HOME41. Instal the cvuqdisk in srv1 as rootThe package cvuqdisk must be installed before installing the Clusterware software# exit to return back to the root shell:exitcd /u01/app/19.0.0/grid/cv/rpm/CVUQDISK GRP oinstall; export CVUQDISK GRPrpm -iv cvuqdisk-1.0.10-1.rpm42. Login to the VirtualBox window of srv1 as grid.43. Open a terminal window, change the current directory to the Grid Infrastructure software homedirectory and run the gridSetup.sh script.cd ORACLE HOME./gridSetup.sh44. Respond to the Installer windows as follows:WindowConfiguration OptionActionSelect the following option:“Configure Oracle Grid Infrastructure for a StandaloneServer (Oracle Restart)”Create ASM Disk Group1. Click on Change Discovery Path button2. Enter the Discovery Path as follows:/dev/oracleasm/disks/*3. Fill in the fields as follows:Disk Group Name: OCRDISKA tutorial edited by Ahmed Baraka

Installing and Creating an Oracle Database 19c with ASMP a g e 21Redundancy: ExternalSelect Disks: OCRDISK1ASM PasswordEnter the passwordManagement OptionMake sure the Checkbox is unselectedOperating SystemGroupsMake sure the following are the selected values:OSASM: asmadminOSDBA: asmdbaInstallation LocationOracle Base and Oracle Grid Home should automatically point tothe values of their corresponding variables.Note: Observe the grid home is not under the Oracle grid basehome.Create InventoryIt should automatically point to /u01/app/oraInventoryRoot Script ExecutionMark the checkbox “Automatically run configuration scripts”and enter the root passwordPrerequisite ChecksAll the Prerequisite Checks should pass except the memory. Itcomplains the available memory is 7.5. We can ignore thiswarning.Select Ignore All checkbox then click on Next button.Click Yes on the confirmation dialog box.Note: If you see other warnings, you have to resolve thembefore you proceed.Install Product45. Check CRS services status:su - gridcrsctl status resource -tA tutorial edited by Ahmed BarakaWhen the installation reaches to nearly 11%, it will display aconfirmation message. Click on Yes button.

Installing and Creating an Oracle Database 19c with ASMP a g e 22J. Creating ASM Disk GroupsIn the following steps, you will create the Diskgroup that will be used by Oracle database to store itsdatafiles.Note: In real life scenario, we might create more than one disk group. For example, one for the datafiles and one for the FRA.46. In the VirtualBox window, initiate ASM Configuration Assistantasmca47. Create the disk group DATADISK by responding to the Assistant as follows:A tutorial edited by Ahmed Baraka

Installing and Creating an Oracle Database 19c with ASMA tutorial edited by Ahmed BarakaP a g e 23

Installing and Creating an Oracle Database 19c with ASMP a g e 24K. Installing Oracle Database Software and Creating the DatabaseIn the following steps, you will install Oracle database software in srv1 and create the database.48. Copy the Oracle database software installation file to the staging folder.At the time of this writing, the installation file name downloaded from Oracle site isLINUX.X64 193000 db home.zip49. In the Putty session, change the current user to oracle then extract the installation file into theOracle database software home directorysu - oracleunzip /media/sf staging/LINUX.X64 193000 db home.zip -d ORACLE HOME50. Logout from the VirtualBox window and login to it again as oracle51. Open a terminal window, change the current directory to the Oracle database home directory andrun the runInstaller script.cd ORACLE HOME./runInstaller52. Respond to the Installer windows as follows:WindowActionConfiguration OptionSelect the following option:“Create and Configure a single instance database.”System ClassSelect the following option:“Server Class”Database EditionSelect the following option:“Enterprise Edition”Installation LocationKeep the default valueConfiguration TypeSelect the following option:General PurposeDatabase IdentifiersGlobal Database Name: oradb.localdomainOracle SID: oradbPluggable Database Name: pdb1A tutorial edited by Ahmed Baraka

Installing and Creating an Oracle Database 19c with ASMConfiguration OptionsP a g e 25Do not mark the AMM checkboxMemory: 5120 MBCharacter set: Use Unicode (AL32UTF8)Sample Schemas: (optional) Mark the checkbox "Installsample schema in the database"Database StorageMake sure ASM is selectedManagement OptionsMake sure the checkbox is not marked.Recovery OptionMark the checkbox Enable RecoveryMake sure ASM is selectedASM DiskgroupSelect DATADISKSchema PasswordSet passwords for the accountsOperating SystemGroupsSelect the “oinstall” group for all the options, except theOSOPER keep it blank.Root Script ExecutionMark the checkbox “Automatically run configuration scripts”and enter the root passwordPrerequisite ChecksAll the Prerequisite Checks should pass.SummaryClick on Install buttonInstall ProductWhen the installation reaches to nearly 12%, if will display aconfirmation message. Click on Yes button.Finishclick on Close button53. After the installation and database creation are finished, verify the database is up and running bylogging to it as sysdbasqlplus / as sysdba54. Check the status of the database (can be run as oracle or as grid)srvctl status database -d oradb55. Check if a connection entry to oradb is add

Oracle Grid Infrastructure 19c installation files for Linux x86-64. This can be downloaded from Oracle site. Search the Internet for “oracle grid infrastructure 19c download”. At the time of this writing, its link is here. This tutorial was implemented using Oracle Grid Infrastructure 19c (version 19.3).

Related Documents:

Oracle e-Commerce Gateway, Oracle Business Intelligence System, Oracle Financial Analyzer, Oracle Reports, Oracle Strategic Enterprise Management, Oracle Financials, Oracle Internet Procurement, Oracle Supply Chain, Oracle Call Center, Oracle e-Commerce, Oracle Integration Products & Technologies, Oracle Marketing, Oracle Service,

Oracle is a registered trademark and Designer/2000, Developer/2000, Oracle7, Oracle8, Oracle Application Object Library, Oracle Applications, Oracle Alert, Oracle Financials, Oracle Workflow, SQL*Forms, SQL*Plus, SQL*Report, Oracle Data Browser, Oracle Forms, Oracle General Ledger, Oracle Human Resources, Oracle Manufacturing, Oracle Reports,

7 Messaging Server Oracle Oracle Communications suite Oracle 8 Mail Server Oracle Oracle Communications suite Oracle 9 IDAM Oracle Oracle Access Management Suite Plus / Oracle Identity Manager Connectors Pack / Oracle Identity Governance Suite Oracle 10 Business Intelligence

Advanced Replication Option, Database Server, Enabling the Information Age, Oracle Call Interface, Oracle EDI Gateway, Oracle Enterprise Manager, Oracle Expert, Oracle Expert Option, Oracle Forms, Oracle Parallel Server [or, Oracle7 Parallel Server], Oracle Procedural Gateway, Oracle Replication Services, Oracle Reports, Oracle

2 Installing Oracle Database and Creating a Database 2.1 Overview of Installing Oracle Database Software and Creating a Database 2-1 2.1.1 Checking Oracle Database Installation Prerequisites 2-2 2.1.2 Deciding on Oracle Database Installation Choices 2-3 2.1.2.1 Install Option for Oracle Database 2-3 2.1.2.2 Installation Class for Oracle .

Installing and Configuring Oracle GoldenGate for Oracle Database 12c (12.2.0.1) E66365-07 July 2018. Oracle Fusion Middleware Installing and Configuring Oracle GoldenGate for Oracle Database, 12c (12.2.0.1) . This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are .

2.4 Installing Oracle RAC and Oracle RAC One Node Databases 2-3 2.4.1 Installing Oracle RAC and Oracle RAC One Node Database Software 2-4 2.5 Simplified Upgrade of TIMESTAMP WITH TIME ZONE Data 2-5 2.6 Overview of Installation Directories for Oracle RAC 2-6 2.6.1 Overview of Oracle Base Directories 2-6 2.6.2 Overview of Oracle Home Directories 2-7

Specific tasks you can accomplish using Oracle Sales Compensation Oracle Oracle Sales Compensation setup Oracle Oracle Sales Compensation functions and features Oracle Oracle Sales Compensation windows Oracle Oracle Sales Compensation reports and processes This preface explains how this user's guide is organized and introduces