centos下的php7安装

  1. 设置安装源
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum clean all
yum makecache fast
  1. 安装
yum install -y php71w-fpm  mod_php71w php71w-cli php71w-common \
php71w-gd php71w-mbstring php71w-mysqlnd \
php71w-xml  php71w-ldap
  1. 检查安装版本
php -v
PHP 7.1.18 (cli) (built: Jun  2 2018 08:16:19) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
  1. 开机启动php-fpm
    sudo systemctl enable php-fpm

发表评论

电子邮件地址不会被公开。 必填项已用*标注