Oracle enterprise linux guests on virtual box hosts ahbaid gaffoor amazon com a9 com
Download
1 / 91

- PowerPoint PPT Presentation


  • 198 Views
  • Uploaded on

Oracle Enterprise Linux Guests on Virtual Box Hosts Ahbaid Gaffoor Amazon.com/A9.com. Overview. Virtualization High Level Steps & Concepts Build a Guest Machine Packages and Configuration Running Headless VMs. 1. Virtualization. Single Host CPU, Disk, Memory, Video, Sound Offerings:

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about '' - caine


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Oracle enterprise linux guests on virtual box hosts ahbaid gaffoor amazon com a9 com l.jpg

Oracle Enterprise Linux Guestson Virtual Box HostsAhbaid GaffoorAmazon.com/A9.com


Overview l.jpg
Overview

  • Virtualization

  • High Level Steps & Concepts

  • Build a Guest Machine

  • Packages and Configuration

  • Running Headless VMs


1 virtualization l.jpg
1. Virtualization

  • Single Host

  • CPU, Disk, Memory, Video, Sound

  • Offerings:

    • VirtualBox,

    • OracleVM,

    • Vmware,

    • KVM, Xen

    • Microsoft Virtual Machine

    • Amazon EC2 (cloud)


2 high level steps concepts l.jpg
2. High Level Steps & Concepts

  • Virtualization Host Recommendations

  • Guest Recommendations

  • Storage

  • Networking

  • Installing VirtualBox

  • Installing a Guest


2 high level steps concepts5 l.jpg
2. High Level Steps & Concepts

  • Virtualization Host Recommendations:

    • CPU: Multi Core, at least 4 cores

    • RAM: 4GB min, 8 recommended, 16GB better

    • Disk: 1 spindle per Guest, SSD if possible

    • Video: Shell Prompt

    • Windows 7 64-bit, SSD TRIM command support




3 build a guest machine l.jpg
3. Build a Guest Machine

  • Virtual Box

  • High Level Steps

  • Build a Guest VM


3 1 virtual box l.jpg
3.1 Virtual Box:

  • otn.oracle.com -> VM VirtualBox

  • virtualbox.org (Open Source)

  • Run Installer



3 2 virtual box high level steps l.jpg
3.2 Virtual Box: High Level Steps

  • VM Name & OS Type

  • Specify Memory (2GB)

  • Virtual Hard Disk Creation

  • Specify CD Rom for boot

  • Customize Guest VM

  • Boot and Install OS

  • Specify Hard Disk for Boot

  • Boot Guest VM








4 packages and configuration l.jpg
4. Packages and Configuration

  • Required Packages

  • Memory Configuration

  • Network Configuration

  • Kernel Configuration

  • User Limits Configuration

  • Security Configuration

  • Network Time Protocol Configuration

  • User and Group Creation

  • VirtualBox Guest Additions


Slide79 l.jpg

Packages - List

[[email protected] setup]# more packages.txt

kernel-headers-2.6.18-194.el5.x86_64.rpm

libgomp-4.4.0-6.el5.x86_64.rpm

binutils-2.17.50.0.6-14.el5.x86_64.rpm

compat-libstdc++-33-3.2.3-61.x86_64.rpm

elfutils-libelf-0.137-3.el5.x86_64.rpm

elfutils-libelf-devel-0.137-3.el5.x86_64.rpm

elfutils-libelf-devel-static-0.137-3.el5.x86_64.rpm

gcc-4.1.2-48.el5.x86_64.rpm

gcc-c++-4.1.2-48.el5.x86_64.rpm

glibc-2.5-49.x86_64.rpm

glibc-common-2.5-49.x86_64.rpm

glibc-devel-2.5-49.x86_64.rpm

glibc-headers-2.5-49.x86_64.rpm

ksh-20100202-1.el5.x86_64.rpm

libaio-0.3.106-5.x86_64.rpm

libaio-devel-0.3.106-5.x86_64.rpm

libgcc-4.1.2-48.el5.x86_64.rpm

libstdc++-4.1.2-48.el5.x86_64.rpm

libstdc++-devel-4.1.2-48.el5.x86_64.rpm

make-3.81-3.el5.x86_64.rpm

