Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and...

Post on 04-Apr-2020

4 views 0 download

Transcript of Oracle Database 11g [11.2.0.4] Installation€¦ · 78. Select ustom _ memory management option and...

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

Enterprise Linux 6.8 – VirtualBox

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

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

2. Operating System Installation

2.1. Creating a New Virtual Machine

1. Run VirtualBox software

2. Click “New”

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”

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

6. Choose “VDI” and click “Next”

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”

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”

11. Click “Skip”

12. Click “Next”

13. Choose the installation language and click “Next”

14. Choose the keyboard and click “Next”

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

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

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

18. Select your nearest city and click “Next”

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”

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

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

24. Click “Next”

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

27. Click “Reboot”

28. Click “Forward”

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

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

31. Click “Register Later” on the warning box

32. Click “Forward”

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

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

35. Click “Yes” on the warning box

36. Click “OK” on the warning box

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

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”

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

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

44. Click the “Disable” button on the toolbar

45. Click the “Apply” button on the toolbar

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 -

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*

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

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

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

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

57. Click “Yes” on the warning box

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

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

60. Click “Next”

61. Click “Next”

62. Click “Next”

63. Click “Next”

64. Click “Next”

65. Click “Next”

66. Click “Install”

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

68. Now that Oracle Software installation is done

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

70. Click “Next”

dbca

71. Click “Next”

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

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

74. Type a password and click “Next”

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”

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)

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”

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

82. Click “Next”

83. Click “Finish”

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