Blog: Installing Git on BlueHost

I've used BlueHost shared hosting account for a while, but I never managed my projects on this server with Git. Granted, the projects I have there are Drupal based, they were getting big enough to be very cumbersome to manage through SFTP.

While I never not manage new projects' source code and deployment, which are mostly Ruby on Rails based, with Git and Capistrano, using Git for Drupal projects is a new avenue I am pursuing to minimize deployment headaches and to cut down on the amount of data I have to wait around on; in search for a more streamlined and faster development & deployment workflow, and quicker turnaround for my clients. 

But whatever you choose to use Git for, on BlueHost, I will show you the very simple install process. While I base my tutorial on this blog post: http://www.brintech.net/installing-git-on-bluehost/, it is actually simpler to install git today than it was when that blog post was written -- and for the sake of clarity, I am posting here the streamlined version, and up to date information as of August 15 2011.

Assuming you have SSH access to your BlueHost account and are logged into your home directory now...

Note: Terminal commands are prefixed with ">"

1. Server's installation information 

> cat /proc/version

Linux version 2.6.32-42.1.BHsmp (kernel@bluehost.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)) #1 SMP Tue Jun 28 17:06:41 MDT 2011

2. Get the Git source code

Make sure you check to see what the current latest version of Git source code here:

http://www.kernel.org/pub/software/scm/git/ 

> wget http://www.kernel.org/pub/software/scm/git/git-1.7.6.tar.gz

Your git source should be downloading, it's up to you where you want to put it, I just downloaded it in my home directory.

3. Un-TAR your fresh Git source code

> tar -xf git-1.7.6.tar.gz

4. Enter into Git source code folder and make & install project

> cd git-1.7.6

> make

Wait for project to be 'made'...

> make install

And that's it! Hopefully you won't run into any trouble, it was very straight forward for me to get Git installed. Try verifying if it really was installed:

> git --version

> git version 1.7.6