CentOS取代PHP开发机器?

我刚开始学习Linux。 我使用的是CentOS 6.3,我非常喜欢它。 但是我需要PHP 5.4,目前不可用于CentOS。 我读过CentOS,因为它本身的性质,并不经常更新软件包。

你会build议replaceCentOS,让我享受最新版本的Apache / PHP?

不要放弃CentOS!

解决这个问题的一个常见的过程是使用REMI库来获得当前的PHP和MYSQL包。

这应该满足您的要求,仍然通过百胜pipe理。

说明:

您将首先需要EPEL存储库。 然后是REMI文件。

wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm 

这是为了得到回购。 对于PHP,如下所示:

 yum --enablerepo=remi,remi-test install nginx php php-fpm php-common php-pear php-pdo php-mysql php-pgsql php-pecl-memcache php-gd php-mbstring php-mcrypt php-xml 

您可以通过Webtatic回购安装PHP 5.4:

 Name : php54w Arch : x86_64 Version : 5.4.6 Release : 1.w6 Size : 1.2 M Repo : webtatic Summary : PHP scripting language for creating dynamic web sites URL : http://www.php.net/ License : PHP Description: PHP is an HTML-embedded scripting language. PHP attempts to make it : easy for developers to write dynamically generated webpages. PHP also : offers built-in database integration for several commercial and : non-commercial database management systems, so writing a : database-enabled webpage with PHP is fairly simple. The most common : use of PHP coding is probably as a replacement for CGI scripts. : : The php54w package contains the module which adds support for the PHP : language to Apache HTTP Server. 

我在使用EPEL和IUS存储库的Centos 6上获得了最好的结果。

http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/ius-release-1.0-10.ius.el6.noarch.rpm http://fedora.mirror.nexicom.net/epel /6/i386/epel-release-6-7.noarch.rpm

# yum search php54

组合存储库以极低的版本冲突提供出色的软件包访问。 这也是获得nginx和php-fpm的好方法。

如果它是一个开发机器(即不是一个长期服务器),你可以看看密切相关的Fedora 。 Fedora的当前版本使用PHP 5.4.1。

Fedora项目由Red Hat赞助,作为未来RHEL想法的testing平台,因此CentOS和Fedora都是密切相关的。 诀窍是Fedora是最先进的(新版本每6个月),但安全和bug修复更新将在大约13个月后停止,这使得它不适合服务器部署。

您还应该考虑如何在未来的服务器平台上安装PHP 5.4。 如上所述,Fedora不适合服务器部署,除非您不希望服务器在一年之后,因为在那时它将不受支持。

你可以安装编译器,工具和库;

  # yum groupinstall 'Development Tools' 

然后将Apache和PHP从源代码编译到/ opt / local,然后将其添加到$ PATH中