Build Your Own Oracle Infrastructure: Part 4 – Configure Oracle VM Server.

Config-OVM


Configuring Oracle VM Server using Oracle VM Manager can be a little tricky.

However, once you know just a handful of concepts and some terminology, you’ll wonder what the fuss was all about.

In Part 4, we’ll show you the steps to configure OVM Server in readiness to create VMs.

Part of the reason Oracle VM is tricky is due to a lack of decent resources explaining it. The official Getting Started guide is OK, but it doesn’t do a great job of explaining what you’re doing or why. It can also be misleading. For example, the Discover Storage section says this:

Your storage can be any of the following:

  • iSCSI: Abstracted LUNs or raw disks accessible over existing Ethernet infrastructure (SAN Servers).
  • FCP: Abstracted LUNs or raw disks accessible over Fibre Channel host bus adapters (SAN Servers).
  • NFS: File-based storage over existing Ethernet infrastructure (NAS or File Servers).

On that basis you’d be forgiven for thinking you need some form of network storage with which to create your VMs. Not true. We’ll be using internal OVM Server storage for the VMs as you’ll see shortly. Hopefully this installment of the Build Your Own Oracle Infrastructure series will set you straight.

Before we launch into OVM Manager, just a cautionary note to pay close attention to the Job Summary section at the foot of the OVM Manager console screen.

When working with OVM Manager it is advisable to do one thing at a time and let it run to completion before starting the next task.


If you allow multiple tasks to overlap, bad things happen. So have patience, Grasshopper!

Quick links to all the tasks:

Task #1: Discover the OVM Server.

The OVM Server is already up and runnning as a result of following the steps to install OVM Server. To make it easier for the OVM Manager to discover the OVM Server, add the appropriate entry to the local /etc/hosts file on the OVM Manager server:

200.200.10.7     ovmsvr.mynet.com     ovmsvr         # Oracle VM Server

Login to OVM Manager and ensure you are on the Servers and VMs tab. From here, right click Server Pools and select the option, Discover Servers. You could also click the Discover Servers icon. In the Discover Servers dialog box, enter the Oracle VM Agent Password and the name of the Oracle VM Server, which in our example is ovmsvr. The screen should now look similar to this:

Click OK to discover the server. Once the server is discovered, the screen should look similar to this:

ovmsvr.mynet.com should be listed underneath Unassigned Servers. It is unassigned because it does not yet belong to a Server Pool. Also, note the Job Summary section. The Discover Server job completed with a status of Success. Keep an eye on this section and make sure each task completes successfully.

Task #2: Create a Server Pool.

Every OVM Server must belong to a Server Pool. A Server Pool can contain one or more OVM Servers. So the next task is to create a Server Pool and allocate ovmsvr.mynet.com to that Server Pool.

In the Server and VMs tab, right click Server Pools and select the option, Create Server Pool. You could also click the Create Server Pool icon. The Create a Server Pool dialog box will appear. Use the following values:

Field Value
Server Pool Name ServerPool1
Virtual IP Address for the Pool 200.200.10.19
VM Console Keymap Leave the default
VM Start Policy Leave the default
Secure VM Migrate Leave blank
Clustered Server Pool Leave blank
Timeout for Cluster Leave the default
Storage for Server Pool Leave blank
Storage Location Leave blank
Description Default server pool

The screen should look similar to this:

Click Next to continue. Then move the ovmsvr.mynet.com server from the Available Server(s) pane to the Selected Server(s) pane using the arrow icons. The screen should now look similar to this:

Click the Finish button and you’re done. ServerPool1 is now created and contains the server, ovmsvr.mynet.com. The screen should look similar to this:

Task #3: Create Storage Repositories.

Oracle VM Storage Repositories are simply disk resources used by VMs and they need to be created before a VM can reference them. We’ll create two different Storage Repositories. The first will be used to store the Oracle Linux 6 Update 6 ISO which will be used to boot a VM and install the operating system. The second Storage Repository will be used to provide actual disk storage for VM filesystems.

In OVM Manager, click on the Repositories tab, then click the green + sign to open the Create a Repository dialog box. Use these values:

Field Value
Repository Name OL6_Repo
Repository Location Physical Disk
Server Pool ServerPool1
Description Repository to hold the Oracle Linux 6.6 ISO image

The screen should look similar to this:

Click the magnifying glass icon next to the Physical Disk field. The screen should now look similar to this:

Select the physical disk OVM_SYS_REPO_PART_360… and click OK. This piece of disk is the unused 4th partition of the OVM Server installation drive we previously referred to here. The screen should now look similar to this:

Click Next. OVM Manager takes a moment or several to create the repository. You are then presented with a 2 pane dialog box with Available Server(s) on the left and Present to Server(s) on the right. Use the arrow icons to move ovmsvr.mynet.com over to the Present to Server(s) pane. The screen should then look similar to this:

Click Finish to complete the creation of OL6_Repo Storage Repository which will be visible to the ovmsvr.mynet.com OVM Server.

Next, we’ll create the VM_Filesystems_Repo Storage Repository. Still within the Repositories tab in OVM Manager, click the green + sign to open the Create a Repository dialog box. Use these values:

Field Value
Repository Name VM_Filesystems_Repo
Repository Location Physical Disk
Server Pool ServerPool1
Description Repository for VM filesystems

The screen should look similar to this:

Click the magnifying glass icon next to the Physical Disk field. The screen should now look similar to this:

Select the physical disk starting with 3600… and click OK. The name you see will be slightly different. The screen should now look similar to this:

Just as we did with the OL6_Repo Storage Repository, click Next and use the arrow icons to move ovmsvr.mynet.com from the Available Server(s) pane on the left to the Present to Server(s) pane on the right. Click Finish. The screen should now show both Storage Repositories similar to this:

In the left most pane underneath Repositories, click on OL6_Repo. The screen should look similar to this:

Note the ID of the OL6_Repo Storage Repository. In my case, it is 0004fb0000030000cc1495b85b9bd08a. YMMV. Open up a Putty session on the Oracle VM Server and run these commands:

[root@ovmsvr /]# cd /OVS/Repositories
[root@ovmsvr Repositories]# ls -l
drwxr-xr-x 8 root root 3896 Nov 26 14:37 0004fb000003000059416081b6e25e36
drwxr-xr-x 8 root root 3896 Nov 26 14:33 0004fb0000030000cc1495b85b9bd08a

Note the second directory has the same name as the ID of the OL6_Repo Storage Repository. Oracle VM tends to use these very long numbers to uniquely identify everything. Get used to seeing that convention. Now run these commands:

[root@ovmsvr Repositories]# cd 0004fb0000030000cc1495b85b9bd08a
[root@ovmsvr 0004fb0000030000cc1495b85b9bd08a]# ls -l
drwx------ 2 root root 3896 Nov 26 14:33 Assemblies
drwx------ 2 root root 3896 Nov 26 15:18 ISOs
drwxr-xr-x 2 root root 3896 Nov 26 14:33 lost+found
drwx------ 2 root root 3896 Nov 26 14:33 Templates
drwx------ 2 root root 3896 Nov 26 14:33 VirtualDisks
drwx------ 2 root root 3896 Nov 26 14:33 VirtualMachines

At this point the ISOs directory is empty, but we need to populate it with the Oracle Linux 6 Update 6 ISO we downloaded from Oracle earlier (V52218-01.iso). The simplest way to do that is to use FileZilla.

Fire up FileZilla, login to ovmsvr.mynet.com and navigate to /OVS/Repositories/0004fb0000030000cc1495b85b9bd08a/ISOs. Then locate your copy of V52218-01.iso and copy it to the ISOs directory on ovmsvr.mynet.com. The screen should look similar to this:

When the copy is complete, you can verify it’s there using these commands:

[root@ovmsvr 0004fb0000030000cc1495b85b9bd08a]# cd ISOs
[root@ovmsvr ISOs]# ls -l
-rw-r--r-- 1 root root 3853516800 Nov 26 15:21 V52218-01.iso

You can also verify using OVM Manager. Expand the OL6_Repo Storage Repository in the left pane, then click on the ISOs folder. The right pane will show the OL6.6 ISO is now present.

Et voila! 😀

Task #4: Create VM Networks.

This is a little misleading in the sense we’re not actually creating networks per se. It’s more akin to creating a network resource which may be allocated to a VM, after which it becomes a network interface. Allocating a network resource to a VM just means that VM will be created with a virtual NIC which could be active on a specific network. In the Linux world, if you allocate 2 VM Networks to a VM, the VM will be created with 2 network interfaces, eth0 and eth1. This makes more sense when you create the VM Networks and then allocate them to VMs which we’ll do in Part 5. Bear with me.

By installing OVM Server, you get a VM Network created by default. Its name defaults to an IP address made up of the first two octets of the network it’s on, followed by 0.0. In our case, the default name is 200.200.0.0. You can see this VM Network by clicking on the Networking tab in OVM Manager, then by clicking Networks. The screen should look similar to this:

Note, this VM Network has 3 default uses or Channels. Server Management, Cluster Heartbeat and Live Migrate. Click on the pencil icon so we can change the name of this network to something more meaningful and give it another channel. Change the Name to Management_Public and check the box for Virtual Machine. The screen should look similar to this:

Click on the Ports tab. This is where things get a little weird. If you’re following along using the network addressing described in this series, you should see these values on a screen similar to this:

Parameter Value
Port Name bond0 on ovmsvr.mynet.com
Server ovmsvr.mynet.com
IP Address 200.200.10.7
Bonding Yes

When we installed OVM Server, we picked the HP ProLiant DL380’s eth0 for the network interface and assigned it the IP address 200.200.10.7. Rather miraculously, OVM Server has created a network interface bond (bond0) with a single network interface. Hence the reason you see bond0 as the port for the default network. So, addresses on the public network will be of the form, 200.200.10.x.

