LoginSignup
1
1

More than 1 year has passed since last update.

CentOSに最新のGitをインストールする

Posted at

Gitの最新版のソースを取得する

Webブラウザで、Gitのダウンロードサイトを表示します。
download a tarballリンクをクリックしてください。
スクリーンショット 2022-05-29 7.31.22.png

ソースファイの一覧が表示されます。
最新バージョンのファイルをダウンロードしてください。

# cd /usr/local/src
# wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.36.1.tar.gz

Gitをインストールする

ダウンロードしたファイルを解凍し、インストールします。
以下のコマンドを実行してください。

# tar -zxf git-2.36.1.tar.gz
# cd git-2.36.1
# make prefix=/usr/local all
# make prefix=/usr/local install

インストール結果を確認する

以下のコマンドを実行してください。

$ git --version

以上です。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1