在CentOS 4.4上安装php-mcrypt

我需要让php-mcrypt运行在CentOS 4.4上,所以我可以使用PHP mcrypt模块(按照公司策略)。

我曾尝试通过yum进行安装,就像我在CentOS 5.5中做的那样,没有运气。

[root@server www]# yum install php-mcrypt Setting up Install Process Setting up repositories Reading repository metadata in from local files Parsing package install arguments No Match for argument: php-mcrypt Nothing to do [root@server www]# cat /etc/redhat-release CentOS release 4.4 (Final) 

我对CentOS的经验很less,所以我不知道下一步该怎么做。

对于CentOS 4.x,php-mcrypt位于centoplus资源库中。 可以使用以下命令安装它。

 yum install php-mcrypt --enablerepo=centosplus 

警告!! 安装在你的服务器上的php-mcrypt的版本必须与你的服务器上的php版本(或者至less是在相同的库下编译)相匹配。 从centosplus存储库安装php-mcrypt RPM将导致PHP的主要版本更改 – 您将从4.xx升级到5.1.x. 这可能会或可能不会成为您的应用程序的问题。

或者,您可能想使用Atomicorp yum存储库 。 他们有PHP 5.2,并经常更新的最新版本的LAMP堆栈。