CentOS 替代 PHP 開發機?

CentOS 替代 PHP 開發機?

我剛開始學習Linux。我正在使用 CentOS 6.3,我真的很喜歡它。但我需要 PHP 5.4,目前不適用於 CentOS。我讀到,CentOS 由於其自身的性質,不會經常更新軟體包。

您建議使用哪個發行版來取代 CentOS,並讓我享受 Apache/PHP 的最新版本?

答案1

不要放棄 CentOS!

解決這個問題的一個常見過程是利用REMI 儲存庫為了取得目前的 PHP 和 MYSQL 套件。

這應該可以滿足您的要求,並且仍然可以透過 Yum 進行管理。

指示:

您首先需要 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

這就是為了獲得 repo 所做的一切。對於 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

答案2

您可以透過安裝 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.

答案3

我在 Centos 6 上使用 EPEL 和 IUS 儲存庫獲得了最佳結果。

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 的好方法。

答案4

您可以安裝編譯器、工具和函式庫;

 # yum groupinstall 'Development Tools'

然後將 Apache 和 PHP 從原始程式碼編譯到 /opt/local 中,然後將其新增至 $PATH

相關內容