Saturday, December 8, 2012

Git setup on Linux



To install Git, you need to have the following libraries that Git depends on: curl, zlib, openssl, expat, and libiconv. For example, if you’re on a system that has yum (such as Fedora) or apt-get (such as a Debian based system), you can use one of these commands to install all of the dependencies:



$ yum install curl-devel expat-devel gettext-devel \
  openssl-devel zlib-devel
$ apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev 
  
When you have all the necessary dependencies, you can go ahead and grab the latest snapshot from the Git web site:
   http://git-scm.com/download
Then, compile and install:
$ tar -zxf git-1.6.0.5.tar.gz
$ cd git-1.6.0.5
$ make prefix=/usr/local all
$ sudo make prefix=/usr/local install
After this is done, you can also get Git via Git itself for updates:
git clone git://git.kernel.org/pub/scm/git/git.git
    
1.4.2 Installing on Linux
If you want to install Git on Linux via a binary installer, you can generally do so through the basic package-management tool that comes with your distribu- tion. If you’re on Fedora, you can use yum:
yum install git-core Or if you’re on a Debian-based distribution like Ubuntu, try apt-get:
apt-get install git-core ...

No comments:

Post a Comment