LoginSignup
0
0

More than 3 years have passed since last update.

CentOS7 Gitを導入する

Last updated at Posted at 2021-01-23

目的

  • CentOS7にGitを導入する方法をまとめる

方法

  1. 下記コマンドを実行してリポジトリを追加する。

    $ sudo yum install https://repo.ius.io/ius-release-el7.rpm
    
  2. 下記コマンドを実行してリポジトリの設定ファイルを開く。

    $ sudo vi /etc/yum.repos.d/ius.repo
    
  3. 開いたファイルの[ius]enabledの値を「0」に書き換える。

    /etc/yum.repos.d/ius.repo
    [ius]
    name = IUS for Enterprise Linux 7 - $basearch
    baseurl = https://repo.ius.io/7/$basearch/
    enabled = 0 
    repo_gpgcheck = 0
    gpgcheck = 1
    gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-IUS-7
    
  4. 下記コマンドを実行してGitをインストールする。インストール確認時のパッケージのインストールもとリポジトリがiusになっていることを確認し「y」を入力してからEnterを押下する。

    $ sudo yum install git --enablerepo=ius --disablerepo=base,epel,extras,updates
    
  5. 下記コマンドを実行してcommand not foundが出ないことを確認する。

    $ git --version
    
0
0
4

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
0
0