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

 yum install curl-devel expat-devel gettext-devel \
openssl-devel zlib-devel

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.

 wget paste-link-for-git

Once it is downloaded, you can install it by running

tar -jxf git-
cd git-
make prefix=/usr/local all
sudo make prefix=/usr/local install

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

 rm git-
rm -rf git-

Once you are done installing, you can check if you have git install by running


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