如何在CentOS 5服务器上安装PHP MCrypt +库(libmcrypt)

我试图在我的服务器上安装mCrypt for PHP,在此之前,我发现我需要安装libmcrypt以及…

不幸的是,我找不到通过谷歌的任何指示,实际工作。

我原来只是尝试yum install php-mcrypt但我得到No package php-mcrypt available. – 所以我认为这是因为我没有安装libmcrypt呢?

谢谢!

回购清单:

 $ yum repolist Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.cogentco.com * epel: mirror.cogentco.com * extras: centos.aol.com * rpmforge: fr2.rpmfind.net * updates: mirror.ash.fastserv.com repo id repo name status base CentOS-5 - Base enabled: 3,535 epel Extra Packages for Enterprise Linux 5 - x86_64 enabled: 6,642 extras CentOS-5 - Extras enabled: 299 rpmforge RHEL 5 - RPMforge.net - dag enabled: 10,695 updates CentOS-5 - Updates enabled: 765 repolist: 21,936 

我已经得到了一些远在这里..图书馆安装成功。 mcrypt虽然依赖关系有一些错误:

 Running Transaction Installing : php-common 1/5 warning: /etc/php.ini created as /etc/php.ini.rpmnew Installing : php-cli 2/5 Installing : httpd 3/5 Error unpacking rpm package httpd-2.2.3-45.el5.centos.1.x86_64 warning: /etc/httpd/conf/httpd.conf created as /etc/httpd/conf/httpd.conf.rpmnew warning: /etc/httpd/conf/magic created as /etc/httpd/conf/magic.rpmnew error: unpacking of archive failed on file /etc/httpd/logs: cpio: rename Installing : php 4/5 Installing : php-mcrypt 5/5 Installed: php-mcrypt.x86_64 0:5.1.6-15.el5.centos.1 Dependency Installed: php.x86_64 0:5.1.6-27.el5_5.3 php-cli.x86_64 0:5.1.6-27.el5_5.3 php-common.x86_64 0:5.1.6-27.el5_5.3 Failed: httpd.x86_64 0:2.2.3-45.el5.centos.1 Complete! 

更新MIKE

 [root@server ~]# fuser -k 80/tcp 80/tcp: 17496 17502 17503 17504 17505 17590 [root@server ~]# service httpd restart httpd not running, trying to start [root@server ~]# service httpd status Looking up localhost Making HTTP connection to localhost Sending HTTP request. HTTP request sent; waiting for response. Alert!: Unexpected network read error; connection aborted. Can't Access `http://localhost/whm-server-status' Alert!: Unable to access document. lynx: Can't access startfile 

另外,这是在Apache错误日志:

 [Sat Aug 20 16:59:33 2011] [error] (13)Permission denied: Cannot open SSLSessionCache DBM file `/usr/local/apache/logs/ssl_scache' for writing (store) 

在我看来,你的/ etc / httpd / logs不再是一个符号链接

 ls -lsd /etc/httpd/logs 

应该指出

 /var/log/httpd 

编辑

从你的评论看来,这不是一个符号链接了

 mv /etc/httpd/logs /etc/httpd/logs.bak ln -s /var/log/httpd /etc/httpd/logs service httpd restart 

然后尝试百胜升级

你正在通过安装这些rpm包来搞砸你的“cPanel”服务器apache + php。 在cPanel中,你需要使用easyapache来编译apache和php来启用额外的模块(easyapache脚本中的一切都很方便,你只需要select相应的包)。 cPanel使用自定义的Apache和PHP构build网站,你需要以cPanel的方式做到这一点。 我假设你删除了yum.conf中的排除列表来实现这些安装。 要恢复您的服务器,

  1. 卸载您安装的apache&php rpms。
  2. select必要的模块运行eachyapache,带回apache活着。

你可以从命令行运行easyapache脚本(在屏幕上会很好)

 **/scripts/easyapache** 

或者可以使用WHM重新编译你的apache + php。 另外请确保在yum.conf中放回排除列表以防止再次发生。

 exclude=apache* bind-chroot courier* dovecot* exim* filesystem httpd* mod_ssl* mysql* nsd* perl* php* proftpd* pure-ftpd* ruby* spamassassin* squirrelmail* 

对于EasyApache文档: http : //docs.cpanel.net/twiki/bin/view/EasyApache3/

– $

安装remi或Atomic回购,然后重试。