dinsdag 28 februari 2012

Setup of the environment


In this post, I will set up the same environment as the exam environment on VMWare Workstation:
Oracle Linux Release 5.2 (64-bit)
Oracle Database 11g version 11.2.0 (64-bit)
Oracle Enterprise Management Grid Control 10g version 10.2.0.5 (64-bit)

First, create a new vm machine:

Open VMware WorkStation, and click on “Create a New Virtual Machine”:











Click on Customize Hardware:


Change memory to 1,5 GB, and networking to Host-Only:


Afterwards, I started the new VM, but I received the following error:


Apparently, VT was disabled in my bios.
I had to restart and change my Virtual Technology setting to Enabled in the BIOS. Afterwards I was able to start the VM.

Install Enterprise Linux 5.2

Start the VM, and press Enter in the following screen:


Press Skip in the following screen:


Press Next:


Press Next:

Select the keyboard, and click Next.


Click Yes:

Click Next:



Click Edit and enter an IP Address and a host name:







Right click on the VM, and choose Removable Devices -> CD/DVD (IDE) -> Settings.
In the popup, change the cd to the second iso.

Then click on Connect (Removable Devices -> CD/DVD (IDE) ->Connect).
Afterwards, click on OK to proceed with the second CD.



Repeat the same step to select and proceed with the third and fourth disk.
At the end of the installation, make sure to change the CD settings (no ISO selected), and click on Reboot afterwards.

Right click on the VM, and choose Removable Devices -> CD/DVD (IDE) -> Settings.
Untick “Connect at power on” and “Connected”.


 
Click on Reboot.

 
After the reboot, the installer will ask you to provide some more details:





 
Create a new user called “oracle”:



Press Finish. Afterwards the OS will reboot:



Install VMWare Tools.

Choose VM > Install VMware Tools. A new folder is displayed containing a tar file.
Untar this file by right clicking it an choosing “Extract to “.
I extracted the tar to the Desktop.

Open a terminal window, and su root.
cd /home/oracle/Desktop/vmware-tools-distrib
./vmware-install.pl

Follow all the defaults and choose an appropriate resolution at the end.

Check Preinstallation requirements:


Check the following requirements:

Install required extra packages.

See the Preinstallation Requirements for Oracle Database on Tahiti.oracle.com:
Linux x86-64 - Oracle Database Package Requirements

The following packages (or later versions) must be installed:
rpm -q binutils-2.17.50.0.6
rpm -q compat-libstdc++-33-3.2.3
rpm -q elfutils-libelf-0.125
rpm -q elfutils-libelf-devel-0.125 -- NOT INSTALLED YET (CD2)
rpm -q gcc-4.1.2                   -- NOT INSTALLED YET (CD 2)
rpm -q gcc-c++-4.1.2               -- NOT INSTALLED YET (CD2)
rpm -q glibc-2.5-24
rpm -q glibc-2.5-24 (32 bit)
rpm -q glibc-common-2.5
rpm -q glibc-devel-2.5             -- NOT INSTALLED YET (CD2)
rpm -q glibc-headers-2.5           -- NOT INSTALLED YET (CD2)
rpm -q ksh-20060214
rpm -q libaio-0.3.106
rpm -q libaio-devel-0.3.106        -- NOT INSTALLED YET (CD 1)
rpm -q libgcc-4.1.2
rpm -q libstdc++-4.1.2
rpm -q libstdc++-devel 4.1.2       -- NOT INSTALLED YET (CD 2)
rpm -q make-3.81
rpm -q sysstat-7.0.2               -- NOT INSTALLED YET

To determine if the required packages are installed, enter commands similar to the following:
# rpm -q package_name

Install the required packages using the rpm command:
rpm -ivh <package_name>.rpm

You’ll have to search on the Oracle Enterprise Linux 5.2 disks which one contains the missing package, and install it.
On each disk, go to the directory which contains the packages
Open the disk: VM -> Removable Devices->Settings->CD/DVD:

[root@ORAVM1 Server]# df –h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
23G 2.6G 19G 12% /
/dev/sda1 99M 12M 82M 13% /boot
tmpfs 760M 0 760M 0% /dev/shm
/dev/hdc 600M 600M 0 100% /media/Enterprise Linux cd 3 20080528

[root@ORAVM1 Server]# cd /media/Enterp*
 
[root@ORAVM1 Enterprise Linux cd 3 20080528]# ls
Cluster ClusterStorage EULA GPL RPM-GPG-KEY Server TRANS.TBL VT

[root@ORAVM1 Enterprise Linux cd 3 20080528]# cd Server

Check for all packages if they are on this disk. And if they are, install them.

Example:
[root@ORAVM1 Server]# ls libaio*
libaio-devel-0.3.106-3.2.i386.rpm libaio-devel-0.3.106-3.2.x86_64.rpm

