oracle database 11g [11.2.0.4] installation€¦ · 78. select ustom _ memory management option and...

46
Oracle Database 11g [11.2.0.4] Installation Oracle Database 11g [11.2.0.4] Installation on Red Hat Enterprise Linux 6.8 – VirtualBox

Upload: others

Post on 04-Apr-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

Oracle Database 11g [11.2.0.4] Installation Oracle Database 11g [11.2.0.4] Installation on Red Hat

Enterprise Linux 6.8 – VirtualBox

Page 2: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

Table of Contents 1. Introduction ..................................................................................................................................... 2

1.1. Required Software ................................................................................................................... 2

2. Operating System Installation ......................................................................................................... 3

2.1. Creating a New Virtual Machine ............................................................................................. 3

2.2. Installing Red Hat Enterprise Linux 6.8 .................................................................................... 7

3. Oracle Database Preparation ........................................................................................................ 22

4. Oracle Database Installation ......................................................................................................... 30

Page 3: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

1. Introduction This document is an overall guide for installing Oracle Database 11g [11.2.0.4] on Red Hat Enterprise

Linux 6 operating system installed on VirtualBox [5.1.22].

1.1. Required Software Before you start following this document, it is assumed that you have already installed the software

listed below.

Oracle VM VirtualBox VirtualBox-5.1.22-115126-Win

Putty putty.exe

Xming Xming-6-9-0-31-setup.exe

Additionally, it is assumed that you have already downloaded the operating system and database

setup files listed below.

Red Hat Linux 6.8 rhel-server-6.8-x86_64-dvd.iso

Oracle Database 11g p13390677_112040_Linux-x86-64_1of7 p13390677_112040_Linux-x86-64_2of7

Page 4: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

2. Operating System Installation

2.1. Creating a New Virtual Machine

1. Run VirtualBox software

2. Click “New”

Page 5: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

3. Enter a name for the virtual machine and select the operating system type and version as follows

and click “Next”

4. Allocate a portion of the memory for the virtual machine (minimum of 1 GB, recommended 2GB

or more) and click ”Next”

Page 6: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

5. Choose “Create a virtual hard disk now” and click “Create”

6. Choose “VDI” and click “Next”

Page 7: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

7. Choose “Dynamically allocated” in order to let virtual hard drive grow as you use and click “Next”

8. Select a location to save the virtual hard drive and also adjust the size of virtual hard drive

(minimum of 25 GB is needed for our purpose), and click “Create”

Page 8: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

9. Now that you have the virtual machine, to start its operating system installation click “Start”

2.2. Installing Red Hat Enterprise Linux 6.8

10. Select the ISO file “rhel-server-6.8-x86_64-dvd”and then click “Start”

Page 9: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

11. Click “Skip”

12. Click “Next”

Page 10: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

13. Choose the installation language and click “Next”

14. Choose the keyboard and click “Next”

Page 11: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

15. Select “Basic Storage Devices” and click “Next”

16. Click “Yes, discard any data” on the warning box and click ”Next”

Page 12: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

17. Type a name for this virtual computer and click “Next”

18. Select your nearest city and click “Next”

Page 13: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

19. Enter a root password and click “Next”

20. Select “Use All Space” and also check off the “Review and modify partition layout”, then click

“Next”

Page 14: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

21. Edit partitions with min of 150 MB /boot, min of 2GB swap, and min of 20GB /root sizes

22. Click “Format” on the warning box

Page 15: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

23. Click “Write changes to disk” on the warning box

24. Click “Next”

Page 16: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

25. Choose “Customize now” and click “Next”

26. Check off the following packages and click “Next”

Base System > Base

Base System > Compatibility libraries

Base System > Hardware monitoring utilities

Base System > Large Systems Performance

Base System > Network file system client

Base System > Performance Tools

Base System > Perl Support

Servers > Server Platform

Servers > System administration tools

Desktops > Desktop

Desktops > Desktop Platform

Desktops > Fonts

Desktops > General Purpose Desktop

Desktops > Graphical Administration Tools

Desktops > Input Methods

Desktops > X Window System

Development > Additional Development

Development > Development Tools

Applications > Internet Browser

Page 17: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

27. Click “Reboot”

Page 18: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

28. Click “Forward”

29. Choose “Yes, I agree to the “License Agreement” and click “Forward”

Page 19: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

30. Select “No, I prefer to register at a later time” and click “Forward”

31. Click “Register Later” on the warning box

