CentOS7.6に php5.6をインストールするメモ

1.リポジトリを追加
#yum install epel-release
読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* epel: www.ftp.ne.jp
* extras: ftp.iij.ad.jp
* updates: ftp.iij.ad.jp
パッケージ epel-release-7-11.noarch はインストール済みか最新バージョンです
何もしません
## yum install epel-release
読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* epel: www.ftp.ne.jp
* extras: ftp.iij.ad.jp
* updates: ftp.iij.ad.jp
パッケージ epel-release-7-11.noarch はインストール済みか最新バージョンです
何もしません

2.remi-release-7を追加
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
http://rpms.famillecollet.com/enterprise/remi-release-7.rpm を取得中
警告: /var/tmp/rpm-tmp.sYEDXp: ヘッダー V4 DSA/SHA1 Signature、鍵 ID 00f97f56: NOKEY
準備しています… ################################# [100%]
更新中 / インストール中…
1:remi-release-7.6-1.el7.remi ################################# [100%]

3.既存phpを削除
#yum remove php-*

4.php5.6 をインストール
#yum –enablerepo=remi,remi-php56 install php php-mysql php-mbstring php-gd php-pear php-mcrypt mod_ssl
中略
インストール:
mod_ssl.x86_64 1:2.4.6-88.el7.centos php.x86_64 0:5.6.40-1.el7.remi
php-gd.x86_64 0:5.6.40-1.el7.remi php-mbstring.x86_64 0:5.6.40-1.el7.remi
php-mcrypt.x86_64 0:5.6.40-1.el7.remi php-mysqlnd.x86_64 0:5.6.40-1.el7.remi
php-pear.noarch 1:1.10.7-4.el7.remi

依存性関連をインストールしました:
dejavu-fonts-common.noarch 0:2.33-6.el7 dejavu-sans-fonts.noarch 0:2.33-6.el7
fontconfig.x86_64 0:2.13.0-4.3.el7 fontpackages-filesystem.noarch 0:1.44-8.el7
gd-last.x86_64 0:2.2.5-5.el7.remi jbigkit-libs.x86_64 0:2.0-11.el7
libX11.x86_64 0:1.6.5-2.el7 libX11-common.noarch 0:1.6.5-2.el7
libXau.x86_64 0:1.0.8-2.1.el7 libXpm.x86_64 0:3.5.12-1.el7
libjpeg-turbo.x86_64 0:1.2.90-6.el7 libmcrypt.x86_64 0:2.5.8-13.el7
libtiff.x86_64 0:4.0.3-27.el7_3 libtool-ltdl.x86_64 0:2.4.2-22.el7_3
libwebp.x86_64 0:0.3.0-7.el7 libxcb.x86_64 0:1.13-1.el7
libxslt.x86_64 0:1.1.28-5.el7 libzip5.x86_64 0:1.5.1-1.el7.remi
php-cli.x86_64 0:5.6.40-1.el7.remi php-common.x86_64 0:5.6.40-1.el7.remi
php-fedora-autoloader.noarch 0:1.0.0-1.el7.remi php-pdo.x86_64 0:5.6.40-1.el7.remi
php-pecl-jsonc.x86_64 0:1.3.10-2.el7.remi.5.6 php-pecl-zip.x86_64 0:1.15.4-1.el7.remi.5.6
php-process.x86_64 0:5.6.40-1.el7.remi php-xml.x86_64 0:5.6.40-1.el7.remi
t1lib.x86_64 0:5.1.2-14.el7

5.バージョン確認
# php –version
PHP 5.6.40 (cli) (built: Jan 9 2019 12:34:16)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

Linux

Posted by arkgame