需要帮助在 CentOS 5 上安装 imap

需要帮助在 CentOS 5 上安装 imap

我对网络服务器还很陌生。我有自己的 DDS,但没有安装 imap。我请我的 ISP 安装它,但他们收费很高。在我看来,这应该不是什么大事,所以我开始谷歌搜索,并偶然发现了这篇文章:http://www.electrictoolbox.com/install-php-imap-centos/

好像我只需要执行 2 个命令:

sudo yum install php-imap
sude /etc/init.d/httpd graceful

我以“root”用户身份登录到我的服务器,这是他们提供给我的帐户。但是当我尝试第一个命令时,我得到了以下输出:

[root@dds ~]# sudo yum install php-imap
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.oxilion.nl
 * base: mirror.oxilion.nl
 * epel: ftp.nluug.nl
 * extras: mirror.oxilion.nl
 * rpmfusion-free-updates: mirror01.th.ifl.net
 * rpmfusion-free-updates-testing: mirror01.th.ifl.net
 * rpmfusion-nonfree-updates: mirror01.th.ifl.net
 * rpmfusion-nonfree-updates-testing: mirror01.th.ifl.net
 * updates: mirror.oxilion.nl
Excluding Packages in global exclude list
Finished
Setting up Install Process
No package php-imap available.
Nothing to do

如何实现安装php的imap功能?

期待你的回信!

荷兰向您致以亲切的问候。

本·弗兰森

更新 输出自less /etc/yum.conf(前约 20 个空行)

[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1

# Note: yum-RHN-plugin doesn't honor this.
metadata_expire=1h

installonly_limit = 5

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
exclude=apache* httpd* mod_* mysql* MySQL* da_* *ftp* exim* sendmail* php* bind-chroot*

** 更新 2 ** 您提供的命令的结果。

[root@dds ~]# rpm -q php httpd
package php is not installed
package httpd is not installed
[root@dds ~]#
[root@dds ~]# rpm -V php httpd
package php is not installed
package httpd is not installed
[root@dds ~]#

答案1

它肯定在那里。检查您的 yum 存储库配置,以/etc/yum.{conf,repos.d}确保该软件包没有因某种原因被排除。

答案2

用这个:

sudo yum 安装 --disableexcludes=all php-imap

这是一个一次性命令,用于安装 RPM,而无需修改排除列表。

对于 IMAP 服务器本身,我建议使用 dovecot,它只需要一些额外的配置就可以很好地工作。

答案3

@Rosco:我试过你的答案,至少 php-imap 现在已安装完毕!但我也调用了重新启动 httpd-service,但在我的 php 文件中,我仍收到一条未定义函数 imap_open 的消息……

命令输出:

[root@dds ~]# sudo yum install --disableexcludes=all php-imap
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.oxilion.nl
 * base: mirror.oxilion.nl
 * epel: ftp.nluug.nl
 * extras: mirror.oxilion.nl
 * rpmfusion-free-updates: mirror01.th.ifl.net
 * rpmfusion-free-updates-testing: mirror01.th.ifl.net
 * rpmfusion-nonfree-updates: mirror01.th.ifl.net
 * rpmfusion-nonfree-updates-testing: mirror01.th.ifl.net
 * updates: mirror.oxilion.nl
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-imap.x86_64 0:5.1.6-27.el5 set to be updated
--> Processing Dependency: php-common = 5.1.6-27.el5 for package: php-imap
--> Processing Dependency: libc-client.so.1()(64bit) for package: php-imap
--> Running transaction check
---> Package libc-client.x86_64 0:2004g-2.2.1 set to be updated
---> Package php-common.x86_64 0:5.1.6-27.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package              Arch            Version               Repository     Size
================================================================================
Installing:
 php-imap             x86_64          5.1.6-27.el5          base           54 k
Installing for dependencies:
 libc-client          x86_64          2004g-2.2.1           base          515 k
 php-common           x86_64          5.1.6-27.el5          base          153 k

Transaction Summary
================================================================================
Install       3 Package(s)
Upgrade       0 Package(s)

Total download size: 722 k
Is this ok [y/N]: y
Downloading Packages:
(1/3): php-imap-5.1.6-27.el5.x86_64.rpm                  |  54 kB     00:00
(2/3): php-common-5.1.6-27.el5.x86_64.rpm                | 153 kB     00:00
(3/3): libc-client-2004g-2.2.1.x86_64.rpm                | 515 kB     00:00
--------------------------------------------------------------------------------
Total                                           1.8 MB/s | 722 kB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : php-common                                               1/3
  Installing     : libc-client                                              2/3
  Installing     : php-imap                                                 3/3

Installed:
  php-imap.x86_64 0:5.1.6-27.el5

Dependency Installed:
  libc-client.x86_64 0:2004g-2.2.1       php-common.x86_64 0:5.1.6-27.el5

Complete!
[root@dds ~]# sudo /etc/init.d/httpd graceful

相关内容