Page 20: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

32. Click “Forward”

33. Create a user by typing a username, full name and a password then click “Forward”

Page 21: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

34. Uncheck “Enable kdump?” option and click “Finish”

35. Click “Yes” on the warning box

Page 22: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

36. Click “OK” on the warning box

37. After the reboot, type your user password and click “Log In”

Page 23: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

38. Now that you have the operating system RHEL 6.8 installed on a virtual machine

3. Oracle Database Preparation

39. Configure the network to be able to use the putty:

Click “Settings” on VirtualBox -> Click on “Network” tab -> select “Host-only Adapter”

-> click “OK”

Page 24: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

40. Open Network and Sharing Center of the host machine i.e. Windows -> Click “Change adapter

settings” -> Double click on “VirtualBox Host-Only network” -> Note down the IPv4 Address and

IPv4 Subnet Mask details

41. Edit network settings of the RHEL 6.8 server:

Open “Network Connections” as shown below

Page 25: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

42. Double click on “System eth0” -> Click on “IPv4 Settings” tab -> Change Method to “Manual” ->

Click “Add” -> Type values that were noted before and also consider the changes made on

“Gateway” and “Address” columns as shown below -> click “Apply” -> reboot the machine

43. Disable Firewall:

Open “Firewall” configuration as shown below and Click “Close” on the startup dialog

Page 26: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

44. Click the “Disable” button on the toolbar

45. Click the “Apply” button on the toolbar

Page 27: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

46. Click “Yes” on the warning box

47. Disable SELinux:

Edit the “/etc/selinux/config” file by changing the “SELINUX” parameter as shown below

Then, reboot the server

48. Install required Linux packages for Oracle Database:

Mount the Linux installation ISO as a CD-ROM device, as shown below. Note that if

any other device is already mounted to the CD-ROM, unmount(eject) it first Click “Settings” button on VirtualBox -> Click on “Storage” tab -> Choose “rhel-

server-6.8-x86_64-dvd.iso” from the “Optical Drive” selection -> click “OK” Finally, login as root user in order to install required packages

SELINUX=disabled

[user@testserver ~]$ reboot

[user@testserver ~]$ su -

Page 28: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

Copy & Paste the following into a terminal in order to start the installation of

packages

cd /media/RHEL-6.8\ Server.x86_64/Packages

rpm -Uvh binutils-2*x86_64*

rpm -Uvh compat-libcap1*x86_64*

rpm -Uvh compat-libcap1*i686*

rpm -Uvh compat-libstdc++-33*x86_64*

rpm -Uvh compat-libstdc++-33*i686*

rpm -Uvh elfutils-libelf-0*x86_64*

rpm -Uvh elfutils-libelf-devel-0*x86_64*

rpm -Uvh gcc-4*x86_64*

rpm -Uvh gcc-c++-4*x86_64*

rpm -Uvh glibc-2*x86_64* nss-softokn-freebl-3*x86_64*

rpm -Uvh glibc-2*i686* nss-softokn-freebl-3*i686*

rpm -Uvh glibc-common-2*x86_64*

rpm -Uvh glibc-devel-2*x86_64*

rpm -Uvh glibc-devel-2*i686*

rpm -Uvh glibc-headers-2*x86_64*

rpm -Uvh ksh-*x86_64*

rpm -Uvh libaio-0*x86_64*

rpm -Uvh libaio-0*i686*

rpm -Uvh libaio-devel-0*x86_64*

rpm -Uvh libaio-devel-0*i686*

rpm -Uvh libgcc-4*x86_64*

rpm -Uvh libgcc-4*i686*

rpm -Uvh libstdc++-4*x86_64*

rpm -Uvh libstdc++-4*i686*

rpm -Uvh libstdc++-devel-4*x86_64*

rpm -Uvh libstdc++-devel-4*i686*

rpm -Uvh make-3*x86_64*

rpm -Uvh numactl-devel-2*x86_64*

rpm -Uvh sysstat-9*x86_64*

Page 29: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

49. Create Oracle User, Groups and Directories

Copy & Paste the following into a terminal in order to create oracle user and groups

Copy & Paste the following into a terminal in order to create directories

50. Edit “/etc/hosts” file

Copy & Paste the following into a terminal

Add the following line to the file (press “i” from keyboard in order to change vi mode

to INSERT, and after adding the line press “Esc” and type “:wq” to save and quit from

the file)

51. Edit the bash profile

