Install Ruby Version Manager (RVM) on CentOS 5.5

RVM, or Ruby Version Manager is a popular and effective way to manage running multiple Ruby environments. Here is how you set it up on CentOS 5.5:

1) Add the Webtatic respository and install Git.

rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
yum install --enablerepo=webtatic git

(Note that this command will also install the perl-Error and perl-Git dependencies)

2) Create an rvm user and group.

groupadd rvm
useradd -g rvm rvm

3) Add the root user to the rvm group (required for installation)

usermod -a -G rvm root

4) Install RVM as root.

bash < <(curl -L http://bit.ly/rvm-install-system-wide)

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5840  100  5840    0     0   1620      0  0:00:03  0:00:03 --:--:--  5653
Group 'rvm' exists, proceeding with installation.
Adding 'root' to the group 'rvm'
Creating the destination dir and making sure the permissions are correct
Cloning into rvm...
remote: Counting objects: 4206, done.
remote: Compressing objects: 100% (2029/2029), done.
Receiving objects:  26% (1094/4206), 796.00 KiB | 54 KiB/s

....

Setting up group permissions
Generating system wide rvmrc
Generating /usr/local/lib/rvm to load rvm
Correct permissions on rvmrc and the rvm loader
RVM is now installed. To use, source '/usr/local/lib/rvm' to your shell profile.

5) Install zlib via RVM.

# rvm package install zlib
Fetching zlib-1.2.5.tar.gz to /usr/local/rvm/archives
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  531k  100  531k    0     0   206k      0  0:00:02  0:00:02 --:--:--  226k
Extracting zlib-1.2.5.tar.gz to /usr/local/rvm/src
Configuring zlib in /usr/local/rvm/src/zlib-1.2.5.
Compiling zlib in /usr/local/rvm/src/zlib-1.2.5.
Installing zlib to /usr/local/rvm/usr

6) Install Ruby 1.9.2 using RVM.

# rvm install 1.9.2 -C --with-zlib-dir=/usr/local/rvm/src/
Installing Ruby from source to: /usr/local/rvm/rubi

                while depending on your cpu(s)...

ruby-1.9.2-p180 - #fetching
ruby-1.9.2-p180 - #extracting ruby-1.9.2-p180 to /u
ruby-1.9.2-p180 - #extracted to /usr/local/rvm/src/
ruby-1.9.2-p180 - #configuring
ruby-1.9.2-p180 - #compiling
ruby-1.9.2-p180 - #installing
ruby-1.9.2-p180 - Updating #rubygems to the latest.
Removing old Rubygems files...
Installing rubygems dedicated to ruby-1.9.2-p180...
Installing rubygems for /usr/local/rvm/rubies/ruby-1.9.2-p180/bin/ruby
Installation of rubygems completed successfully.
ruby-1.9.2-p180 - Updating #rubygems to the latest.
Removing old Rubygems files...
Installing rubygems dedicated to ruby-1.9.2-p180...
Installing rubygems for /usr/local/rvm/rubies/ruby-1.9.2-p180/bin/ruby
Installation of rubygems completed successfully.
ruby-1.9.2-p180 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.9.2-p180 - #importing default gemsets (/usr/local/rvm/gemsets/)
Install of ruby-1.9.2-p180 - #complete

7) Set the RVM default to version 1.9.2

# rvm --default use 1.9.2
Using /usr/local/rvm/gems/ruby-1.9.2-p180

&#56&#41 Verify that Ruby version 1.9.2 was installed successfully.

# ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]

9) Add this environment variable to root’s .bash_profile file.

[[ -s "/usr/local/rvm/scripts/rvm" ]] && . "/usr/local/rvm/scripts/rvm"

10) Install rails.

# gem install rails
Fetching: activesupport-3.0.5.gem (100%)
Fetching: builder-2.1.2.gem (100%)
Fetching: i18n-0.5.0.gem (100%)
...
Installing RDoc documentation for railties-3.0.5...
Installing RDoc documentation for bundler-1.0.10...
Installing RDoc documentation for rails-3.0.5...< /pre>

UPDATE 7/25/2011: The system-wide install script is no longer available on github, and has been removed by the author. A workaround link is posted in the comments on this Stack Overflow discussion.

Install VMware Tools for Ubuntu guest on ESXi host

1) Connect to the server with your vSphere Client.
2) Ensure you have CDROM hardware connected to your VM.
Select your VM, then click on Edit Settings|Hardware tab|CD/DVD Drive 1 and ensure it is set to connect at power-on:

3) Start your Ubuntu VM.
4) Ensure you have the proper prerequisite packages:
Ubuntu installs in a very stripped-down configuration. You will need to install kernel headers and the GCC compiler to be able to build VMware tools.  Login to Ubuntu and issue the following commands:
# sudo apt-get install gcc
# sudo apt-get install build-essential binutils linux-headers-$(uname -r)
5) Connect VMware Tools
Once these packages are installed, select your Ubuntu VM in the vSphere Client and right-click on your VM. Select Guest – Install/Upgrade VMware Tools

