CentOS7.3にgit2をインストールする

2021年の始めに「CentOS Linux」の、年内での開発終了がアナウンスされました。
くまプレスでは、その殆どをCentOS7で構築しています。
※CentOS8への移行はどうしたものかと検討をしていたところです。
一応、2024年6月30日までのサポートが発表はされていますが、めっちゃ困ってしまっているのは確かです。
RedHatとしては、個人開発者には16システムまでRHELの利用を許可するとかなってますが、「個人開発者」ってのがつきまといます。
もう一つの動きとして、RHELのリリース後にリリースを行うこととして「Rocky Linux」ってのが発表されています。
同じく「Cloud Linux」ってのも発表されています。こちらはCentOS8ベースのようですね。

※この辺の記事は「CentOS Linux」終了へ 開発者の動揺と救済の動き」を参照してください。

くまプレスでは「Rockey Linux」に期待って感じです(^^)

Git2のリポジトリをインストールしましょう

さて、本題の(^^;
CentOS7.3環境にGit2のリポジトリをインストールします。
標準ではgit1.8がインストールされていまい、 git all なんてコマンドが使えない状態です。

手順を調べていたら、だいたいが
# yum -y install https://centos7.iuscommunity.org/ius-release.rpm
としてリポジトリの設定をするように記載されているのですが、centos7.iuscommunity.orgってサイトが無くなっています。
そこで、iusサイトを確認すると、手順が書かれていました。

$ sudo yum install \
https://repo.ius.io/ius-release-el7.rpm \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

これをスタートとしてインストールします。

$ yum search git2
libgit2-devel.x86_64 : Development files for libgit2
libgit2-glib-devel.x86_64 : Development files for libgit2-glib
python-pygit2.x86_64 : Python bindings for libgit2
python-pygit2-doc.noarch : Documentation for python-pygit2
git222.x86_64 : Fast Version Control System
git222-all.noarch : Meta-package to pull in all git tools
git222-core.x86_64 : Core package of git with minimal functionality
git222-core-doc.noarch : Documentation files for git-core
git222-cvs.noarch : Git tools for importing CVS repositories
git222-daemon.x86_64 : Git protocol daemon
git222-email.noarch : Git tools for sending patches via email
git222-gitk.noarch : Git repository browser
git222-gitweb.noarch : Simple web interface to git repositories
git222-gui.noarch : Graphical interface to Git
git222-instaweb.noarch : Repository browser in gitweb
git222-p4.noarch : Git tools for working with Perforce depots
git222-perl-Git.noarch : Perl interface to Git
git222-perl-Git-SVN.noarch : Perl interface to Git::SVN
git222-subtree.x86_64 : Git tools to merge and split repositories
git222-svn.noarch : Git tools for interacting with Subversion repositories
git224.x86_64 : Fast Version Control System
git224-all.noarch : Meta-package to pull in all git tools
git224-core.x86_64 : Core package of git with minimal functionality
git224-core-doc.noarch : Documentation files for git-core
git224-cvs.noarch : Git tools for importing CVS repositories
git224-daemon.x86_64 : Git protocol daemon
git224-email.noarch : Git tools for sending patches via email
git224-gitk.noarch : Git repository browser
git224-gitweb.noarch : Simple web interface to git repositories
git224-gui.noarch : Graphical interface to Git
git224-instaweb.noarch : Repository browser in gitweb
git224-p4.noarch : Git tools for working with Perforce depots
git224-perl-Git.noarch : Perl interface to Git
git224-perl-Git-SVN.noarch : Perl interface to Git::SVN
git224-subtree.x86_64 : Git tools to merge and split repositories
git224-svn.noarch : Git tools for interacting with Subversion repositories
git2cl.noarch : Converts git logs to GNU style ChangeLog format
libgit2.x86_64 : C implementation of the Git core methods as a library with a solid API
libgit2-glib.x86_64 : Git library for GLib

Git2をインストールします

さて、インストールをしてみましょう。
あ、今回の環境はgitは入っていない環境です。
事前に入っている場合は、下記な感じでremoveしておきましょう。

$ sudo yum remove git git-\*

インストールします。

$ sudo yum install git224
$ git –version
git version 2.24.4

はい、これで完了です(^^)

Follow me!

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

CAPTCHA