国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 服務(wù)器 > Linux服務(wù)器 > 正文

linux安裝git的方法步驟

2024-09-05 23:05:29
字體:
供稿:網(wǎng)友

1、簡(jiǎn)介

Git是一款免費(fèi)、開源的分布式版本控制系統(tǒng),用于敏捷高效地處理任何或小或大的項(xiàng)目。

Git是一個(gè)開源的分布式版本控制系統(tǒng),用以有效、高速的處理從很小到非常大的項(xiàng)目版本管理。

Git 是 Linus Torvalds 為了幫助管理 Linux 內(nèi)核開發(fā)而開發(fā)的一個(gè)開放源碼的版本控制軟件

安裝環(huán)境

阿里云ECS CentOS 7.4 64位

2、使用shell安裝git

請(qǐng)將下載的shell與下面代碼保存到同一目錄

cnl_function.sh

#!/bin/bashsource ./cnl_function.sh#function of installing gitinstall_git(){  #download the compressed package  cd /usr/local/src  #if compressed package is empty then download  [ -f git-2.2.1.tar.gz ] || wget https://www.kernel.org/pub/software/scm/git/git-2.2.1.tar.gz  check_ok  tar -zxf git-2.2.1.tar.gz  check_ok  [ -d /usr/local/git ] && mv /usr/local/git /usr/local/git_`date +%s`    cd git-2.2.1  check_ok    for p in expat-devel   do     myum $p  done  make prefix=/usr/local/git all  make prefix=/usr/local/git install  check_ok    if ! grep '^git:' /etc/group  then     groupadd git  fi      if ! grep '^git:' /etc/passwd  then    useradd -m git -s /usr/local/git/bin/git-shell -g git  fi    check_ok  ln -s /usr/local/git/bin/git /usr/local/bin/git    echo "git is installed finish."  }read -p "Enter (Y) to start installation git :" nif [ $n == 'Y' ]then   echo "Start installation==============================================================================================================================>"  install_gitelse   echo "Cancel the installation."fi

如下圖,我將上面代碼保存位cnl_install_git.sh 

linux,安裝,git

執(zhí)行腳本,按提示輸入即可

linux,安裝,git

命令行執(zhí)行

git --version

linux,安裝,git

安裝完成。

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持VEVB武林網(wǎng)。


注:相關(guān)教程知識(shí)閱讀請(qǐng)移步到服務(wù)器教程頻道。
發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 元氏县| 漠河县| 德昌县| 虹口区| 文水县| 时尚| 陆河县| 县级市| 和田县| 通州区| 社旗县| 琼中| 盘锦市| 兖州市| 永平县| 淮南市| 慈利县| 定西市| 芦山县| 东阿县| 通州市| 东光县| 泸水县| 东阳市| 余庆县| 彭泽县| 错那县| 鄂托克前旗| 三穗县| 陵川县| 济源市| 琼结县| 西昌市| 苏尼特左旗| 平南县| 文山县| 临泉县| 察隅县| 广宁县| 巩留县| 庆元县|