sysstat-7.0.2-3.el5.x86_64.rpm

unixODBC-2.2.11-7.1.x86_64.rpm

unixODBC-devel-2.2.11-7.1.x86_64.rpm

REQUIRED PACKAGES

Packages – Install Script

[[email protected] setup]# more install_packages.sh

umount /dev/cdom 1>/dev/null 2>&1

mount /dev/cdrom /media 1>/dev/null 2>&1

export CD=/media/Server

for p in `cat packages.txt`; do

echo "# $CD/$p"

rpm -Uvh --nodeps $CD/$p

done


Slide80 l.jpg

Automatic Memory Management and /dev/shm

[[email protected] ~]# df -h -t tmpfs

Filesystem Size Used Avail Use% Mounted on

tmpfs 2.0G 0 2.0G 0% /dev/shm

Size /dev/shm for MEMORY_TARGET shared memory allocation of 3G

[[email protected] ~]# umounttmpfs

[[email protected] ~]# df -h -t tmpfs

Filesystem Size Used Avail Use% Mounted on

[[email protected] ~]# mount -t tmpfsshmfs-o size=3000m /dev/shm

[[email protected] ~]# df -h -t tmpfs

Filesystem Size Used Avail Use% Mounted on

shmfs 3.0G 0 3.0G 0% /dev/shm

MEMORY CONFIGURATION

Edit /etc/fstab for persistence

[[email protected] ~]# cat /etc/fstab

/dev/VolGroup00/LogVol00 / ext3 defaults 1 1

LABEL=/boot /boot ext3 defaults 1 2

#tmpfs /dev/shmtmpfs defaults 0 0

tmpfs /dev/shmtmpfssize=3000m 0 0

devpts /dev/pts devptsgid=5,mode=620 0 0

sysfs /sys sysfs defaults 0 0

proc /proc proc defaults 0 0

/dev/VolGroup00/LogVol01 swap swap defaults 0 0


Slide81 l.jpg

eth0 configuration

