在 CentOS 6 上安装 PHP 5.4.30

安装的命令行很简单

sudo yum --enablerepo=remi install php

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安装

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

安装成功。


评论

《“在 CentOS 6 上安装 PHP 5.4.30”》 有 1 条评论

  1. […]  在 CENTOS 6 上安装 PHP 5.4.30 […]

发表回复

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

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据

奇客罗方公众号 奇客罗方小程序 奇客罗方客服 ITGeeker Telegram

网站由ITGeeker技术奇客开发并管理;隶属于GeekerCloud奇客罗方智能科技
Site designed and developed by ITGeekerwhich is a sub-website of GeekerCloud
网站地图 | 沪ICP备2021031434号-4