Welcome to the rails deployment series. Today, we will be installing Git on your remote server. I am not going to go into the debate of SVN vs Git. *yawnz. The purpose of installing Git in the remote server is mainly cuz my local runs Git as well and I will also be installing Gitosis in the remote server to act as a repo where I can push changes to.

Deploying Rails to Centos 5

So to start off, make sure you have all the dependencies by installing [shell] yum install curl-devel expat-devel gettext-devel \
openssl-devel zlib-devel[/shell]

Head to http://git-scm.com/download and grab the latest link for Linux. The link is at the top right sidebar. Took me a while to find it. darn. lol.
[shell] wget paste-link-for-git[/shell]

Once it is downloaded, you can install it by running [shell]
tar -jxf git-
cd git-
make prefix=/usr/local all
sudo make prefix=/usr/local install[/shell]
Make sure you type in your git archive’s name, and not the one in the code above. 😀

When the installation is done, you can now safely remove the tar files and the git- folder by doing [shell] rm git-
rm -rf git-[/shell]

Once you are done installing, you can check if you have git install by running [shell] git[/shell]

You are done for now! Leave git alone and let’s install some rubies and rails!