Background
It seems that Bluehost by default does not support nor tell you how to install Git. I also tried posting a query on Bluehost’s forums to see if anybody has done it before but with no luck. So I decided to just go ahead and try this out myself. Also note that you will need to enable the SSH access on your bluehost account to do this. You can easily enable SSH on your account by sending a request to Bluehost Tech support.
Here are my specs from the bluehost account:
myuser@koolwal.net [~]# cat /proc/version
Output:
Linux version 2.6.28-9.16.intel.BHsmp (kernel@bluehost.com) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-10)) #1 SMP Sat Apr 18 11:41:59 MDT 2009
myuser@koolwal.net [~]#
Basically it is a Red Hat Linux system with 2.6.28 Linux kernel running. So now we have all the information that we need let’s get started…
Step 1: Download git tarball
Log into your Bluehost account and give the following command:
# wget http://kernel.org/pub/software/scm/git/git-1.6.3.3.tar.bz2
Note: The latest stable release version might have changed since this posting, so you need to substitute in the above command the latest git version that you would like to install or else you can continue with the git version that I ended up installing. You can checkout the latest stable release version of git here.
Step 2: Extract the tarball
Now just extract the tarball installation file in your home directory
# tar -xjvf git-1.6.3.3.tar.bz2
Step 3: Compile the git program
# cd git-1.6.3.3
# make
Now mostly after a while you will get the following error message and your make command will fail:
make[2]: true: Command not found
make[2]: *** [blibdirs] Error 127
make[1]: *** [all] Error 2
make: *** [all] Error 2
It seems that the true command is not installed on the bluehost servers but you type in the command true it seems that it exits:
myuser@koolwal.net [~]# true
myuser@koolwal.net [~]#
This probably means that the git make command is not able to locate the directory in which the true command sits.
Step 4: Fix “true”: Command not found error
The simplest way to fix this error is to create an empty script file called true with just the following line:
#!/bin/sh
Save and exit the file and copy it in your local bin directory after making it executable:
# cd;
# chmod 755 true
# mkdir bin (if the directory does not exits)
# cp true bin/true
and now you can re-issue the make command:
# cd git-1.6.3.3
# make clean
# make
and now after a while you should see the the “make” command finishes without any error.
Step 5: Install the git program
Finally you can install the git software by issuing the following command:
# make install
and you should be able to execute the “git” command on your Bluehost account.
Step 6: Test git
Now it is time to test if the “git” program installed successfully or not.
# mkdir test_project
# cd test_project
# git
Output:
Initialized empty Git repository in /home1/myuser/test_project/.git/
Congratulations the above output means that your “git” is working just fine and now you can use it for your project that you have been planning.
via http://blogs.koolwal.net/2009/07/20/howto-installing-git-on-bluehost-domain-hosted-websites/
#1 by Colin on October 1, 2009 - 12:53 am
Quote
Thanks tons for your tutorial! This is exactly the help I was searching for.
#2 by mbrinson on October 1, 2009 - 10:21 am
Quote
No problem Colin. Actually this is someone else’s tutorial (link at the bottom of the post where it says “via: …..”
I use wordpress for notetaking for myself and a lot of that is comprised of stuff I find while googling for answers to problems and I just put it in my post in case the site I find it at ever goes down.
#3 by Luis Aveiga on July 11, 2010 - 8:24 pm
Quote
Thanks for the info… I’m learning about software versioning systems and it seems that GIT is one of the best options… THANKS!