安装的命令行很简单
sudo yum --enablerepo=remi install php
不过如果你没有配置源Repository,就需要首先启动REMI源:
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安装
rpm -Uvh remi-release-6.rpm epel-release-6-8.noarch.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 Group Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies with Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies 安装成功。
时间: 2024-11-20 08:38:58