php7のインストール

PHP7の導入

  • 以下コマンドでphp7を含む必要なパッケージをinstall
yum install -y epel-release.noarch
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
yum install -y --enablerepo=remi --enablerepo=remi-php70 php php-opcache php-devel php-fpm php-gd php-pdo php-dom php-mbstring php-mcrypt php-mysqlnd php-mssql php-pecl-xdebug php-openssl php-json php-pecl-apcu php-pdo_sqlite php-pdo_mysql php-pecl-memcached php-bcmath php-msgpack php-ldap php-pecl-imagick php-pgsql php-pecl-pthreads php-pecl-msgpack
  • 以下コマンドでphpのversionの確認
    • php -v の結果は以下です
PHP 7.0.19 (cli) (built: May  9 2017 16:02:11) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.19, Copyright (c) 1999-2017, by Zend Technologies
    with Xdebug v2.5.4, Copyright (c) 2002-2017, by Derick Rethans
[root@wp ~]# php-fpm -v
PHP 7.0.19 (fpm-fcgi) (built: May  9 2017 16:02:34)
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.19, Copyright (c) 1999-2017, by Zend Technologies
    with Xdebug v2.5.4, Copyright (c) 2002-2017, by Derick Rethans
  • 以下コマンドでphp-fpmのversionの確認
    • php-fpm -v の結果は以下です
PHP 7.0.19 (fpm-fcgi) (built: May  9 2017 16:02:34)
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.19, Copyright (c) 1999-2017, by Zend Technologies
    with Xdebug v2.5.4, Copyright (c) 2002-2017, by Derick Rethans