Checking out a remote CVS project

Problem
You want to use cvs to checkout a repository from a remote server.

Solution
If you were using subversion it would be very simple to do by using the remote url.
In CVS you have to to do the following:
First find out where the cvsroot in the remote server is. We will assume for this example that is located in /usr/local/cvsroot.
Then run the following on your local linux pc:

export CVSROOT=:ext:user_name@remote_pc:/path_to_csvroot export
export CVS_RSH=ssh

You then should be able to do a checkout by typing the following and supplying your password:

cvs checkout project_name

Ruby On Rails on CentOS 4.6

Problem
Installing Ruby on Rails on CentOS 4.6.
The yum install ruby installs an old version of Ruby 1.8.1, but you want 1.8.6
Solution
Based on a script from uberdose

The original post is here:
http://wp.uberdose.com/2007/07/15/ruby-on-rails-on-centos-45/

  wget ftp://ftp.gnu.org/gnu/readline/readline-5.1.tar.gz
  tar xvfz readline-5.1.tar.gz
  cd readline-5.1
  ./configure --prefix=/usr/local
  make
  sudo make install

  cd ..
  wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6.tar.gz
  tar xvfz ruby-1.8.6.tar.gz
  cd ruby-1.8.6
  ./configure --prefix=/usr/local --enable-pthread --with-readline-dir=/usr/local --enable-shared
  make
  sudo make install

  cd ..
  wget http://rubyforge.org/frs/download.php/20980/rubygems-0.9.4.tgz
  tar xvfz rubygems-0.9.4
  cd rubygems-0.9.4
  sudo /usr/local/bin/ruby setup.rb
  cd ..
  sudo gem install rails --include-dependencies
  sudo gem install termios --include-dependencies
  sudo gem install mongrel --include-dependencies
  sudo gem install mongrel-cluster --include-dependencies
  sudo gem install capistrano --include-dependencies
  sudo gem install mysql -- --with-mysql-dir=/usr/

Using older Capistrano version 1.x after upgrading to Capistrano 2.x

Problem
You have just upgraded your Capistrano installation to version 2.x, but you didn’t have time to convert your recipes to the newer version.

Solution
In order to be able to use your old recipes of Capistrano version 1.x after upgrading, you can use the following (assuming your version 1.x is 1.4.1):

cap _1.4.1_ deploy

or, if you have migrations you want to use:

cap _1.4.1_ deploy_with_migrations

Password – less logins and aliases with ssh

Problem
You want to be able to login to different servers with ssh, but don’t want to be using your password every time.

Solution
We assume that you already have installed ssh and have created ssh public keys in your local machine.

  1. Run the following in your local machine:
    ssh-copy-id -i ~/.ssh/id_rsa.pub user_name@remote_host
  2. If you want to add aliases in your bash profile so you don’t have to type the whole address of the remote host, edit your .bashrc and add:
    alias short_name="ssh user_name@remote_host"
  3. Restart your X server, or simply start a new terminal session
  4. You should be able to login with ssh without using your password by typing in your command prompt in your local machine:
    short_name