安装的命令行很简单
sudo yum --enablerepo=remi install php
不过如果你没有配置源Repository,就需要首先启动REMI源:
cd /tmp
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm wget http://mirrors.sohu.com/fedora-epel/6/i386/epel-release-6-8.noarch.rpm
rpm安装
然后用remi源来安装php
yum --enablerepo=remi install php
确认正确的版本,回答Y开始安装。
如何查看PHP的版本号:
# php -v
PHP 5.4.30 (cli) (built: Jun 25 2014 15:27:51)Copyright (c) 1997-2014 The PHP GroupZend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologieswith Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies
安装成功。