[root@ORAVM1 Server]# rpm -q libaio-devel
package libaio-devel is not installed

[root@ORAVM1 Server]# rpm -ivh libaio-devel-0.3.106-3.2.i386.rpm
warning: libaio-devel-0.3.106-3.2.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:libaio-devel ########################################### [100%]

[root@ORAVM1 Server]# rpm -ivh libaio-devel-0.3.106-3.2.x86_64.rpm
warning: libaio-devel-0.3.106-3.2.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:libaio-devel ########################################### [100%]

Remark:
Pre-requisite packages elfutils-libelf-devel-0.125-3.el5.x86.rpm and elfutils-libelf-devel-static-0.125-3.el5.i386.rpm are dependent on each other and hence have to be installed together:

[root@ORAVM1 Server]# rpm -ivh elfutils-libelf-devel-0.125-3.el5.x86.rpm
warning: elfutils-libelf-devel-0.125-3.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159-
error: Failed dependencies:
elfutils-libelf-devel-static = 0.125-3.el5 is needed by elfutils-libelf-devel-0.125-3.el5.x86

[root@ORAVM1 Server]# rpm -ivh elfutils-libelf-devel-static-0.125-3.el5.x86_64.rpm
warning: elfutils-libelf-devel-static-0.125-3.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
error: Failed dependencies:
elfutils-libelf-devel = 0.125-3.el5 is needed by elfutils-libelf-devel-static-0.125-3.el5.x86_64

The following also had dependencies, and had to be installed together as well:
rpm -ivh gcc-c++-4.1.2-42.el5.x86_64.rpm gcc-4.1.2-42.el5.x86_64.rpm glibc-headers-2.5-24.x86_64.rpm glibc-devel-2.5-24.i386.rpm

I also had to install the following packages:
libgomp = 4.1.2-42.el5 is needed by gcc-4.1.2-42.el5.x86_64 (disk 2)
libgomp.so.1()(64bit) is needed by gcc-4.1.2-42.el5.x86_64 (disk 2)
kernel-headers >= 2.2.1 is needed by glibc-headers-2.5-24.x86_64 (disk 1)
Now I found out that there is a much simpler way to install the required packages:
Use the up2date command to install the packages. It will resolve the dependencies for you automatically.

up2date oracle-validated

will find all packages needed for an Oracle install, and adjust system settings also.

Or download and install the following rpm: http://oss.oracle.com/el5/oracle-validated/

This will save a lot of time hunting through the cd’s for the required packages and resolving dependencies…


Modify kernel limits:

Since version 11g, you can use the generated fixup scripts: "Installation Fixup Scripts".

(I’ll discuss this in the next post, where I’ll create a database).

For completeness, I’ll also discuss how to manually check and change these settings.
Configuring Kernel Parameters for Linux

semmsl
>=250, semmns>=32000 semopm>=100 semmni>=128

[root@ORAVM1 Server]# /sbin/sysctl -a | grep sem
kernel.sem = 250 32000 32 128
  • semopm is only 32, and should be 100
[root@ORAVM1 Server]# /sbin/sysctl -a | grep shm
vm.hugetlb_shm_group = 0
kernel.shmmni = 4096
kernel.shmall = 4294967296
(>=2097152)
kernel.shmmax = 68719476736 (too high: 68 GB, should be more than half of the physical memory => in my case the physical memory is 1,5 GB, so I’ll set it to 800 MB)

[root@ORAVM1 Server]# /sbin/sysctl -a | grep file-max
fs.file-max = 153379
(should be >= 6815744)

[root@ORAVM1 Server]# /sbin/sysctl -a | grep ip_local_port_range
net.ipv4.ip_local_port_range = 32768 61000
(should be 9000 65500)

[root@ORAVM1 Server]# /sbin/sysctl -a | grep rmem_default
net.core.rmem_default = 126976
(should be >=262144)

[root@ORAVM1 Server]# /sbin/sysctl -a | grep rmem_max
net.core.rmem_max = 131071
(should be >=4194304)

[root@ORAVM1 Server]# /sbin/sysctl -a | grep wmem_default
net.core.wmem_default = 126976
(should be >=262144)

[root@ORAVM1 Server]# /sbin/sysctl -a | grep wmem_max
net.core.wmem_max = 131071
(should be >=1048576)

[root@ORAVM1 Server]# /sbin/sysctl -a | grep aio-max-nr
fs.aio-max-nr = 65536
(max: 1048576 => ok)

To change the kernel parameters, create or edit the /etc/sysctl.conf file, and afterwards enter the following command to change the current values of the kernel parameters (=> no reboot necessary):

# /sbin/sysctl -p





Geen opmerkingen:

Een reactie posten