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

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.

主站蜘蛛池模板: 嘉鱼县| 海宁市| 丹棱县| 南平市| 拜泉县| 鄂托克前旗| 高雄市| 临武县| 丁青县| 鹿邑县| 河间市| 尉氏县| 宁海县| 攀枝花市| 三亚市| 普格县| 五寨县| 乐至县| 鞍山市| 皮山县| 泉州市| 贞丰县| 德州市| 巴中市| 宁蒗| 宁海县| 蒙阴县| 桐柏县| 兴文县| 万山特区| 汽车| 普宁市| 东乡| 乌兰察布市| 兴山县| 嘉兴市| 友谊县| 满洲里市| 道真| 麦盖提县| 什邡市|