We need to create two more VM Networks. One for the shared storage which will be coming from the Openfiler server. Another for the private interconnect so the Oracle RAC nodes can chat.

Click OK to return to the Networking tab, then click the green + sign to start the Create Nework dialog. Select the option, Create a Network with Ports/Bond Ports/VLAN interfaces. The screen should look similar to this:

Click Next. In the Name field, enter Shared_Storage_Public and check the box next to Virtual Machine. This signifies that this network will be used as a regular network by a VM. We happen to know it’ll be for the shared storage, but OVM Server doesn’t know that and doesn’t need to care. The screen should now look similar to this:

Note, as tempting as it might seem to check Storage instead, don’t do it. Even the Oracle VM documentation tells you to stay away from it. This from the Create New Network documentation:

Storage: Reserved for future use and currently has no practical function or application.”

Now, we could have a debate at this point about why this option is even here, but my coffee’s getting cold so let’s move on.

Click Next. This shows the Add Ports to Network dialog. There are 3 more network interfaces available on the DL380 running ovmsvr.mynet.com. Select eth1. The screen should now look similar to this:

Click OK. Then click the green + sign to open the Create Network dialog again. This time select the option, Create a Local Network on a single server. Instead of mapping this VM Network to a physical network interface on the DL380, we will create a virtual network resource that doesn’t use any additional networking hardware. Spooky! We still have 2 spare network interfaces on the DL380 (eth2 & eth3), but we’re not going to use them for now. The great thing about this virtual network resource is that it operates at bus speed which is pretty handy for the interconnect. The screen should now look similar to this:

Click Next. Give the network the name, GI_Interconnect_Private and add a suitable description. The screen now looks similar to this:

Click Next. Select ovmsvr.mynet.com for the Server. The screen should look similar to this:

Click Finish. Your screen should look similar to this:

Just one more change to make. We need to add an IP address to the eth1 network interface on the OVM Server. Click the Shared_Storage_Public network, then click the pencil icon to open the Edit Network dialog:

Click the Ports tab, highlight the eth1 entry then click the pencil icon to open the Edit Port(s) dialog. Use these values to complete this screen:

Field Value
Addressing Static
IP Address 200.200.20.7
Mask 255.255.255.0

The screen should look like this:

Click OK and your work is done!

OVM Server is now configured and ready for you to create VMs.
See you in Part 5 for that. We having fun yet? 😀

If you have any comments or questions about this post, please use the Contact form here.

Build Your Own Oracle Infrastructure: Part 3 – Install Oracle VM Software.

icon-oraclevm

The Oracle VM software provides the fundamentals for building the entire Oracle infrastructure.

The good news is, it’s really quite easy to install it.

In other news, the configuration can be a little challenging if you don’t know a handful of concepts, some terminology and the order in which to do things. Fear not, that’s covered in Part 4.

Quick links to all the tasks:

Task #1: Install Oracle VM Server.