[[email protected] ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0

# Intel Corporation 82540EM Gigabit Ethernet Controller

DEVICE=eth0

BOOTPROTO=static

BROADCAST=199.1.1.255

HWADDR= 08:00:27:0F:D3:AF

IPADDR=199.1.1.61

NETMASK=255.255.255.0

NETWORK=199.1.1.0

ONBOOT=yes

NETWORK CONFIGURATION


Slide82 l.jpg

Edit /etc/sysctl.conf

# Oracle 11gR2 configuration

# http://download.oracle.com/docs/cd/E11882_01/install.112/e16768/toc.htm#BHCCADGD

# concurrent outstanding requests

fs.aio-max-nr = 1048576

# files

fs.file-max = 6815744

# Shared Memory

kernel.shmall = 2097152

kernel.shmmax = 536870912

kernel.shmmni = 4096

# Semaphores semmslsemmnssemopmsemmni

kernel.sem = 250 32000 100 128

# Network

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

# Huge Pages for Oracle group 501 (oracle user group)

vm.hugetlb_shm_group=501

KERNEL CONFIGURATION


Slide83 l.jpg

Apply/etc/sysctl.conf changes

[[email protected] ~]# /sbin/sysctl -p

net.ipv4.ip_forward = 0

net.ipv4.conf.default.rp_filter = 1

net.ipv4.conf.default.accept_source_route = 0

kernel.sysrq = 0

kernel.core_uses_pid = 1

net.ipv4.tcp_syncookies = 1

kernel.msgmnb = 65536

kernel.msgmax = 65536

kernel.shmall = 4294967296

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmall = 2097152

kernel.shmmax = 536870912

kernel.shmmni = 4096

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

vm.hugetlb_shm_group = 501

KERNEL CONFIGURATION


Slide84 l.jpg

Edit /etc/security/limits.conf

# oracle limits

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

oracle soft stack 10240

USER LIMITS


Slide85 l.jpg

Edit /etc/pam.d/login

# oracle

session required pam_limits.so

Edit /etc/selinux/config

# SELINUX= can take one of these three values:

# enforcing - SELinux security policy is enforced.

# permissive - SELinux prints warnings instead of enforcing.

# disabled - SELinux is fully disabled.

SELINUX=disabled

SECURITY


Slide86 l.jpg

Edit /etc/sysconfig/ntpd

# -x sets the the slew/step threshold to 600 seconds

OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid“

Restart ntpd

[[email protected] ~]# /etc/init.d/ntpd restart

Shutting down ntpd: [ OK ]

ntpd: Synchronizing with time server: [ OK ]

Starting ntpd: [ OK ]

NTP


Slide87 l.jpg

Create dba and oinstall groups

[[email protected] ~]# cat /etc/sysctl.conf | grep ^vm.hugetlb_shm_group

vm.hugetlb_shm_group=501

[[email protected] ~]# groupadd -g 501 dba

[[email protected] ~]# groupadd -g 502 oinstall

Create oracle user

[[email protected] oracle]# mkdir -p /u01/app

[[email protected] oracle]# useradd -m -d /u01/app/oracle -u 501 -g oinstall -G dba -s /bin/bash oracle

[[email protected] oracle]# passwd oracle

Changing password for user oracle.

New UNIX password:

Retype new UNIX password:

passwd: all authentication tokens updated successfully.

USER AND GROUP CREATION

Edit /etc/sudoers

# Allow oracle user full sudo access

oracle ALL=(ALL) ALL

Create grid and db directories (as oracle)

[[email protected] oracle]# su - oracle

[[email protected] ~]$ mkdir -p /u01/app/grid/11.2

[[email protected] ~]$ mkdir -p /u01/app/oracle/product/db/11.2


Slide88 l.jpg

Mount VirtualBox ISO image from Host

D:\Program Files\Sun\VirtualBox\VBoxGuestAdditions.iso

Attach using Host Window: Menu -> Devices -> CD/DVD Devices -> More CD/DVD Images…

Mount as CD

Mount and run VirtualBox Guest Additions from Guest

[[email protected] ~]# df -h | grep media

/dev/hdc 33M 33M 0 100% /media/VBOXADDITIONS_3.2.8_64453

[[email protected] ~]# cd /media/VBOXADDITIONS_3.2.8_64453/

[[email protected] VBOXADDITIONS_3.2.8_64453]# sh ./VBoxLinuxAdditions-amd64.run

VBoxGuestAdditions

Why?

  • Mouse Pointer Integration

  • Improved Video Resolution

  • Seamless windows

  • Time Synchronization

  • Shared Clipboard

  • Automated Logins



Slide90 l.jpg

VBoxManage.exe modifyvm to set guest VRDP port

  • Windows already uses port 3389

  • n1 on port 3361, n2 on port 3362

  • VBoxHeadless can be called directly

  • Use a client to connect to <virtualbox host>:<virtual box guest vrdp port> : “mstsc.exe /v:localhost:3361”

VBoxManage.exe modifyvm n1 –vrdp on –vrdpport 3361

VBoxManage.exe modifyvm n2 –vrdp on –vrdpport 3362

C:\>VBoxManage.exe modifyvm n1 --vrdp on --vrdpmulticon on --vrdpport 3361

Oracle VM VirtualBox Command Line Management Interface Version 3.2.8

(C) 2005-2010 Oracle Corporation

All rights reserved.

C:\>VBoxManage.exe modifyvm n2 --vrdp on --vrdpmulticon on --vrdpport 3362

Oracle VM VirtualBox Command Line Management Interface Version 3.2.8

(C) 2005-2010 Oracle Corporation

All rights reserved.

5. RUNNING HEADLESS VMs

VBoxManage.exe showvminfo to verify

C:\>VBoxManage.exe showvminfo n2 | findstr /ib vrdp

VRDP: enabled (Address 0.0.0.0, Ports 3362, MultiConn: off, ReuseSingleConn: off, Authentication type: null)

VBoxManage.exe startvm to run

C:\>VBoxManage.exe startvm n2 --type vrdp

Oracle VM VirtualBox Command Line Management Interface Version 3.2.8

(C) 2005-2010 Oracle Corporation

All rights reserved.

Waiting for the VM to power on...

VM has been successfully started.


Thank you ahbaid@ amazon com a9 com att net http redoblog wordpress com http ocpdba net l.jpg
Thank You[email protected]{amazon.com|a9.com|att.net}http://redoblog.wordpress.comhttp://ocpdba.net


ad