This will transparently connect the VMware Tools CD into your virtual machine.
6) Mount the CDROM
# sudo mount /dev/scd0 /media/cdrom
7)  Copy the VMwareTools-8.3.2-257589.tar.gz on the CDROM to the /tmp directory
cp /media/cdrom/VMwareTools-8.3.2-257589.tar.gz /tmp
8)  Untar the VMware Tools package
# tar -zxvf VMwareTools-8.3.2-257589.tar.gz
9)  Change to the VMware tools directory.
# cd /tmp/vmware-tools-distrib
10) Run the installer
# sudo ./vmware-install.pl

Follow the instructions presented in the install script.

UPDATE:  Or just type in “sudo apt-get install open-vm-tools” or “sudo apt-get install --no-install-recommends open-vm-tools"

Fixing the "HostDatastoreSystem.CreateNasDatastore" for object "ha-datastoresystem" error when setting up VMware ESXi NFS data store

If you try to add a remote NFS data store forVMware Esxi, you may encounter this error:
Call “HostDatastoreSystem.CreateNasDatastore” for object “ha-datastoresystem” on ESX “{ESX server}” failed:

This is often a firewall issue, and the very first place you should look. Browse to Configuration/Software/Security Profile and verify that the  “NFS Client” is listed under “Outgoing Connections:”

If you do not see the NFS Client entry, click “Properties” and enable it:

Now retry the connection to the NFS data store. If you still cannot connect, open a command prompt on the ESXi console and issue a “vmkping <hosthame>” command where the hostname is your NFS server.  If you receive a successful ping, your VMKernel is setup correctly.  If it returns this, you have a VMKernel problem:

# vmkping 192.168.1.4
*** vmkernel stack not configured ***

You now need to examine your Virtual Switch settings to verify the presence of a VMKernel Port.  Browse to Configuration/Hardware/Networking and examine your settings.  You should see an entry for VMKernel Port; if you do not, your configuration will look like something like this:

To fix this, click the “Properties” link in the upper right corner to examine the properties of your vSwitch0.  You will notice that there is no VMKernel listed:

Click the “Add” button and select the VMKernel connection type:

You will be taken to the first screen of a multi-step wizard.  Keep the default properties you see on the first screen of the wizard:

The second screen is IP Connection Settings. Here, select “Use the following IP settings” and enter a unique IP address and your network’s subnet mask:

Next, click the “Edit” button and enter your network’s default gateway:

You are now done with the wizard, and should see your new VMkernel. Click the “Finish” button:

You should now see VMkernal in the vSwitch0 properties:

You should also now see it in your main vSwitch0 properties:

Now retry adding your NFS store, and you should now be able to do so successfully.

A vmkping should also work now:
# vmkping 192.168.1.4
PING 192.168.1.4 (192.168.1.4): 56 data bytes
64 bytes from 192.168.1.4: icmp_seq=0 ttl=64 time=0.121 ms
64 bytes from 192.168.1.4: icmp_seq=1 ttl=64 time=0.153 ms
64 bytes from 192.168.1.4: icmp_seq=2 ttl=64 time=0.137 ms

Sr. UNIX Systems Engineer (Vinings, GA)

My company, Virima Technologies is seeking an experienced Senior Systems Engineer for opportunity with a client in Atlanta, GA.

DESCRIPTION:  Senior Unix Systems Engineer with experience working in datacenters and hosting facilities.  “Hands on” experience with Solaris and/or RedHat is required.

QUALIFICATIONS:
10+ years of UNIX systems experience in a large, 24×7 environment.
Must have experience in a highly-available UNIX environment.
Experience and deep knowledge of Solaris 9 and 10.
Experience and deep knowledge of RHEL 4.x and 5.x in a virtualized environment.
Sun Blade Center hardware experience required; other high end server experience a plus.
Advanced experience with Veritas Volume Manager (VVM) and Veritas Cluster Server (VCS) or equivalent.
Experience with BIND, Sendmail, and Apache servers.
Strong knowledge of infrastructure services: LDAP, DNS, NTP, NFS, and DHCP.
Knowledge of multi-tiered application architecture.
Strong experience and knowledge of OS system internals: memory management, scheduling, TCP/IP stack, etc…
Experience and knowledge with Ethernet, multicast, vlan tagging, RDMA, etc…
Ability to compile Linux kernels and driver modules.
Strong knowledge of RHEL Kickstart procedures.
Strong scripting skills: Korn, Perl, Bash, AWK, Sed. Python skills a plus.
Experience with networking (subnetting, routing, etc.)
Experience with SAN storage (provisioning, switching, fabrics)
Experience with ITIL practices.
Ability to document project designs, process, and policies.
RHCT and RHCE certification a plus.
Problem solving brings you great joy.

