官术网_书友最值得收藏!

Installing Git on Debian-based distribution Linux (such as Ubuntu)

There are a couple of ways by which you can install Git on a Debian system:

  1. Using the Advanced Package Tool (APT) package management tools:

You can use the APT package management tools to update your local package index. Then, you can download and install the latest Git using the following commands as the root user:

      $ apt-get update -y
      $ apt-get install git -y  

The preceding commands will download and install Git on your system.

  1. Using the source code, you can do the following:
    1. Download the source from the GitHub repository, and compile the software from the source.

Before you begin, let's first install the dependencies of Git; execute the following commands as the root user to do so:

      $ apt-get update -y 
      $ apt-get install build-essential libssl-dev
libcurl4-gnutls-dev libexpat1-dev gettext unzip -y

2. After we have installed the necessary dependencies, let's go to the Git project repository (https://github.com/git/git) to download the source code, as follows:

      $ wget https://github.com/git/git/archive/v1.9.1.zip -Ogit.zip  

3. Now, unzip the downloaded ZIP file using the following commands:

      $ unzip git.zip
      $ cd git-*  

4. Now you have to make the package and install it as a sudo user. For this, use the commands given next:

      $ make prefix=/usr/local all
      $ make prefix=/usr/local install

The preceding commands will install Git on your system at /usr/local.

主站蜘蛛池模板: 江北区| 乌鲁木齐市| 永宁县| 板桥市| 宁晋县| 宜阳县| 东海县| 宾川县| 金溪县| 雷山县| 宜州市| 南平市| 商丘市| 固安县| 灵武市| 正蓝旗| 大姚县| 泰顺县| 甘德县| 长春市| 安阳县| 五指山市| 聂荣县| 青冈县| 丹巴县| 康定县| 桐乡市| 凤山市| 安龙县| 含山县| 牡丹江市| 溧阳市| 成安县| 罗平县| 陇川县| 临清市| 五峰| 枣庄市| 巴马| 宽甸| 札达县|