November 13, 2010

Installing GIT on Ubuntu 9.10

On the to install GIT over Ubuntu 9.10, the instruction of the Github website didn't work! So I had to scratch my head and investigate it myself.

The instruction being as:

It is recommended to only use the Ubuntu package management system to get a basic Ruby environment. Then you will use gem to install all your ruby packages.


So to get started, you will need to install these Ubuntu packages:

$ sudo aptitude install ruby-dev libopenssl-ruby rubygems

You will also need to install the development package of your database client library, for example in the case of sqlite3:

$ sudo aptitude install libsqlite3-dev

You can now install Rails and Radiant using the gem command:


$ sudo gem install rails radiant

You will also need to install the Ruby wrapper for your database client library, for example:

$ sudo gem install sqlite3-ruby

Once radiant has been installed successfully, you need to add the directory containing the radiant command to your PATH. If you’re using Bash, you can add a line like this to your .bashrc file:



export PATH=$PATH:/var/lib/gems/1.8/gems/radiant-0.8.1/bin


Right at sudo gem install sqlite3-ruby I got stuck. I tried a lot of different suggestions available online, not sure if athey had any impact or not but I think this is what solved my problem: and because of a versioning mismatch I was not able to install it.
  • remove ruby 1.9 and ruby 1.9.1 and install ruby 1.8 and ruby gems 1.8.
and instead I had to add /var/lib/gems/1.8/gems/radiant-0.9.1/bin to my PATH.

----
Then, you need to install GIT. Ubuntu recommends to use GIT, first you must have a public SSH key, so we make one:
$ mkdir ~/.ssh
$ chmod 700 ~/.ssh
$  ssh-keygen -t rsa

add your public key to your github account https://github.com/account

$ sudo apt-get -y install git-core gitosis
$ sudo -H -u gitosis gitosis-init < ~/.ssh/id_rsa.pub 
 
You'd get something like
Initialized empty Git repository in /srv/gitosis/repositories/gitosis-admin.git/
Reinitialized existing Git repository in /srv/gitosis/repositories/gitosis-admin.git/
Your gitosis is installed!

No comments:

Post a Comment