Copy & Paste the following into a terminal to login as oracle user and edit

.bash_profile

Add the following lines to the file (press “i” from keyboard in order to change vi

mode to INSERT, and after adding the lines press “Esc” and type “:wq” to save and

quit from the file)

groupadd oinstall

groupadd dba

groupadd oper

useradd –g oinstall –G dba,oper oracle

passwd oracle

mkdir –p /u01/app/oracle/product/11.2.0/dbhome

chown –R oracle:oinstall /u01

chmod –R 775 /u01

vi /etc/hosts

192:168:56:2 testserver.testnet.com testserver

su - oracle

vi .bash_profile

Page 30: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

52. Re-login as the oracle user in order bash profile to take effect

53. Change the kernel parameters

Copy & Paste the following into a terminal in order to login as root user and edit

“/etc/sysctl.conf”

Add the following lines to the file (press “i” from keyboard in order to change vi

mode to INSERT, and after adding the lines press “Esc” and type “:wq” to save and

quit from the file)

Then, Copy & Paste the following line into the terminal

# Oracle Settings

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

ORACLE_HOSTNAME=testserver.testnet.com; export ORACLE_HOSTNAME

ORACLE_UNQNAME=TESTDB; export ORACLE_UNQNAME

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome; export ORACLE_HOME

ORACLE_SID=TESTDB; export ORACLE_SID

PATH=/usr/sbin:$PATH; export PATH

PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

su -

vi /etc/sysctl.conf

fs.suid_dumpable = 1

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmall = 2097152

kernel.shmmax = 2076276736

kernel.shmmni = 4096

# semaphores: semmsl, semmns, semopm, semmni

kernel.sem = 250 32000 100 128

net.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=1048586

/sbin/sysctl -p

Page 31: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

54. Edit “/etc/security/limits.conf” file

Copy & Paste the following into a terminal in order to edit “/etc/security/limits.conf”

Add the following lines to the file (press “i” from keyboard in order to change vi

mode to INSERT, and after adding the lines press “Esc” and type “:wq” to save and

quit from the file)

4. Oracle Database Installation

55. Enable X11 forwarding of Putty as shown in the following

vi /etc/security/limits.conf

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 4096

oracle hard nofile 65536

oracle soft stack 10240

Page 32: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

Click “Open” and login as oracle from the startup screen of Putty

Copy & Paste the following line to export your display

Copy & Paste the following line to create temporary setup path and copy the

database installation files (“p13390677_112040_Linux-x86-64_1of7” and

“p13390677_112040_Linux-x86-64_2of7”) into this directory and unzip them.

Copy & Paste the following line to run the installer

56. Uncheck “receive security updates” option and click “Next”

export DISPLAY=192.168.56.2

mkdir –p /u01/setup

/u01/setup/database/runInstaller

Page 33: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

57. Click “Yes” on the warning box

58. Check off “Skip software updates” and click “Next”

Page 34: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

59. Select “Install database software only” option and click “Next”

60. Click “Next”

Page 35: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

61. Click “Next”

62. Click “Next”

Page 36: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

63. Click “Next”

64. Click “Next”

Page 37: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

65. Click “Next”

66. Click “Install”

Page 38: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

67. Run those scripts as root user then click “OK”

68. Now that Oracle Software installation is done

Page 39: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

69. Run Database Configuration Assistant by Copy & Paste the following command into a terminal

70. Click “Next”

dbca

Page 40: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

71. Click “Next”

72. Type the Global Database Name given in bash profile and click “Next”

Page 41: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

73. Uncheck “Configure Enterprise Manager” option and click “Next”

74. Type a password and click “Next”

Page 42: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

75. Check off the options for database file locations as shown below and click “Next”

76. Uncheck all options on this screen since they can be done after installation and click “Next”

Page 43: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

77. Click “Next”

78. Select “Custom” memory management option and enter SGA and PGA sizes as their total will be

around the 75 percentage of the total physical memory size. (since we have 2 GB of memory in

this installation, total size of SGA + PGA is set to around 1.5GB)

Page 44: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

79. Change “Process” count according to your expected concurrent session count and click “Next”

80. Select “Use Unicode” for the Character Sets option and click “Next”

Page 45: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

81. Select “Dedicated Server Mode” and click “Next”

82. Click “Next”

Page 46: Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and enter SGA and PGA sizes as their total will be around the 75 percentage of the

83. Click “Finish”

84. Lastly, click “OK” to DONE your installation!