Wednesday, August 24, 2011

HowTo: Setup VirtualBox 4.1 Server on OEL6

Back in 2010, I wrote about how to setup an Oracle Enterprise Linux (v5.x) server for hosting VirtualBox virtual machines.  This post looks at the same goal but for Oracle Enterprise Linux 6 update 1 (OEL 6u1) with VirtualBox 4.1.  There are only a few subtle changes that reflect simplifications from the previous methods as well as updating for particulars for OEL 6u1 and VirtualBox 4.1.

1. Download Oracle Enterprise Linux 6u1 (OEL 6u1) ISO image from E-Delivery and burn it to a DVD.
2. Install OEL using the desktop template and configure for your network.
3. Subscribe to public-yum.oracle.com by running the following:
     wget -qO - http://public-yum.oracle.com/public-yum-ol6.repo \
       | sed -e "s/enabled=0/enabled=1/g" > public-yum-ol6.repo
4. Determine the kind of kernel that you have in order to know which kernel code and headers to download by running uname -r.  In my case, the resulting kernel is 2.6.32-100.34.1.el6uek.x86_64.
5. Install the pre-requisite software for compiling the VirtualBox drivers: SDL, gcc and the correct kernel source and headers.  In my case, the following works.
     yum install -y SDL gcc kernel-uek-headers kernel-uek-devel
6. Download VirtualBox install image for OEL 6 and the VirtualBox Extension Pack from VirtualBox.org.
7. Install the downloaded VirtualBox image with the following.
     rpm -i VirtualBox*.rpm
8. Install the VirtualBox Extension Pack with the following.
     VBoxManage extpack install *extpack
9. [Optional] Remove gcc and requisite packages with the following.
     yum remove -y SDL gcc kernel-uek-headers kernel-uek-devel
10. [Optional] Disable SELinux by setting SELINUX=disabled in /etc/selinux/config.
11. [Optional] Disable the un-necessary services.
     chkconfig --level 0123456 abrtd off
     chkconfig --level 0123456 avahi-daemon off
     chkconfig --level 0123456 bluetooth off
     chkconfig --level 0123456 cups off
     chkconfig --level 0123456 nfslock off
     chkconfig --level 0123456 rhnsd off
     chkconfig --level 0123456 rpcgssd off
     chkconfig --level 0123456 rpcidmapd off
     chkconfig --level 0123456 postfix off
     chkconfig --level 0123456 xfs off
12. [Optional] Install VNC server and client for remote desktop management.
      yum -y install tigervnc-server tigervnc
      useradd user1; useradd user2; useradd user3
      Set passwords for user1, user2, and user3 with passwd.
      Setup VNC desktops for user1, user2, and user3 on the OEL server.
      echo >> /etc/sysconfig/vncservers <
VNCSERVERS="1:user1 2:user2 3:user3"
VNCSERVERARGS[1]="-geometry 1024x768"
VNCSERVERARGS[2]="-geometry 1024x768"
VNCSERVERARGS[3]="-geometry 1024x768"
EOF
      chkconfig --level 23456 vncserver on
14. Reboot with "init 6"

At this point the server is ready host VirtualBox virtual machines.  You can use the graphical display (e.g. VirtualBox) or the command line interface to add and manage your VirtualBox virtual machines.

With VNC setup, you can securely connect to the VNC desktops via ssh.  For example, you can connect via ssh and send the vncviewer back to your X11 display.
     ssh -X username@remoteserver /usr/bin/vncviewer 127.0.0.1:5901

Or you can just forward the VNC port back to your desktop with ssh / putty and use a local VNC client to connect to the desktop.
     ssh -L 5901:127.0.0.1:5901 username@remoteserver
     vncviewer 127.0.0.1:5901

Enjoy!

Brad
If this information has helped you, please consider helping me through investing in your health and in the health of those you love through purchasing Mannatech wellness products. Ambrotose is the key ingredient of all Mannatech Wellness products.  Place your order at my Mannatech Web Store today.

PS: As always, the sample scripts provided are for reference and are not supported in any way.

Tuesday, August 23, 2011

Pavlov's passwords

Perhaps you have heard of Pavlov's Dog.  If Pavlov were alive today, what sorts of conditioning might he apply to help humans memorize their passwords?  This video may shed some light on the subject.

Thank goodness there are better ways for managing passwords. ;-)

Have a great day!

Brad