EDUCATION:
Bachelor’s degree or equivalent education in related fields.
Certificates of training in associated fields/equipment

Contact Doug Bramblett

Configure your OS for Gigabit Ethernet

Get a new wireless router recently? If so, its a good bet that it has gigabit ethernet (GbE) capability that you can take advantage of.

Manufacturers have been slow to move away from the standard 10/100 network switches that were the mainstay of wireless routers for years.  However, today it is increasingly common to see routers with GbE switch ports.  Its also likely that your computer has a GbE network card built-in, if you bought it within the last five years.

Now that wireless routers have caught up, you need to setup your network card to enable GbE in your operating system.  Note: you can only use jumbo frames on a network if all devices, including the switch, support it. GbE also does not work over wireless connections.

The setting we will change is called “Jumbo Frames,” and enabling it will allow you to move packets around your wired home network much faster. Here is how you do it for the three major operating systems in use today:

1) Windows

Control Panel – Network and Sharing Center – Change Adapter Settings – Local Area Connection – Properties – Configure – Advanced tab – Jumbo Frame property

Set the value to the highest possible MTU value, which is usually a 9KB MTU, like this:

For a Mac, open System Preferences – Network – Ethernet – Advanced – Ethernet.  Select Configure: Manually and MTU:Custom settings.  This will bring up a textbox where you may enter in the 9000 value for jumbo frames:

For a Linux computer, edit the /etc/sysconfig/network-scripts/ifcfg-eth0 file and add a line called “MTU=5000” like this:

Once you enable these settings, reboot your computer to ensure they take effect. Once complete,  ping another computer on your network (presuming it also has GbE enabled) with “ping <ip address> -f -l 9000” to verify that jumbo frames are enabled. You should see a normal ping response (but with a larger buffer size thanks to jumbo frames):

You can now begin moving files around your network at gigabit ethernet speeds!

Map an NFS share on Windows 7

I needed to connect my Windows 7 desktop machine to a Linux server NFS share, but could not find a good walkthru. Here’s my take on it, assuming you want to connect to a remote NFS share called /export/jcosta.

1) Enable the Windows tools
A default Windows 7 install does not assume you want to connect to a UNIX server. You therefore need to add the tools. Browse to Control Panel/Programs and Features and select “Turn Windows features on or off.” Scroll down until you see the entry called “Services for NFS” and expand the tree you find there. Tick the “Client for NFS” checkbox, and click OK. The installer will commence, and likely require you to reboot the computer once it completes its work.

After installing, connect to your NFS share using a mapped drive:

The shared drive should then come up and be usable:

One-liners from Seth Godin, Live in Atlanta

“The currency of this era is connection.”

“The Apple iPad is a piece of jewelry that happens to do something.”

“37 Signals Basecamp product is successful because it connects people. Their asset is not their code base, its the community of people who would miss them if they were gone.”

“The purpose of the product is to create the conversation.”

“Krispy Kreme’s competitive advantage was scarcity. When they decided you could buy them grocery stores, they destroyed that.”

“Your watch is a holdover from the Industrial Revolution.”

“A resume is proof that we are good a compliance. Its even full of brand names.”

“Be a corporate insurgent.”

“Anxiety is nothing more than experiencing failure in advance.”

“Did you notice nobody ever gets ‘talker’s block'”?

“When the resistance says: ‘Don’t do that,’ then that is what you should be doing. Its the lizard brain telling you ‘no.’

“Leading is saying: ‘I’m going this way, come along!'”

“If your ideas spread, you win.”

“You have an opportunity to go back to being human and connecting with people, instead of just being a cog in a wheel.”

A CocoaCamp byproduct: disposable iPhone apps?

“CocoaCamp” is half-day conference focused on the design and technical needs of Mac and iOS developers.  To help attendees navigate the conference, an iPhone app was created and made available on iTunes one week before the event.  Besides being a great example of developers “eating  their own dog food,”  it was incredibly useful and incorporated some really great ideas.  For only a few hours…

The app began its life on GitHub in mid-July, and took a team of seven developers about two months to build.  The app’s primary feature is a schedule of sessions by hour, with the ability to drill-down into the details of any session and view contact information about the presenter:

The app also let you post photos of the event to a Flickr wall, and follow the event’s Twitter stream.  These were two great social media hooks;  the developers then took it one step farther by integrating the Bump mobile data sharing API into the app. With this integration, you could bump your iPhone with another conference attendee and swap contact information effortlessly:

When you attend a conference, the people you meet are often more important than the conference sessions.  Integrating Bump showed an awareness of this, and made the  typically cumbersome process of swapping contact information effortless.

I’d like to see more conferences offer apps (both Android and iPhone) that do similar things. It would increase the value of the conference for attendees, and likely not cost much to build.  And since apps can use REST and SOAP, conference information can be updated during the event. 

Is there a business opportunity for building “disposable” apps whose usable lifespan is measured in hours? I bet there is.