The Oracle VM Server software will be installed on the Oracle VM Server Computer which in my case is an HP ProLiant DL380 G7. Before installing any software you will need to configure the server’s storage. The DL380 originally had 8 x 72 GB internal SAS drives (HP Part# 375861-B21). The scope of this project has expanded a little since I started so I replaced six of the 72 GB drives with six 300 GB drives (HP Part# 507127-B21). The 72 GB drives would have worked, but the extra capacity will give us a little more wiggle room when creating Oracle database server VMs. The 300 GB drives are a little more expensive than the 72 GB drives. They range from $25 to $40 depending upon where you get them from. I buy most of my drives from sellers on eBay. For a complete list of supported drives, check the HP Smart Array P410i Controller documentation here.

So, the DL380 now has 2 x 72 GB internal SAS drives and 6 x 300 GB internal SAS drives. I used the P410i Controller RAID configuration utility to configure 2 logical drives. Logical drive #1 consists of the two 72 GB drives in a RAID 1+0 configuration. This is where Oracle VM Server will be installed. Logical drive #2 consists of the six 300 GB drives also in a RAID 1+0 configuration. This will be used later on as an Oracle VM Storage Repository.

Note, in a production environment, this storage repository is more likely to come via a dedicated network storage filer rather than internal server drives.

With the server storage configured, we can proceed with installing Oracle VM Server. Oracle has done a pretty nice job of making this simple and well documented. However, the order in which I was prompted to do things was different to the order in the official installation guide. It shouldn’t make any difference in the grand scheme of things as you end up in the same place regardless. The official installation guide can be found here.

What follows are the 20 steps I used to install from DVD. I had previously used ImgBurn to create a bootable Oracle VM Server DVD. The installer runs in text only mode. There is no GUI as such.

Step #1: Boot The Server From DVD.

This may require you to change some BIOS settings so that the server can boot from a DVD or CD-ROM device. With the DVD in the DVD drive, simply reboot the server and wait for the first prompt.

Step #2: Start The Installation.

After the server has booted from the DVD you will see a prompt telling you to press the Enter key to begin the installation. Guess what you have to do!

Step #3: Disc Found.

Amazingly the DVD is detected. Here you have the option of testing the installation media or skipping the test. The media test does take a while. If you downloaded Oracle VM Server without any issues and ImgBurn created an ISO image on a blank DVD without any errors, you’re probably OK. In which case, select Skip to avoid the media test.

Step #4: Oracle VM Server.

Here you’ll see a little welcome notice. Select OK and move on.

Step #5: Language Selection.

You’ll probably want English, but if you fancy a challenge pick something else.

Step #6: Keyboard Selection.

Choose what seems most appropriate. US for example.

Step #7: License Agreement.

Simply Accept the license agreement and move on.

Step #8: Partition Type.

The server has two logical drives (8 physical). The smaller of the two logical drives is where we’ll install Oracle VM Server. I selected the options, “Use entire drive” and “sda 69974 MB (HP LOGICAL VOLUME)”. It’s cool that the installer recognizes the drive as an HP logical volume. YMMV.

Step #9: Writing Storage Configuration To disk.

Select the option, “Write changes to disk”.

Step #10: Boot Loader Configuration.

Select the option, “/dev/sda Master Boot Record (MBR)”.

Step #11: Oracle VM Management Interface.

At this point you need to select the network interface to use to connect to the OVM Server. The DL380 has 4 network interfaces, eth0 through eth3. I picked eth0. I’m creative that way.

Step #12: IPv4 Configuration For eth0.

I selected, “Manual address configuration” and used these values:

IP Address: 200.200.10.7
Prefix (Netmask): 255.255.255.0

Step #13: Miscellaneous Network Setup.

I used these values:

Gateway: 200.200.10.1
Primary DNS: 200.200.10.1
Secondary DNS: 8.8.8.8

Note, in a production environment, you would likely need to get the networking information from your Network Administrator. If you can find them. 😀

Step #14: Hostname Configuration.

I selected the manual option and used this value:

ovmsvr.mynet.com

Step #15: Time Zone Selection.

Select the appropriate value from the menu displayed.

Step #16: Oracle VM Agent Password.

This password is extremely important. Write it down and keep it somewhere safe. You’ll need it a little later. You’re prompted to enter the password twice.

Step #17: Root Password.

This password is also extremely important. Write it down and keep it somewhere safe. You’re prompted to enter the password twice.

Step #18: Package Installation.

At this point the Oracle VM Server installation kicks off. A left to right progress bar is displayed as the various packages are installed. For Oracle VM Server version 3.3.2 there are 429 packages to install. This takes several minutes, but eventually the progress bar will show 100% and the screen displays the message, “Packages Complete: 429 of 429”. After this there’s a lengthy pause. Don’t worry, the installation hasn’t died. Probably.

Step #19: Post Installation.

This step displays the message, “Performing post-installation configuration”. Again, there’s a pause during this step.

Step #20: Installation Complete.

A congratulations message is displayed and the DVD is ejected. Remove the DVD and press Enter to reboot the server. After the server comes back up, you’ll see the console display the following information:

Oracle VM Server 3.3.2 Console [Alt-F2 for login console]

Local hostname             : ovmsvr.mynet.com
Manager UUID               : Unowned
Hostname                   : None
Server IP                  : None
Server Pool                : None
Clustered                  : No
Server Pool Virtual IP     : None
Cluster State              : Offline
Master Server              : No
Cluster Type               : None
Cluster storage            : None

At the foot of the screen you’ll see information relating to the status of the server:

OVS Agent                  : Running
VMs running                : 0
System memory              : 73717
Free memory                : 70636
Uptime                     : x days, y hours, z minutes

As the screen shows, if you need to login to the OS, hit Alt-F2. This will clear the screen and show a login prompt. To get back to the above console display, hit Alt-F1.

The installation writes a couple of log files to /root:

-rw-r--r--. 1 root root 18708 Nov 1 16:32 install.log
-rw-r--r--. 1 root root  6310 Nov 1 16:29 install.log.syslog

The install.log.syslog file records the additions the installer makes to OS users and groups. The install.log file records the installation of all the Linux packages. Check these files for errors.

The installer writes several system start-up and monitoring scripts to /etc/init.d, including:

ocfs2
ovm-consoled
ovmwatch
ovs-agent
ovs-devmon

The default fdisk output for /dev/sda looks like this:

[root@ovmsvr ~]# fdisk -l
Disk /dev/sda: 73.4 GB, 73372631040 bytes
255 heads, 63 sectors/track, 8920 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000782ce

   Device Boot     Start         End     Blocks   Id System
/dev/sda1   *           1         64     512000   83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64       6591   52428800   83 Linux
/dev/sda3            6591       7114    4194304   82 Linux swap / Solaris
/dev/sda4            7114       8921   14516224   83 Linux

 Disk /dev/mapper/OVM_SYS_REPO_PART_3600508b1001c1cf46029dbf4c8e1f13a: 14.9 GB, 
14864613376 bytes
255 heads, 63 sectors/track, 1807 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

The default file system layout should look like this:

[root@ovmsvr ~]# df -h
Filesystem     Size  Used  Avail Use%  Mounted on
/dev/sda2       50G  1.2G    46G   3%  /
tmpfs          1.1G     0   1.1G   0%  /dev/shm
/dev/sda1      477M   47M   401M  11%  /boot
none           1.1G   40K   1.1G   1%  /var/lib/xenstored

Note, the /dev/sda drive has 4 partitions but only 3 of them are being used. The /dev/sda1 partition is mounted on /boot. The /dev/sda2 partition is mounted on / (the root filesystem) and the /dev/sda3 partition is used for swap space. The partition /dev/sda4 is unused. The size of this partition is 14,516,224 1K blocks, which equals 14,176 MB, which equals 13.84 GB. The significance and usefulness of this unused 13.84 GB partition will become clear when we create storage repositories later.

That’s it!. Pretty simple, huh?

Task #2: Install Oracle VM Manager.

Oracle VM Manager is a GUI application which runs on top of Linux. Since we’ll be using a dedicated physical computer to run Oracle VM Manager, installing it requires 3 steps. Clink the link you need:

Step #1: Install Oracle Linux.

You may already have a Linux computer ready to install Oracle VM Manager onto. However, be aware there are some hardware and software requirements which must be met in order for the Oracle VM Manager software installation to succeed. The hardware requirements can be found here and the software requirements can be found here.

Basically, the hardware and software requirements boil down to this:

Category Resource Value
Hardware RAM 8.00 GB or better
Hardware CPU 64 bit 1.83 GHz or better
Hardware Swap Space 2.10+ GB
Hardware /u01 5.50+ GB free
Hardware /tmp 2.00+ GB free
Hardware /var 500+ MB free
Hardware /usr 500+ MB free
Software OS Oracle Linux / RHEL 5.5 64 bit or later
Software OS Oracle Linux / RHEL 6 64 bit or later

The installation and configuration of Oracle Linux 6 Update 6 is covered in detail with screen shots in         Part 7 – Build Oracle RAC Servers. For now, we’ll assume we have a running Oracle Linux 6.6 server.

Step #2: Configure Oracle Linux for Oracle VM Manager.

Configuring Oracle Linux for Oracle VM Manager is done in 3 steps:

Step #2a: Install Required Packages.

The type of Oracle Linux installation I normally perform for Oracle database servers ensures most if not all required packages are installed. Oracle VM Manager does require the unzip, libaio and perl packages. You can check if they are present using these commands:

[root@oramgt ~]# rpm -qa | grep unzip
unzip-6.0-2.el6_6.x86_64

[root@oramgt ~]# rpm -qa | grep libaio
libaio-0.3.107-10.el6.x86_64

[root@oramgt ~]# rpm -qa | grep perl
perl-5.10.1-136.el6_6.1.x86_64
perl-ExtUtils-MakeMaker-6.55-136.el6_6.1.x86_64
perl-IO-Zlib-1.09-136.el6_6.1.x86_64
perl-Module-CoreList-2.18-136.el6_6.1.x86_64
perl-parent-0.221-136.el6_6.1.x86_64
perl-DBD-SQLite-1.27-3.el6.x86_64
perl-HTML-Tagset-3.20-4.el6.noarch
perl-Pod-Escapes-1.04-136.el6_6.1.x86_64
perl-Module-Load-0.16-136.el6_6.1.x86_64
perl-IPC-Cmd-0.56-136.el6_6.1.x86_64
perl-Archive-Extract-0.38-136.el6_6.1.x86_64
perl-Crypt-SSLeay-0.57-17.el6.x86_64
perl-CPAN-1.9402-136.el6_6.1.x86_64
perl-CPANPLUS-0.88-136.el6_6.1.x86_64
perl-DBI-1.609-4.el6.x86_64
perl-XML-Parser-2.36-7.el6.x86_64
perl-URI-1.40-2.el6.noarch
perl-libwww-perl-5.833-2.el6.noarch
perl-libs-5.10.1-136.el6_6.1.x86_64
perl-Params-Check-0.26-136.el6_6.1.x86_64
perl-IO-Compress-Base-2.021-136.el6_6.1.x86_64
perl-ExtUtils-ParseXS-2.2003.0-136.el6_6.1.x86_64
perl-IO-Compress-Zlib-2.021-136.el6_6.1.x86_64
perl-File-Fetch-0.26-136.el6_6.1.x86_64
perl-Term-UI-0.20-136.el6_6.1.x86_64
perl-Digest-SHA-5.47-136.el6_6.1.x86_64
perl-Test-Simple-0.92-136.el6_6.1.x86_64
perl-Parse-CPAN-Meta-1.40-136.el6_6.1.x86_64
perl-core-5.10.1-136.el6_6.1.x86_64
perl-XML-Grove-0.46alpha-40.el6.noarch
perl-Compress-Raw-Bzip2-2.021-136.el6.x86_64
perl-HTML-Parser-3.64-2.el6.x86_64
perl-Pod-Simple-3.13-136.el6_6.1.x86_64
perl-Locale-Maketext-Simple-0.18-136.el6_6.1.x86_64
perl-Log-Message-0.02-136.el6_6.1.x86_64
perl-devel-5.10.1-136.el6_6.1.x86_64
perl-Compress-Raw-Zlib-2.021-136.el6_6.1.x86_64
perl-Archive-Tar-1.58-136.el6_6.1.x86_64
perl-Log-Message-Simple-0.04-136.el6_6.1.x86_64
perl-Module-Loaded-0.02-136.el6_6.1.x86_64
perl-ExtUtils-Embed-1.28-136.el6_6.1.x86_64
perl-CGI-3.51-136.el6_6.1.x86_64
perl-Time-HiRes-1.9721-136.el6_6.1.x86_64
perl-XML-Twig-3.34-1.el6.noarch
perl-Module-Pluggable-3.90-136.el6_6.1.x86_64
perl-Module-Load-Conditional-0.30-136.el6_6.1.x86_64
perl-Package-Constants-0.02-136.el6_6.1.x86_64
perl-ExtUtils-CBuilder-0.27-136.el6_6.1.x86_64
perl-Module-Build-0.3500-136.el6_6.1.x86_64
perl-Time-Piece-1.15-136.el6_6.1.x86_64
perl-XML-Dumper-0.81-8.el6.noarch
perl-libxml-perl-0.08-10.el6.noarch
perl-version-0.77-136.el6_6.1.x86_64
perl-Test-Harness-3.17-136.el6_6.1.x86_64
perl-Compress-Zlib-2.021-136.el6_6.1.x86_64
perl-Object-Accessor-0.34-136.el6_6.1.x86_64
perl-IO-Compress-Bzip2-2.021-136.el6_6.1.x86_64
perl-DBIx-Simple-1.32-3.el6.noarch

If you are missing any of these packages, you can install them using this yum command:

[root@oramgt ~]# yum install zip unzip libaio perl

This assumes you have already setup a yum repository. If you have not, check out Creating a Public Oracle Yum Repository for Oracle Linux 6.

You will also need to install the ovmcore-console package in order to gain access to the console of VMs. You can check if you have it installed using this command:

[root@ovmmgr rpm]# rpm -qa | grep ovmcore
ovmcore-console-1.0-42.el6.noarch

If it’s not installed, install it using this command:

[root@ovmmgr rpm]# rpm -Uvh ovmcore-console-1.0-42.el6.noarch.rpm
Preparing...                ########################################### [100%]
   1:ovmcore-console        ########################################### [100%]

Step #2b: Edit the /etc/hosts File.

Ensure you have the correct entry in the local /etc/hosts file. I used this entry:

200.200.10.5  ovmmgr.mynet.com     ovmmgr

Step #2c: Add an OS User and Group, Configure the Firewall and Check for /u01.

The oracle user and dba group need to be added to the system. In addition, some security limits need to be set for the oracle user. To ensure proper communication between Oracle VM Server and Oracle VM Manager, the settings for some Linux firewall ports need to be modified. Finally, the existence of /u01 is checked. /u01 can be either a directory within the root file system or the mount point for its own file system. Either way, a minimum of 2.4 GB is needed to install Oracle VM Manager within /u01.

The simplest way to make all the required changes is to run a script provided by Oracle called createOracle.sh. It can be found in the root directory of the Oracle VM Manager DVD. To make the changes, simply mount the DVD and run the script:

[root@ovmmgr /]# mount -t iso9660 /dev/sr0 /media
[root@ovmmgr /]# cd /media

[root@ovmmgr media]# ls -l create*
-r-xr-x---. 1 root root 10794 Jan 14 2015 createOracle.sh

[root@ovmmgr media]# ./createOracle.sh

It’s a best practice to ensure the oracle user UID and dba group GID are the same across your entire server infrastructure. Doing so avoids weirdness when copying oracle owned files from one server to another. By default, the script creates the oracle user with a UID of 54321 and the dba group with a GID of 54321. These values are unlikely to be compatible with your own standards, so to change them use these commands:

[root@ovmmgr /]# groupmod -g <your_preferred_GID> dba
[root@ovmmgr /]# usermod -u <your_preferred_UID> oracle

The security changes for the oracle user are made to the file, /etc/security/limits.conf. The Linux firewall changes are made to the file, /etc/sysconfig/iptables. It’s not required to have the Linux firewall up and running. To check its status, use this command:

[root@ovmmgr ~]# service iptables status
iptables: Firewall is not running.

If the firewall is running, the output will look something like this:

[root@ovmmgr ~]# service iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num target     prot opt source      destination
1   ACCEPT     all  --  0.0.0.0/0   0.0.0.0/0   state RELATED,ESTABLISHED
2   ACCEPT     icmp --  0.0.0.0/0   0.0.0.0/0
3   ACCEPT     all  --  0.0.0.0/0   0.0.0.0/0
4   ACCEPT     tcp  --  0.0.0.0/0   0.0.0.0/0   state NEW tcp dpt:22
5   REJECT     all  --  0.0.0.0/0   0.0.0.0/0   reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
num target     prot opt source      destination
1   REJECT     all  --  0.0.0.0/0   0.0.0.0/0   reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
num target     prot opt source      destination

To turn the Linux firewall off, see the relevant commands here.

Step #3: Run the Oracle VM Manager installer.

If not already mounted, mount the Oracle VM Manager DVD then run the installer script, runInstaller.sh:

[root@ovmmgr /]# mount -t iso9660 /dev/sr0 /media
[root@ovmmgr /]# cd /media
[root@ovmmgr media]# ./runInstaller.sh
Oracle VM Manager Release 3.3.2 Installer

Oracle VM Manager Installer log file:
/var/log/ovmm/ovm-manager-3-install-2015-11-25-165414.log

Please select an installation type:
   1: Install
   2: Upgrade
   3: Uninstall
   4: Help

   Select Number (1-4): 1

Starting production with local database installation ...

Verifying installation prerequisites ...

One password is used for all users created and used during the installation.
Enter a password for all logins used during the installation: <enter password>
Enter a password for all logins used during the installation (confirm): <enter password>

Please enter your fully qualified domain name, e.g. ovs123.us.oracle.com,
(or IP address) of your management server for SSL certification generation,
more than one IP address are detected:
200.200.10.5 200.200.30.5 [ovmmgr.mynet.com]: <press enter>

Note, two IP addresses were reported during my installation because my Oracle VM Manager server has two NICs configured. YMMV.

Verifying configuration ...

Start installing Oracle VM Manager:
  1: Continue
  2: Abort

  Select Number (1-2): 1

Step 1 of 9 : Database Software...
Installing Database Software...
Retrieving MySQL Database 5.6 ...
Unzipping MySQL RPM File ...
Installing MySQL 5.6 RPM package ...
Configuring MySQL Database 5.6 ...
Installing MySQL backup RPM package ...
Step 2 of 9 : Java ...
Installing Java ...

Step 3 of 9 : Database schema ...
Creating database 'ovs' ...
Creating database 'appfw'
Creating user 'ovs' for database 'ovs'...
Creating user 'appfw' for database 'appfw'

Step 4 of 9 : WebLogic and ADF...
Retrieving Oracle WebLogic Server 12c and ADF ...
Installing Oracle WebLogic Server 12c and ADF ...
Applying patches to Weblogic ...

Step 5 of 9 : Oracle VM ...
Installing Oracle VM Manager Core ...
Retrieving Oracle VM Manager Application ...
Extracting Oracle VM Manager Application ...
Retrieving Oracle VM Manager Upgrade tool ...
Extracting Oracle VM Manager Upgrade tool ...
Installing Oracle VM Manager Upgrade tool ...

Step 6 of 9 : Domain creation ...
Creating Oracle WebLogic Server domain ...
Starting Oracle WebLogic Server 12c ...
Creating Oracle VM Manager user 'admin' ...
Retrieving Oracle VM Manager CLI tool ...
Extracting Oracle VM Manager CLI tool...
Installing Oracle VM Manager CLI tool ...

Step 7 of 9 : Deploy ...
Configuring Https Identity and Trust...
Deploying Oracle VM Manager Core container ...
Configuring Client Cert Login...
Deploying Oracle VM Manager UI Console ...
Deploying Oracle VM Manager Help ...
Disabling HTTP access ...

Step 8 of 9 : Oracle VM Tools ...
Retrieving Oracle VM Manager Shell & API ...
Extracting Oracle VM Manager Shell & API ...
Installing Oracle VM Manager Shell & API ...

Retrieving Oracle VM Manager Wsh tool ...
Extracting Oracle VM Manager Wsh tool ...
Installing Oracle VM Manager Wsh tool ...

Retrieving Oracle VM Manager Tools ...
Extracting Oracle VM Manager Tools ...
Installing Oracle VM Manager Tools ...
Copying Oracle VM Manager shell to '/usr/bin/ovm_shell.sh' ...
Installing ovm_admin.sh in '/u01/app/oracle/ovm-manager-3/bin' ...
Installing ovm_upgrade.sh in '/u01/app/oracle/ovm-manager-3/bin' ...


Step 9 of 9 : Start OVM Manager ...
Enabling Oracle VM Manager service ...
Shutting down Oracle VM Manager instance ...
Starting Oracle VM Manager instance ...
Waiting for the application to initialize ...
Oracle VM Manager is running ...

Please wait while WebLogic configures the applications...
Oracle VM Manager installed.

Installation Summary
--------------------
Database configuration:
Database type              : MySQL
Database host name         : localhost
Database name              : ovs
Database listener port     : 49500
Database user              : ovs

Weblogic Server configuration:
Administration username    : weblogic
 
Oracle VM Manager configuration:
Username                   : admin
Core management port       : 54321
UUID                       : 0004fb0000010000965afbe809a1a7cb

Passwords:
There are no default passwords for any users. The passwords to use for 
Oracle VM Manager, Database, and Oracle WebLogic Server have been set by 
you during this installation. In the case of a default install, all 
passwords are the same.

Oracle VM Manager UI:
https://ovmmgr.mynet.com:7002/ovm/console
Log in with the user 'admin', and the password you set during the installation.

Note that you must install the latest ovmcore-console package for your 
Oracle Linux distribution to gain VNC and serial console access to your 
Virtual Machines (VMs). Please refer to the documentation for more 
information about this package.
For more information about Oracle Virtualization, please visit: http://www.oracle.com/virtualization/

Oracle VM Manager installation complete. 

Please remove configuration file /tmp/ovm_configw74jWS.

That’s it! How easy is that? Nice.

Using a web browser, you can now login to the Oracle VM Manager console using these credentials:

URL                : https://ovmmgr.mynet.com:7002/ovm/console
Username           : admin
Password           : <password you provided earlier>

I use Firefox to log into Oracle VM Manager. Chrome works just fine too. Internet Explorer goes off into la-la land trying to display the login box for some reason. I have better things to do than sort out IE’s issues with life. You will have to deal with your browser’s paranoia about connecting to a site which it considers verboten, but once you give it a stiff talking to, you should see an Oracle VM Manager console screen similar to this:

The tricky bit is next. See you in Part 4 – Configure OVM Server.

If you have any comments or questions about this post, please use the Contact form here.

Build Your Own Oracle Infrastructure: Part 2 – Software.

Here’s the matrix of software I used for this project. Almost all of it is available as free downloads.
Some items are interchangeable with alternatives and I’ve noted them where appropriate.
Here’s the list:

Link To Software Approximate Cost
Oracle VM Free Download
Oracle Linux Free Download
Oracle VM Console Free Download
Oracle Database 12c Free Download
Oracle Enterprise Manager Cloud Control Free Download
Oracle Enterprise Manager Repository Database Template Free Download
Oracle ASMlib rpm Free Download
Oracle GoldenGate Free Download
Openfiler Free Download
FileZilla Free Download
Putty Free Download
ImgBurn Free Download
X-Win32 $120

Software Summary.

Oracle VM.

Oracle VM is the virtualization software which allows you to create virtual Oracle database servers. It does pretty much the same job as the more popular VMware. VMware aficionados will tell you it’s by far the better product compared to Oracle VM. However, what the VMware aficionados are less likely to tell you are the issues surrounding Oracle certification, licensing and support on VMware. Simply put, Oracle has not certified any of its products on VMware virtualized environments. If you only use a few CPU cores of a VMware ESX server for Oracle, you must license ALL the cores for Oracle, whether you use them for Oracle or not. Finally, if your VMware virtual Oracle database server runs into a problem, you have to reproduce the problem in a non-virtualized environment before Oracle Support will help. They take the view than until you’ve done that, the problem might be VMware related and that, by definition, is not Oracle’s problem. Don’t believe me? Check out Doc ID 249212.1 on the My Oracle Support web portal. So which virtualization software is the better option now? Click here to start the process of downloading Oracle VM. Note, you will need a login account to download Oracle software which can be created for free here.

Oracle Linux.

Oracle Linux is basically Red Hat Linux under the covers, but it is optimized for running Oracle products. Which makes it better. If you pay for Oracle Linux support, then you have the potential benefit of dealing with the same company for operating system issues and database issues. That can help avoid finger pointing and can help get you to a resolution faster than dealing with separate support organizations. You can start the Oracle Linux download process here.

Oracle VM Console.

When you create a virtual machine it obviously won’t have a physical console you can connect to. Accessing the console is done using software. The Oracle VM Console software comes in the form of a Linux rpm called  ovmcore-console and can be downloaded here.

Oracle Database 12c.

To create Oracle 12c databases you’re going to need the Oracle Database 12c software. You can start your downloads here. Note, you’ll need to download 2 zipped files for the database, 2 zipped files for Grid Infrastructure and if the mood takes you, either the 32 bit or 64 bit 12c client. Here’s a list of the files you’ll need:

File Type File Name
Oracle Database 12c Release 1 file #1 linuxamd64_12c_database_1of2.zip
Oracle Database 12c Release 1 file #2 linuxamd64_12c_database_2of2.zip
Oracle Database 12c Release 1 Grid Infrastructure file #1 linuxamd64_12c_grid_1of2.zip
Oracle Database 12c Release 1 Grid Infrastructure file #2 linuxamd64_12c_grid_2of2.zip
Oracle Database 12c Release 1 Client (32 bit) linux_12c_client32.zip
Oracle Database 12c Release 1 Client (64 bit) linuxamd64_12c_client.zip

Oracle Enterprise Manager Cloud Control.

Oracle Enterprise Manager Cloud Control provides a comprehensive management console with which to manage and maintain your Oracle infrastructure. There are 3 files which constitute Cloud Control 12c Release 5. They can be downloaded here.

File Type File Name
Oracle Enterprise Manager Cloud Control 12c Release 5 em12105_linux64_disk1.zip
Oracle Enterprise Manager Cloud Control 12c Release 5 em12105_linux64_disk2.zip
Oracle Enterprise Manager Cloud Control 12c Release 5 em12105_linux64_disk3.zip

Oracle Enterprise Manager Repository Database Template.

Oracle Enterprise Manager Cloud Control needs a repository in which to store information about the Oracle infrastructure. Wouldn’t you know it, the repository happens to be an Oracle Database. Who knew? A decent short cut to creating the repository database is to use a template. The template which works with Cloud Control 12c Release 5 and Oracle Database 12c Release 1 (12.1.0.2) can be downloaded here.

Oracle ASMlib rpm.

An easier and more convenient way to configure ASM disks on Linux is to use Oracle’s ASM library and support packages. The support package can be installed directly from the public Yum repository. The ASMlib package can be downloaded from here.

Oracle GoldenGate.

Oracle GoldenGate is data replication software which effectively replaces Oracle’s Advanced Replication and Streams technologies. It is a very flexible data replication tool offering one to one and one to many source to target data distribution models. It can also handle bi-directional data changes and data filtering at a very granular level. The best part is it can replicate data between different databases none of which have to be Oracle! Oracle GoldenGate can be downloaded here.

Openfiler.

You already know that it’s shared storage which effectively makes Oracle RAC work. Unless you want to drop $10K+ on your very own storage filer, you’re going to need an economic alternative to EMC, NetApp, etc. This is where Openfiler comes in. It can turn ordinary PC SATA drives into SAN or NAS storage. It runs on the shared storage filer computer and presents iSCSI targets to the Oracle Linux VMs which will ultimately become clustered ASM disks. Much more on that later in this series. Openfiler is totally awesome, but some people prefer FreeNAS. Personally I’ve never used it, so can’t vouch for it either way. I do know Openfiler works well in an Oracle RAC environment because I’ve used it many times before. You can download Openfiler here.

FileZilla.

I assume you’ll be storing all this downloaded software on your desktop or laptop workstation. If so, you’ll need to copy these files to other servers in your infrastructure. FileZilla is the way to do that.  I used to be a WinSCP fan until I discovered how much faster FileZilla is and haven’t looked back. You can download FileZilla here.

Putty.

Most of the time you’ll be able to use an X Windows terminal (xterm) to connect to the various servers in your infrastructure. However, a couple of servers in the infrastructure don’t run X Windows, so you’ll need an alternative way to login to them over the network. Those servers are the shared storage Openfiler machine and the Oracle VM Server machine. Connecting to servers without X Windows is what Putty is used for. It’s a bit primitive and basic, but it works. You can download Putty here.

ImgBurn.

Once you have downloaded all the ISO software images from Oracle, you’ll need to burn them to DVD. There are many ISO image writers to choose from. The one I use is called ImgBurn. It’s simple to use, reasonably fast and best of all, it’s free. Plus you get a witty one-liner at the bottom of the window each time you run it. You can download ImgBurn here.

X-Win32.

X-Win32 is an X Windows server for Windows. You’ll need it to run the Oracle Universal Installer on Linux from your Windows workstation. It’s the best X11 emulator for Windows because it is simple to install and setup and is much cheaper than its main competitors like Reflection X and Exceed. For non-commercial personal use, the license is around $120 with paid maintenance being around $20 per year after that. There is a 30 day free trial available if you just want to check it out.

If you don’t want to spend the money, there is an alternative option called Cygwin which is free. To install it and get it working properly seems to require super human patience, luck and some ancient ritual similar to voodoo. Trust me, it’s a pain. I was also recently reminded about another free X Windows option in the form of Xming. I remember using this in the dim and distant past, so figured I’d give it another go. After messing with Putty, X11 forwarding, tunneling and the DISPLAY variable for what felt like a week, I got rather tired of fighting with it. More recently, another option has emerged called VcXsrv which seems half decent. YMMV.

The relatively small amount of money you’ll pay for X-Win32 makes it totally worth it. You can get X-Win32 here. There are some who prefer to use VNC to access server consoles directly over the network. Don’t get me started on why that’s not a good idea!

So there you have it. All the software you’ll need to build out your Oracle infrastructure. In Part 3, we’ll take a look at installing the Oracle VM software. Stay tuned for updates.

If you have any comments or questions about this post, please use the Contact form here.

Build Your Own Oracle Infrastructure: Part 1 – Hardware.

If you are interested in setting up your own Oracle infrastructure, this series is for you!

Over the course of 14 installments I will describe what I did and how I did it, along with some useful tips and tricks to help get things done.This is for educational purposes only, but much of what is presented readily translates to real world production systems.

Before we get into the details, let’s cover some basic terms of reference in the form of 3 questions.

Q1. What do I mean by an Oracle infrastructure?

Well, aside from knowing and understanding the Oracle DBA role in a general sense, for me there are 9 Oracle technologies/configurations which Senior Oracle DBAs like myself should aspire to know and know well. They cover the essentials of the operating system, administration, backup/restore, High Availability (HA), Disaster Recovery (DR), data replication, networking, storage, virtualization and of course, the database itself. Those 9 technologies/configurations are:

  • Oracle VM
  • Data Guard
  • GoldenGate
  • Oracle Linux
  • Oracle Database
  • Recovery Manager
  • Grid Infrastructure
  • Real Application Clusters
  • Oracle Enterprise Manager

In this series I will cover all of these from an installation, setup and configuration point of view. For some of them, I’ll also perform some functionality testing to make sure they do what they’re supposed to do. This will be useful when writing test plans for the real world.

Q2. Why bother?

Why bother doing anything? For me, being an Oracle DBA is not just my job. It’s what I do. I strive to be the best DBA I can be and that means research and practice. Some people, particularly IT Managers with those elusive training budgets, seem to think DBAs acquire skills and knowledge through osmosis. It’s true that DBAs do have super powers, but osmosis is not one of them! Unfortunately, understanding something and getting good at it takes practice and Oracle is no different. This series serves as my way of researching and practicing some of the most important Oracle technologies and configurations. It has already helped me pass the Oracle Certified Professional Database Administrator for Oracle Database 12c upgrade exam. I may even push on and take other OCP exams using what I learned here. My point is, be your own expert. Don’t rely upon or hang on every word of the self-appointed ‘experts’ and ‘know-it-alls’ of the Oracle industry. As Nike say, “Just do it”!

Q3. Why do it this way?

There are cheaper and easier ways to achieve the same things I set out to do. Things like Oracle VM templates and Oracle VM Virtualbox provide a quicker point-and-click way to get something done fairly rapidly. If speed is your thing, those resources are great. If understanding is your thing, then you’ll need to do things the old fashioned way by getting your hands dirty. You’ll emerge on the other side knowing and understanding way more than if you simply used the short cuts from the beginning. Once you actually understand what is going on under the covers, by all means transition to using those short cuts. One of my goals was to understand these technologies better and you can only really do that effectively by actually doing it. Not by reading about it. Not by attending presentations. Not by taking short cuts and not through osmosis!

Hardware Summary.

Here’s a summary of the hardware I used for this series. Some of this hardware I already had and some I had to buy. You won’t need to use exactly what I used and you may find cheaper alternatives which will work just as well. Other items you may choose not to use at all. Your choice. With that said, I think it’s often interesting to know exactly what someone else used and more importantly, why they used it.

Link To Component Condition Approximate Cost
Oracle VM Server Used $1,500
Oracle Database 12c & Oracle VM Manager Server New $260
Shared Storage Server New $220
Gigabit Network Switch #1 New $70
Gigabit Network Switch #2 Used $20
4 Port USB/PS2 KVM Used $30
LCD Screen Used $20
PS/2 Keyboard Used $5
USB Mouse with PS/2 adapter Used $5
UPS #1 New $380
UPS #2 New $200
Cat 6 Network Patch Cables New $20
Shelving Unit New $250
Box Fan New $20
TOTAL (Approximate) $3,000

Oracle VM Server.

  • Product : HP ProLiant DL380 G7
  • CPU : Dual 2.66 GHz Quad Core Xeon E5640
  • RAM : 72 GB (2019 upgrade to 144 GB for $250)
  • Networking : HP NC382i Dual Port Gb Server Adapters (4 Ethernet ports total)
  • Storage : HP Smart Array P410i RAID Controller, 2 x 72 GB + 6 x 300 GB SAS 10K HDs (8 HDs total)
DL380-1

This is the heart of the system, so it was important to get this right. When I first started working with Oracle Database 12c, I quickly realized it’s not available for 32 bit Linux. That rendered several of my older PCs redundant. My other PCs which could run 64 bit software did not fare much better. Let’s just say, a 2.66 GHz Pentium D CPU with 3 GB RAM and a 7.2K SATA desktop drive doesn’t get the job done. At least not very quickly. For example, I ran the DBUA to upgrade an 11.2 database to 12.1 and it took over 6 hours to complete. Who has that kind of time? Not me!

I could have bought new motherboards, CPUs and memory for these aging PCs and rebuilt my physical Oracle Database 11g RAC system with Oracle Database 12c. However, that wouldn’t have given me the opportunity to work with Oracle VM again. Plus I’d still have way too many PCs at home which all need cooling, all need a UPS outlet and all need to be stored somewhere. I also considered buying a customized super PC with lots of drives, lots of memory and lots of CPU. Something capable of running up to the 8 Linux VMs I had in mind for this project. However, that option quickly became very expensive. Some quotes I got were over $3,000!

Then I had the brilliant idea of tapping into the refurbished server market. Ever wondered what happens to servers when they go out of warranty and are replaced by a newer generation of server? No, neither did I, but it turns out companies buy them, refurbish them and sell them on. Who knew? Makes sense since solid state technology doesn’t wear out that quickly and there’s basically nothing wrong with the hardware other than the OEM won’t warranty it. The parts which do wear out, the hard drives, are easily replaced. HP branded hard drives can be purchased from a variety of sources including eBay and Amazon. The 72 GB drives I use cost between $10 and $20 per drive. Not bad. The 300 GB drives are slightly more expensive at between $25 and $40. Still, not bad.  Note, if you intend to configure more than one LUN using the internal drives and trust me you will, make sure you buy additional memory for the HP P410i RAID controller. Without its own memory, the P410i only supports one LUN.

My research turned up a fantastic company called Orange Computers. Using their website’s system builder feature, I was able to put together a customized specification for an HP ProLiant DL380 G7 for around $1,500. That’s still a lot of money, but consider what you’re getting. Server class hardware, multiple built in redundancies, designed to run 24x7x365 and guaranteed compatibility. This last point is extremely important. Oracle VM and Oracle Linux isn’t guaranteed to support every single combination of CPU, motherboard, NIC, storage array, etc. If you’re going to sink some serious cash into a system to run Oracle VM and Oracle Linux, wouldn’t you want to know for sure it’ll work rather than just hoping it will?

Oracle has an Oracle Linux and Oracle VM Hardware Certification List. It’ll tell you if your name brand system will fly. For me, the HP ProLiant DL380 G7 checked all the right boxes. Orange Computers can also sell you an extended warranty and have their own in house technical support. They are super easy to deal with and go the extra mile to ensure you get what you need. I highly recommend them.

As of 2019, depending upon the hardware configuration you want, you can acquire DL380 G7s for less than $1,000.

Oracle Database 12c & Oracle VM Manager Server.

acer_powers285

I gutted one of my older PCs and bought a new motherboard, CPU, RAM and an SSD. The CPU is pretty decent for what I need it for and the motherboard provides hardware RAID configuration options.The 16 GB of RAM is more than what is required for Oracle VM Manager, but this server will also double as a regular database server when the Oracle VM Server is not in use. Since I had plenty of spare HDs, I used the SSD drive as the boot/OS drive and the 2 HDs configured as a RAID 1 array. I’ve had good performance and reliability from the Samsung 840 and now the 850 EVO series of SSDs. I got them from Amazon for $49.99. They seem to have lightening sales on things like this every now and then. Look out for them. I’ve read about Linux compatibility issues with some PCI NICs, but Intel seem to be well supported, so I stick with them. I got the rest of the components from my local Micro Center. Their customer service has improved to the point of actually being useful. I always like to my purchases verified for compatibility. Newegg.com can do this too, but they want to charge you for the advice. Seriously! Note, you will most likely need a 2.5” to 3.5” mounting bracket for the SSD.

Shared Storage Server.

acer_powers285

I gutted another one of my older PCs and bought a new motherboard, CPU, RAM and two SSDs. The CPU is pretty decent for what I need it for and the motherboard provides hardware RAID configuration options. I already had the 2 Western Digital HDs, so configured them as a RAID 1 array. These were the basis of the shared storage for my previous Oracle Database 11g RAC setup and were purchased at a time before SSDs were affordable. Speed is important for these drives, hence the 10K rpm specification. For your own setup, disk capacity is probably not the issue but speed will be. I used one of the SSDs for the boot/OS drive and the other is used for database storage. I did want to try an SSD RAID 1 array, but when I went back to Amazon to snag more Samsung 850 EVO SSDs for $49.99 a piece, they’d sold out! I guess plenty of other people realized what a steal that was. Lesson learned – buy more next time you see them heavily discounted. They really are excellent drives. In truth, this system needs little memory and I’ve run it previously with 4 GB and it worked fine. It has 8 GB now because I initially bought a 1 x 4GB DIMM, not 2 x 2 GB DIMMs. Duh! It was less hassle just to buy an additional 4 GB DIMM. For best performance, DIMMs should be used in pairs of equal size.

Gigabit Network Switch #1.

Product : D-Link 16-Port Gigabit Switch (DGS-1016A)

DLink-16-port

I already had this switch. It is used for public and VM management traffic. You can still buy this new for around $70, almost half what I paid for it just a couple of years ago. Sixteen ports is overkill for this project. An 8 port switch will  suffice and will typically be about half the cost. D-Link make a decent looking 8 port switch which I don’t have as does TRENDnet which I do have. It has a metal case too. Nice.

Gigabit Network Switch #2.

Product : D-Link DGS-2208 8-Port 10/100/1000 Desktop Switch

DLink-8-port

I already had this switch. It will be used for the shared  storage traffic. This is an old switch, but is still going strong. The 8 ports are more than enough and you can pick up a used one for around $20. If you’re going to buy new switches for this project, you may as well get a couple of the newer D-Link 8 port switches and save yourself between $20 and $30 on my estimate for network switches.

4 Port USB/PS2 KVM.

Product : Cables To Go 4 Port USB PS2 KVM, model #35555

KVM

I already had this KVM. It is used to access the console of the HP DL380, the Oracle VM Manager computer and the shared storage filer computer. It’s an old KVM which you can buy used for around $30. I bought an updated version of this KVM a couple of years ago, but it’s not as well behaved as this one. For this project you will need to get into the BIOS of all 3 computers. To do that you typically need to press a specific key as the computer boots up. While connected to a computer’s console via the newer KVM, it routinely ignored my key stroke during boot up. Tres annoying. The older KVM didn’t have that problem so I stuck with that one. Your mileage may vary.

LCD Screen.

Product : ViewSonic VA503b

viewsonic

I already had this screen. It doesn’t really matter what screen you use as long as it has a VGA connection and plays nicely with your KVM. It doesn’t have to be that fancy either since you won’t be spending that much time working with this screen. It makes me cringe to think I paid $150 for this screen back in 2006. I found a refurbished one on eBay for $20. It is a nice screen though. ViewSonic make decent gear.

PS/2 Keyboard.

Product : Gateway KB0532

gateway-kbd

I already had this keyboard left over from an old Gateway PC I used to have.

The important point about this keyboard is it has a PS/2 style connector which plugs directly into the back of the KVM. That’s important because it guarantees your boot up key stroke will be recognized when you’re trying to get into the computer BIOS.

USB keyboard key strokes can be ignored if the USB drivers are not loaded early enough in the boot up sequence. That can prevent you from getting into the BIOS and will ultimately lead to expletives and threats of physical violence against an inanimate object. Any PC keyboard with a PS/2 style connector should do the trick, but you can pick one of these up pretty cheaply.

USB Mouse.

Product : HP USB Mouse P/N: 505062-001 Rev.A

hp-mouse

I already had this mouse left over from my HP desktop. It is the cheapest and nastiest mouse ever. The sort of thing you might expect to find in a Christmas cracker, but hey it works.

I have this connected to a USB port on the front of the KVM. I have a USB/PS2 adapter for it, but when I use that to connect it to the KVM, it doesn’t work. Weird. Literally any USB mouse should work.

UPS #1.

Product : Tripp Lite SMART1500SLT 1500VA 900W

tripp-lite_smart1500slt_front

I already had this UPS. It provides 8 outlets all of which are protected and have battery backup. I use it for the HP DL380 and the network switches. I am a little paranoid about noise, heat and dirty power. This unit scores high on only two of those since it is a little noisy due to the rear panel fan. It is also quite heavy. That said, all 8 outlets provide the same functionality so you don’t have to choose between just surge protection or surge and battery protection. Personally I wouldn’t buy another one. Instead I’d buy another CyberPower.


In 2018, I replaced this with another CyberPower CP1500PFC LCD which was only slightly more expensive than replacing the failed battery in this Tripp Lite unit.

UPS #2.

Product : CyberPower CP1500PFCLCD Sinewave USP 1500VA 900W

cyberpower-ups

I bought this additional UPS because I didn’t want to overload the Tripp Lite unit. I really like these CyberPower units and have several of them. They are much smaller and lighter than the Tripp Lite. They also clean the power, are completely silent and have a small LCD screen which displays the voltage and battery load.

Only half of the 10 outlets provide battery backup as well as surge protection, but that’s enough for the OVM Manager and shared storage filer computers plus the KVM and LCD screen.

Cat 6 Network Patch Cables.

Products : Cable Matters 5-Pack of 3 feet Cat6 Patch Cables, Cable Matters 5-Pack of 5 Feet Cat6 Patch Cables

cat6

I already had plenty of patch cables and a total of 6 are needed for this system. These come in packs of 5 and are very reasonably priced. You may as well get 2 packs of different lengths. That way you can choose the appropriate length for each connection and have some cables left over which you’re bound to use at some point.

Shelving Unit.

Products : 3 x InterMetro 18”x48” Solid Shelf, 2 x InterMetro 18”x48” Wire Shelf, 4 x InterMetro 62.5” Post, 1 x InterMetro Swivel Caster Set

shelving

I get this stuff from The Container Store and it is totally awesome. I already had most of it, but bought an additional wire shelf so I could position the HP DL380 at the right height for the box fan.

The HP DL380 is obviously a rack mount server and since I don’t have a purpose built server rack, these shelves are a perfect alternative.

Box Fan.

Product : Lasko 20” 3 Speed Box Fan

boxfan

I already had this fan. Did I mention my paranoia about heating and cooling? You can often pick up these types of fan from your local grocery store or favorite DIY outlet for very little money. They’re not silent even on the lowest setting, but they do provide great air flow over quite a large area. They’re also incredibly cheap to run.

Depending upon your system’s location and proximity to air conditioning, you may not even need it.

So there you have it, all the hardware you’ll need to build your own Oracle infrastructure.

As I mentioned earlier, you won’t necessarily have to use all the equipment I used as specified. Cheaper and reduced specification options are available, but hopefully this gives you some idea of what you’ll need to make everything work successfully.

It was a lot of fun putting this equipment together. Click on the thumbnail right to see what it all looks like when assembled. Nice!

In Part 2, we’ll cover all the software you’ll need to build your own Oracle infrastructure. Stay tuned for updates.

If you have any comments or questions about this post, please use the Contact form here.

X-Win32

xwin32productpagelogo

 

 

 

 

 

X-Win32 is a fully loaded X Windows server environment for Microsoft Windows available from StarNet.

It’s simpler to use, has greater functionality and is cheaper than other similar products. I use it and you should too!

Use the following links to jump to the item you need.

Index:

 

Upgrading & the License Issue:

Go to license.starnet.com/activate, enter the key and HostID of your PLC (located in X-Win32 Help-About).

This creates a new license file. Put it in the X-Win32 program directory making sure it has a .LIC file extension.

 

Upgrading & the Default Program Issue:

If you have X-Win32 login shortcuts on your desktop, they might not open with the latest version of X-Win32 after you upgrade. To fix this, open a Windows registry editor (e.g. REGEDIT) and go here:

HKEY_CLASSES_ROOT\xw32_auto_file\shell\command

Edit the Default value to reflect the path of the latest installed version of X-Win32. For example,

"C:\Program Files (x86)\StarNet\X-Win32 2014\xwin32.exe" "%1"

 

 

Oracle Linux Tips

oracle-linux

A modest collection of Linux commands, procedures and shortcuts useful for Oracle DBAs.

Applicable to the Oracle Linux version as noted.

 

Quick links to all the tips:

Boot Kernel Order – Change:

There are a number of different kernels installed when you install and update an Oracle Linux installation. Sometimes the default kernel is not the one you want to boot from. You can select a different one from the boot menu (if you’re quick) or you can change the default boot kernel.

For Oracle Linux 7:

To find out the name of the current default boot kernel:

[root@orasvr02 ~]# grubby --default-kernel
/boot/vmlinuz-4.14.35-1902.6.6.el7uek.x86_64

To see all the currently installed kernels:

[root@orasvr02 ~]# grubby --info=ALL | grep "kernel="
kernel=/boot/vmlinuz-4.14.35-1902.6.6.el7uek.x86_64
kernel=/boot/vmlinuz-3.10.0-1062.4.1.el7.x86_64
kernel=/boot/vmlinuz-4.14.35-1902.2.0.el7uek.x86_64
kernel=/boot/vmlinuz-4.14.35-1818.3.3.el7uek.x86_64
kernel=/boot/vmlinuz-3.10.0-957.21.3.el7.x86_64
kernel=/boot/vmlinuz-3.10.0-957.el7.x86_64
kernel=/boot/vmlinuz-0-rescue-63baed2ed4f048d39b33bfef94a1602f

To set a new default boot kernel, then check it is the new default:

[root@orasvr02 ~]# grubby --set-default /boot/vmlinuz-3.10.0-1062.4.1.el7.x86_64

[root@orasvr02 ~]# grubby --default-kernel
/boot/vmlinuz-3.10.0-1062.4.1.el7.x86_64

Loopback Mount for an ISO File – Create:

# mount -o loop /path_to_file.iso /mount_point_dir

Mount a CD/DVD:

You need to know the device path. Sometimes it’s /dev/cdrom. Sometimes it’s /dev/sr0.

# mount -t iso9660 /device_path /mount_point_dir

Public Oracle yum Repository – Create:

For Oracle Linux 6:

# cd /etc/yum.repos.d 
# wget http://public-yum.oracle.com/public-yum-ol6.repo

X Windows Client Programs – Install:

# yum install xterm

Oracle Database Preinstall rpm – Install:

For Oracle Database 12c Release 1:

# yum install oracle-rdbms-server-12cR1-preinstall.x86_64

For Oracle Database 12c Release 2:

# yum install oracle-database-server-12cR2-preinstall

For Oracle Database 18c:

# yum install oracle-database-preinstall-18c

For Oracle Database 19c:

# yum install oracle-database-preinstall-19c

Ethernet Port Down/Non-operational – Start:

# ifconfig eth2 up     (where eth2 is the port name)

File System with Minimal Superuser Overhead – Create:

# mkfs -t ext4 -m 0 /dev/xvdc1 (where /dev/xvdc1 is the partition name)

Network Interface Configuration Issues – Diagnose:

Sometimes the installation of Grid Infrastructure (GI) does not show all the network interfaces. This can be down to not having configured an interface during the Linux install. All seems OK when you run the “ifconfig -a” command, but under the covers, all might not be well.

Each interface has an interface configuration file called ifcfg-eth*. They are located in:

/etc/sysconfig/network-scripts

It is possible the interface not being listed during the GI install does not have a configuration file. Using the system-config-network utility won’t create it either and returns an error when trying to configure the interface.

A new interface configuration file can be created by copying an existing one and renaming it for the interface you’re trying to configure. You will need to edit some of the entries to make it specific to the interface you’re working on. Here’s a typical configuration file:

DEVICE=eth1 <-- this needs changing
TYPE=Ethernet
UUID=e8347ba9-9e19-4484-9191-95fdc9fc2a4c <-- this needs changing
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
HWADDR=00:21:f6:0c:04:19 <-- this needs changing
IPADDR=200.200.10.11 <-- this needs changing
PREFIX=24
NETMASK=255.255.255.0
USERCTL=no

The trick is to generate a UUID for the network interface. This is done with the uuidgen command:

# uuidgen eth1  (where eth1 is the name of the port you're interested in)

Linux Firewall – Turn Off:

For Oracle Linux 6:

The Linux firewall still being up and running can cause a variety of errors when installing and configuring Oracle Grid Infrastructure. Again, when working on the Specify Network Interface Usage screen of the GI installation, an active firewall can cause this error:

[INS-41112] Specified network interface doesn’t maintain connectivity across cluster nodes

Running this pre-check can also generate all sorts of unpleasant output:

[grid@racnode1 grid]$ ./runcluvfy.sh comp nodecon -n racnode1,racnode2 -verbose

To verify the Linux firewall is still active and to shut it down, run these commands:

# service iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num  target     prot opt source      destination         
1    ACCEPT     all  --  0.0.0.0/0   0.0.0.0/0    state RELATED,ESTABLISHED
2    ACCEPT     icmp --  0.0.0.0/0   0.0.0.0/0           
3    ACCEPT     all  --  0.0.0.0/0   0.0.0.0/0           
4    ACCEPT     tcp  --  0.0.0.0/0   0.0.0.0/0    state NEW tcp dpt:22
5    REJECT     all  --  0.0.0.0/0   0.0.0.0/0    reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
num  target     prot opt source      destination         
1    REJECT     all  --  0.0.0.0/0   0.0.0.0/0    reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source      destination
# service iptables stop
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:                               [  OK  ]

# chkconfig iptables off

For Oracle Linux 7:First, verify the status of the firewall:

[root@orasvr01 ~]# systemctl status firewalld
 ● firewalld.service - firewalld - dynamic firewall daemon
    Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
    Active: active (running) since Sat 2019-06-29 12:33:58 CDT; 1 day 22h ago
      Docs: man:firewalld(1)
  Main PID: 4166 (firewalld)
    CGroup: /system.slice/firewalld.service
            └─4166 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
 Jun 29 12:33:57 orasvr01.mynet.com systemd[1]: Starting firewalld - dynamic firewall daemon…
 Jun 29 12:33:58 orasvr01.mynet.com systemd[1]: Started firewalld - dynamic firewall daemon.

This output shows the firewall us up and running. To stop the firewall and keep it stopped, use these commands:

[root@orasvr01 ~]# systemctl stop firewalld.service
[root@orasvr01 ~]# systemctl disable firewalld.service
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

Re-check the firewall status:

[root@orasvr01 ~]# systemctl status firewalld
 ● firewalld.service - firewalld - dynamic firewall daemon
    Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
    Active: inactive (dead)
      Docs: man:firewalld(1)
 Jul 01 11:48:19 orasvr01.mynet.com systemd[1]: Starting firewalld - dynamic firewall daemon…
 Jul 01 11:48:20 orasvr01.mynet.com systemd[1]: Started firewalld - dynamic firewall daemon.
 Jul 01 12:01:28 orasvr01.mynet.com systemd[1]: Stopping firewalld - dynamic firewall daemon…
 Jul 01 12:01:29 orasvr01.mynet.com systemd[1]: Stopped firewalld - dynamic firewall daemon.

Reboot then check again:

[root@orasvr01 ~]# systemctl status firewalld
 ● firewalld.service - firewalld - dynamic firewall daemon
    Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
    Active: inactive (dead)
      Docs: man:firewalld(1)

Hostname – Change:

The hostname of the server is stored in this file:

/etc/sysconfig/network

The relevant line is:

HOSTNAME=<current_value>

Changing it here will not make it permanent. To do that, run this command then reboot:

# sysctl kernel.hostname=<hostname.domain>

SE Linux – Disable:

To check if SE Linux is enabled, there are a couple of tests you can perform. First, try running the id command:

[root@racnode1 ~]# id
uid=0(root) gid=0(root) groups=0(root) 
context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

If the output contains the line, “context=…”, then SE Linux is enabled. You can also run the getenforce command:

[root@racnode1 ~]# getenforce
Enforcing

If the command returns “Enforcing” then SE Linux is enabled. Good news, this is easy to fix. Simply edit the /etc/selinux/config file.

[root@racnode1 ~]# vi /etc/selinux/config

Change this line:

SELINUX=enforcing

To this:

SELINUX=disabled

After you save the file, reboot for the change to take effect.

Network Manager – Disable:

The Linux Network Manager has an annoying habit of overwriting the /etc/resolv.conf file each time the network service is started. If you make some custom changes to this file, you don’t want this file overwritten. The simplest and most effective way to stop this from happening is to convince the Network Manager to stay dead.

First, check if the Network Manager service is up and running:

[root@racnode1 ~]# service NetworkManager status
NetworkManager (pid 1902) is running...

If it’s running, stop it and keep it stopped with these commands:

[root@racnode1 ~]# service NetworkManager stop
Stopping NetworkManager daemon:                            [OK]

[root@racnode1 ~]# chkconfig NetworkManager off

Finally, lock down the /etc/resolv.conf file by making it read-only:

[root@racnode1 ~]# chattr +i /etc/resolv.conf

Note: To reverse the chattr command, use this command:

[root@racnode1 ~]# chattr -i /etc/resolv.conf

Wipe Data on Disk Using dd:

The dd command is a useful way to wipe (overwrite with zeros) data on disk. This can be especially useful when you need to overwrite ASM disk headers:

if : input file (/dev/zero)

of : output file (the file which needs to be wiped)

bs: read and write this number of bytes at a time

count : copy this number of input blocks

[root@racnode1 ~]# dd if=/dev/zero of=/dev/iscsi/asm-disk01 bs=100 count=1000

TCP and UDP Ports In Use – Show:

Sometimes you need to know which ports are being used on a Linux server.

[root@oraemcc ~]# netstat -antu

The Local Address column shows IP Address:PORT

Swap File – Add:

A quick and easy way to increase the swap space on a Linux server is to add a swap file.

First, find out how much swap you have:

[root@racnode1 /]# swapon -s
Filename                                Type            Size    Used    Priority
/dev/dm-1                               partition       4194300 0       -1

[root@racnode1 /]# swapon --show
Filename                                Type            Size    Used    Priority
/dev/dm-1                               partition         4G      0B    -1 

Then create an empty file of the desired size using the dd command. The bs (Block Size) parameter multiplied by the count parameter gives you the size the file will be in bytes.

For example, 1024 x 1048576 = 1073741824 bytes (or 1 GB):

[root@racnode1 /]# dd if=/dev/zero of=/swapfile count=1024 bs=1048576
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 2.89133 s, 371 MB/s

[root@racnode1 /]# ls -l /swapfile
-rw-r--r-- 1 root root 1073741824 Feb  3 12:30 /swapfile

Next, tell Linux this file is a swap file using the mkswap command:

[root@racnode1 /]# mkswap -c /swapfile
mkswap: /swapfile: warning: don't erase bootbits sectors
        on whole disk. Use -f to force.
Setting up swapspace version 1, size = 1048572 KiB
no label, UUID=58babb34-0057-407d-a149-1530f7a8b3b3

Then add the swap file to the system swap:

[root@racnode1 /]# swapon /swapfile

Check the new swap file is part of the system swap:

[root@racnode1 /]# swapon -s
Filename                                Type            Size    Used    Priority
/dev/dm-1                               partition       4194300 340556  -1
/swapfile                               file            1048572 0       -2

Finally, add the swap file to the /etc/fstab file so it comes back after system re-starts:

/swapfile       swap    swap   defaults     0 0

Disk Usage Sorted by Size:

Sometimes we need to reclaim disk space. The best place to look for things to delete is in the directory using the most disk. This command will list the required number of sub-directories (–max-depth) in descending MB (-m) order:

[oracle@racnode1 oracle]$ du -m --max-depth 2 | sort -rn

IPv6 Addressing – Remove:

You can confirm the presence of IPv6 addressing by checking the output of the ifconfig command. For example:

[root@racnode1 ~]# ifconfig eth0
eth0     Link encap:Ethernet HWaddr 00:21:F6:04:42:98
         inet addr:200.200.10.11 Bcast:200.200.10.255 Mask:255.255.255.0
         inet6 addr: fe80::221:f6ff:fe04:4298/64 Scope:Link
         inet6 addr: 2002:4b49:1933:0:221:f6ff:fe04:4298/64 Scope:Global
         UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
         RX packets:529808 errors:0 dropped:46361 overruns:0 frame:0
         TX packets:43797 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:79241367 (75.5 MiB) TX bytes:18208947 (17.3 MiB)

The clues are the lines beginning with “inet6”. To disable IPv6 across the board, add the following line to the /etc/sysctl.conf file:

[root@racnode1 ~]# vi /etc/sysctl.conf

# disable IPv6 support on all network interfaces:
net.ipv6.conf.all.disable_ipv6 = 1

If you only wanted to disable IPv6 support for a specific interface, for example eth0, then the entry in /etc/sysctl.conf would look like this:

# disable IPv6 support on the eth0 network interfaces:
net.ipv6.conf.eth0.disable_ipv6 = 1

To have this change take effect, either reboot or run this command:

[root@racnode1 ~]# sysctl -p /etc/sysctl.conf

To confirm the change has taken effect, re-run the ipconfig command:

[root@racnode1 ~]# ifconfig eth0
eth0     Link encap:Ethernet HWaddr 00:21:F6:04:42:98
         inet addr:200.200.10.11 Bcast:200.200.10.255 Mask:255.255.255.0
         UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
         RX packets:6481 errors:0 dropped:456 overruns:0 frame:0
         TX packets:464 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:1277621 (1.2 MiB) TX bytes:92893 (90.7 KiB)

Hardware Information – Display:

We often need to determine the size of the server hardware we’re dealing with. That really boils down to the manufacturer make and model, CPU configuration and installed RAM.

Manufacturer Make & Model:

As the root user, run this command:

[root@racnode1 ~]# dmidecode | grep -A3 '^System Information'

On physical hardware, the output will look something like this:

System Information
    Manufacturer: HP
    Product Name: ProLiant DL380 G7

On virtual hardware like Oracle VM, the output will look something like this:

System Information
    Manufacturer: Xen
    Product Name: HVM domU
    Version: 4.3.1OVM

CPU Configuration:

Save these commands to a script and run it as root:

#!/bin/sh

SOCKETS=`cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l` 
CORES=`cat /proc/cpuinfo | grep "cpu cores" | uniq | awk '{ print $4; }'` 
HYPTHREAD=`cat /proc/cpuinfo | grep "^processor" | wc -l` 
 
#echo $SOCKETS 
#echo $CORES 
#echo $HYPTHREAD 
echo This system has $SOCKETS Sockets, $CORES cores per socket, for a total of $HYPTHREAD cpu threads

Installed RAM:

There are a number of ways to determine the amount of RAM installed. Some include:

[root@racnode1 ~]# free -m

             total used free shared buffers cached
Mem:          5968 5738  229   2234     257   3082
-/+ buffers/cache: 2399 3569 
Swap: 4095 4 4091
[root@racnode1 ~]# cat /proc/meminfo

MemTotal:        6111812 kB
MemFree:          179764 kB
...
[root@racnode1 ~]# top

top - 12:48:54 up 4 days, 15 min, 1 user, load average: 1.53, 1.75, 1.84
Tasks: 339 total, 1 running, 338 sleeping, 0 stopped, 0 zombie
Cpu(s): 73.5%us, 10.7%sy, 0.0%ni, 14.1%id, 0.0%wa, 0.0%hi, 0.3%si, 1.3%st
Mem:  6111812k total, 5917664k used, 194148k free, 263668k buffers
Swap: 4194300k total, 4512k used, 4189788k free, 3156768k cached

Note, on a Windows Server the equivalent information can be obtained by running the command MSINFO32 at a Command Prompt. This will open up a System Information window which will show all the relevant details about the hardware and operating system.

sudo – Configuring for oracle.

The oracle user needs to run certain commands/scripts as the root user. The simplest way to achieve that without having access to the root password is to configure sudo for the oracle user. To do that, you need to edit the /etc/sudoers file. You can edit this file directly or to have your changes verified, use this instead:

[root@orasvr01 ~]# visudo

Scroll down to the section which contains this entry:

## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL

Add this line to the file, then save it:

oracle  ALL=(root)      ALL

This has the effect of allowing the oracle user to assume the identity of the root user [ALL=(root)] and execute any command as root [ALL]. The oracle user can then become the root user or run commands as the root user. For example:

[oracle@orasvr01 ~]$ sudo -u root -s

[root@orasvr01 oracle]# id
uid=0(root) gid=0(root) groups=0(root)

[oracle@orasvr01 ~]$ sudo useradd -u 1002 -g oinstall -G dba,backupdba,dgdba,kmdba,racdba,asmdba,oper sean

[oracle@orasvr01 ~]$ fgrep sean /etc/passwd
sean:x:1002:1000::/home/sean:/bin/bash

Note, the first time the oracle user attempts to use sudo, the system will prompt for the oracle password. After that, you should be fine.