A collection of computer systems and programming tips that you may find useful.
 
Brought to you by Craic Computing LLC, a bioinformatics consulting company.

Friday, December 3, 2010

System-wide rvm install on Ubuntu

Here are the steps I used to install RVM system wide on a Ubuntu 10.04.1 LTS node on Amazon EC2, using one of the Canonical AMIs. These set up the primary user as 'ubuntu', requiring you to sudo for system commands. I could install rvm under that user but installing System-Wide is recommended.

This HOWTO is based on the RVM page http://rvm.beginrescueend.com/deployment/system-wide/. But I find the RVM site documentation makes a few assumptions with regard to commands.

1: Install git if you don't already have it
$ sudo apt-get install git-core
2: Download RVM
$ sudo bash < <( curl -L http://bit.ly/rvm-install-system-wide )
This creates /usr/local/rvm and the group 'rvm'

3: Add each user to group rvm
$ sudo usermod -aG rvm ubuntu
4: Add startup lines to each user's .profile
[[ -s '/usr/local/lib/rvm' ]] && source '/usr/local/lib/rvm'
5: Add this line to /etc/rvmrc (may not be necessary)
$ echo "export rvm_path=/usr/local/rvm" > /etc/rvmrc
6: Use rvm as a user - best to logout/login first to make sure you get all the paths etc setup
$ rvm list
$ rvm package install zlib ( I needed this to get install to work )
$ rvm install 1.9.2 --with-zlib-dir=/usr/local/rvm/usr
Note that you use rvm as a regular user, not via sudo, even though this is a system wide install.


 

3 comments:

Unknown said...

Great post. I only wish I found it earlier. I struggled for two hours trying to get this set up on a dev server at work today

Anonymous said...

Why do I get the error ? I have git installed.

sh-4.1$ sudo bash < <( curl -L http://bit.ly/rvm-install-system-wide )
sh: syntax error near unexpected token `<'

Deepali Singh said...

Do you want to know about Gabi DeMartino Net Worth, early life, career, age, biography, and relationship status?

Archive of Tips