php 用 yum 安装

来源:互联网 发布:linux ant是什么 编辑:程序博客网 时间:2024/06/14 10:39
  1. 配置yum源(选)

事先确认yum源的链接是不是有效的。

# rpm -Uvh http://ftp.iij.ad.jp/pub/linux/Fedora/epel/7/x86_64/e/epel-release-7-10.noarch.rpm # rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
  1. 确认安装的php版本
# yum list --enablerepo=remi --enablerepo=remi-php55 | grep php
  1. 安装php5.5
# yum install --enablerepo=remi --enablerepo=remi-php55 php php-opcache php-pecl-apcu php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof php-pdo php-pear php-fpm php-cli php-xml php-bcmath php-process php-gd php-common

php-opcache及php-pecl-apcu会有效的提高php执行速度。

  1. 确认php版本
# php -vPHP 5.5.38 (cli) (built: Feb 18 2017 08:22:20) Copyright (c) 1997-2015 The PHP GroupZend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
原创粉丝点击