このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
centos:yum [2020/06/01 09:42] y2sunlight [USPによるgit2の導入] |
centos:yum [2020/06/16 14:25] (現在) y2sunlight [IUSによるgit2の導入] |
||
---|---|---|---|
行 1: | 行 1: | ||
- | > 編集中 | ||
- | |||
- | ----- | ||
- | |||
====== yumコマンド ====== | ====== yumコマンド ====== | ||
Version CentOS 7.2 | Version CentOS 7.2 | ||
行 22: | 行 18: | ||
* [[centos: | * [[centos: | ||
* [[centos: | * [[centos: | ||
+ | * [[centos: | ||
リンク | リンク | ||
行 240: | 行 237: | ||
/ | / | ||
- | < | + | < |
cd / | cd / | ||
vi remi-safe.repo | vi remi-safe.repo | ||
行 283: | 行 280: | ||
yum install --enablerepo=remi, | yum install --enablerepo=remi, | ||
</ | </ | ||
- | |||
- | > php-mysqlndは | ||
現在のPHPバージョンを確認します。 | 現在のPHPバージョンを確認します。 | ||
行 296: | 行 291: | ||
\\ | \\ | ||
- | ===== USPによるgit2の導入 ===== | + | ===== IUSによるgit2の導入 ===== |
- | USP リポジトリは python や git の最新版をインストールする場合に必要になります。USP リポジトリは登録が終わったら無効化しておき、必要に応じて yumコマンドで有効化することにします。 | + | IUS リポジトリは python や git の最新版をインストールする場合に必要になります。IUS リポジトリは登録が終わったら無効化しておき、必要に応じて yumコマンドで有効化することにします。 |
- | USP から git2.x をインストール手順を以下に示します。USP では EPEL を使用するので、先に[[# | + | IUS から git2.x をインストール手順を以下に示します。IUS では EPEL を使用するので、先に[[# |
=== 1. gitのインストール状況の確認 === | === 1. gitのインストール状況の確認 === | ||
行 337: | 行 332: | ||
</ | </ | ||
- | === 3. USP リポジトリの登録 === | + | === 3. IUS リポジトリの登録 === |
- | '' | + | '' |
< | < | ||
- | yum install | + | yum install |
</ | </ | ||
<div indent> | <div indent> | ||
行 348: | 行 343: | ||
</ | </ | ||
- | '' | + | '' |
< | < | ||
- | yum repolist all | grep remi | + | yum repolist all | grep ius |
- | ... | + | ius/ |
- | remi | + | ius-archive/ |
- | remi-php54 | + | ius-archive-debuginfo/ |
- | remi-php55 | + | ius-archive-source |
- | remi-php56 | + | ius-debuginfo/ |
- | remi-php70 | + | ius-source |
- | remi-php71 | + | ius-testing/ |
- | remi-php72 | + | ius-testing-debuginfo/ |
- | remi-php73 | + | ius-testing-source |
- | remi-php74 | + | |
- | remi-safe Safe Remi's RPM repository for Ent 有効: | + | |
- | remi-test Remi's test RPM repository | + | |
- | ... | + | |
</ | </ | ||
- | 上の表示例は、抜粋ですが、多くのPHPがバージョン毎にリポジトリ化されているのが分かります。有効になっているのは remi-safe だけです。この状態でも、php7.4のインストールはできますが、PHPのバージョンを指定する方が分かり易いので、PHPバージョン毎のリポジトリを指定してインストールすることにします。 | + | === 4. IUS リポジトリの無効化 === |
- | === 4. USP リポジトリの無効化 === | + | /etc/yum.repos.d/ |
- | / | + | < |
- | + | ||
- | < | + | |
cd / | cd / | ||
- | vi remi-safe.repo | + | vi ius.repo |
</ | </ | ||
- | '' | + | '' |
- | <code ini remi-safe.repo> | + | <code ini ius.repo> |
[remi-safe] | [remi-safe] | ||
... | ... | ||
- | enabled=0 | + | enabled = 0 |
... | ... | ||
</ | </ | ||
- | '' | + | '' |
- | === 4. PHP7.3のインストール === | + | === 4. gitのインストール === |
- | 最初に | + | '' |
< | < | ||
- | yum install | + | yum search |
+ | ... | ||
+ | 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 | ||
+ | ... | ||
+ | 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 | ||
+ | ... | ||
</ | </ | ||
- | > | + | 上の表示例は、抜粋ですが、git2.22 |
+ | '' | ||
+ | |||
+ | < | ||
+ | yum install --enablerepo=ius git224 | ||
+ | </ | ||
<div indent> | <div indent> | ||
インストールの途中で、インストールしても良いか確認される ('' | インストールの途中で、インストールしても良いか確認される ('' | ||
</ | </ | ||
- | 引き続いて、PHPモジュールをインストールします。 | + | 現在のGitバージョンを確認します。 |
- | + | ||
- | * php-devel --- TODO | + | |
- | * php-mbstring --- 日本語を扱えるようにする | + | |
- | * php-gd --- 画像を扱えるようにする | + | |
- | * php-mysql --- MySQLとの連携を実現する | + | |
- | * php-pdo --- PHPのPDOクラスを使用する | + | |
- | + | ||
- | 必要に応じて追加して下さい。 | + | |
< | < | ||
- | yum install | + | git --version |
- | </ | + | git version 2.24.2 |
- | + | ||
- | > php-mysqlndは | + | |
- | + | ||
- | 現在のPHPバージョンを確認します。 | + | |
- | < | + | |
- | php -v | + | |
- | PHP 7.3.18 (cli) (built: May 12 2020 08:04:33) ( NTS ) | + | |
- | Copyright (c) 1997-2018 The PHP Group | + | |
- | Zend Engine v3.3.18, Copyright (c) 1998-2018 Zend Technologies | + | |
</ | </ | ||
\\ | \\ | ||