CentOS7 安装 PHP7/PHP7.2

CentOS 7安装PHP7/PHP7.2

  • 前提:如果安装有旧版本则执行

    yum -y remove php*
  1. 下载安装包并安装PHP7.0

    rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
    rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
    yum install php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-mysql.x86_64 php70w-pdo.x86_64 php70w-fpm
  2. 下载安装包并安装PHP7.2

    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 -y install php72w php72w-cli php72w-common php72w-devel php72w-embedded php72w-fpm php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml
  3. 相关文章

    CentOS7 安装 apache2.4          
    CentOS7 安装 MySQL5.6.26
    CentOS7 安装 PHP7

标签: centos php linux

发表评论: