CentOS7 にphp7.1をインストールする

2019年1月6日

yum のアップデート
$ yum update

yum のキャッシュを削除する
$ yum clean all

PHP7.1 のインストール
$ yum install php php-cli php-common php-devel php-fpm php-gd php-mbstring php-pdo php-pear php-pecl-apcu php-soap php-xml php-xmlrpc php-mcrypt

PHPの起動
$ systemctl start php-fpm.service

自動起動
$ systemctl enable php-fpm

php のバージョンの確認
$ php -v
設定ファイル
$ vim /etc/php-fpm.d/www.conf
; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user’s group
; will be used.
; RPM: apache Choosed to be able to access some dir as httpd
user = nginx
; RPM: Keep a group allowed to write in log dir.
group = nginx

PHPを再起動
$ systemctl restart php-fpm

Linux

Posted by arkgame