当谈到web服务器时,我很新。 我有我自己的DDS,但没有安装imap。 我问我的ISP安装它,但他们收取很多。 在我看来,这不应该是太多的工作,所以我开始使用谷歌search和来横跨这篇文章: http ://www.electrictoolbox.com/install-php-imap-centos/。
看来我只需要执行2个命令:
sudo yum install php-imap sude /etc/init.d/httpd graceful
我以用户“root”login到我的服务器,这是他们提供给我的帐户。 但是,当我尝试第一个命令,我得到这个输出:
[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的imapfunction?
期待你的回信!
来自荷兰的亲切问候。
本·弗朗森
从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 ~]#
这绝对是。 请检查/etc/yum.{conf,repos.d}的yum存储库configuration,以确保该包由于某种原因未被排除。
用这个:
sudo yum install –disableexcludes =所有php-imap
这是一个一次性的命令来安装一个RPM,而无需修改排除列表。
对于IMAP服务器本身,我build议dovecot这对我来说很好,只需要less量的额外configuration。
@Rosco:我已经试过你的答案了,至less现在已经安装了php-imap! 但我也打电话来重新启动httpd服务,但在我的PHP文件我stell得到一个消息,一个未定义的函数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