4月 102013
 

安装必要条件

为Horde Groupware编译受支持的PHP5.3.22运行环境

# yum install openssl-devel libpng-devel \
libjpeg-devel libicu-devel libtidy-devel \
libc-client-devel \
autoconf ImageMagick-devel libssh2-devel

配置并编译PHP

 ./configure --prefix=/usr/local/php \
--with-apxs2=/usr/local/apache/bin/apxs \
--with-mysql=/usr/local/mysql \
--with-pdo-mysql=/usr/local/mysql \
--with-libxml-dir=/usr/local/libxml2 \

--enable-mbstring \
--with-kerberos --with-imap-ssl \
--with-imap=/usr/local/dovecot/include/dovecot/ \

--with-gettext --with-tidy \
--with-gd --with-png-dir --with-jpeg-dir \
--with-openssl --enable-intl \

--enable-ftp --with-zlib \

错误分析–enable-intl

checking for location of ICU headers and libraries... not found
configure: error: Unable to detect ICU prefix or no failed. Please verify ICU
 install prefix and make sure icu-config works.

#yum install libicu-devel

错误分析 –with-tidy

checking for TIDY support... yes
configure: error: Cannot find libtidy

# yum install libtidy-devel

 

Horde建议安装的PHP Extension Community Library

错误分析 pecl install

Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.

# yum install autoconf

安装imagick

# pecl install imagick

安装成功并在配置文件中添加PHP扩展

install ok: channel://pecl.php.net/imagick-3.0.1
configuration option “php_ini” is not set to php.ini location
You should add “extension=imagick.so” to php.ini

horde-groupware-504-01

错误分析 pecl install imagick

checking ImageMagick MagickWand API configuration program... 
configure: error: not found. Please provide a path to
 MagickWand-config or Wand-config program.
ERROR: `/tmp/pear/temp/imagick/configure --with-imagick' failed

# yum install ImageMagick-devel

安装lzf

horde-groupware-504-02 horde-groupware-504-03

安装memcache

horde-groupware-504-04

horde-groupware-504-05

使用PEAR在线安装horde groupware

1

[root@localhost ~]# pear channel-discover pear.horde.org
Adding Channel "pear.horde.org" succeeded
Discovery of channel "pear.horde.org" succeeded
[root@localhost ~]#

2

[root@localhost ~]# pear install horde/horde_role
downloading Horde_Role-1.0.1.tgz ...
Starting to download Horde_Role-1.0.1.tgz (10,977 bytes)
.....done: 10,977 bytes
install ok: channel://pear.horde.org/Horde_Role-1.0.1
horde/Horde_Role has post-install scripts:
/usr/share/pear/PEAR/Installer/Role/Horde/Role.php
Horde_Role: Use "pear run-scripts horde/Horde_Role" to finish setup.
DO NOT RUN SCRIPTS FROM UNTRUSTED SOURCES
[root@localhost ~]#

3

[root@localhost ~]# pear run-scripts horde/Horde_Role
Including external post-installation script "/usr/local/php/lib/php/PEAR
/Installer/Role/Horde/Role.php" - any errors are in this script
Inclusion succeeded
running post-install script "Horde_Role_postinstall->init()"
init succeeded
Filesystem location for the base Horde application : /usr/local/apache/htdocs
Configuration successfully saved to PEAR config.
Install scripts complete
[root@localhost ~]#

4

# pear install horde/webmail

安装成功

install ok: channel://pear.horde.org/Horde_Crypt-2.1.3
install ok: channel://pear.horde.org/Horde_Notification-2.0.1
install ok: channel://pear.horde.org/Horde_Core-2.4.3
install ok: channel://pear.horde.org/content-2.0.2
install ok: channel://pear.horde.org/timeobjects-2.0.3
install ok: channel://pear.horde.org/Horde_Form-2.0.3
install ok: channel://pear.horde.org/Horde_Rpc-2.0.3
install ok: channel://pear.horde.org/horde-5.0.4
install ok: channel://pear.horde.org/imp-6.0.4
install ok: channel://pear.horde.org/ingo-3.0.3
install ok: channel://pear.horde.org/kronolith-4.0.4
install ok: channel://pear.horde.org/mnemo-4.0.3
install ok: channel://pear.horde.org/nag-4.0.2
install ok: channel://pear.horde.org/turba-4.0.3
install ok: channel://pear.horde.org/webmail-5.0.4

查看文件

horde-groupware-504-06

为HORDE GROUPWARE 5.0.4创建数据并授权

mysql> create database groupware;
Query OK, 1 row affected (0.00 sec)

mysql> grant all on groupware.* to groupware;
Query OK, 0 rows affected (0.00 sec)

mysql> grant all on groupware.* to groupware@localhost;
Query OK, 0 rows affected (0.00 sec)

mysql> set password for groupware@localhost=password(‘gwpasswd’);
Query OK, 0 rows affected (0.00 sec)

 

[root@localhost ~]# pear config-get bin_dir
/usr/local/php/bin

horde-groupware-504-07

 

horde-groupware-504-08

horde-groupware-504-09

 

horde-groupware-504-10

修改配置文件启用测试页面

[root@localhost ~]# vi /usr/local/apache/htdocs/config/conf.php
$conf['testdisable'] = false;

horde-groupware-504-11

修改Webmail目录及文件所有者为apache用户和组

[root@localhost ~]# cd /usr/local/apache/htdocs/
[root@localhost htdocs]# chown -R apache.apache .

……

horde-groupware-504-12

[root@localhost ~]# pear install HTTP_WebDAV_Server
Failed to download pear/HTTP_WebDAV_Server within preferred state “stable”, latest release is version 1.0.0RC8, stability “beta”, use “channel://pear.php.net/HTTP_WebDAV_Server-1.0.0RC8” to install
install failed
[root@localhost ~]# pear install channel://pear.php.net/HTTP_WebDAV_Server-1.0.0RC8
downloading HTTP_WebDAV_Server-1.0.0RC8.tar …
Starting to download HTTP_WebDAV_Server-1.0.0RC8.tar (Unknown size)
…………………………….done: 159,744 bytes
install ok: channel://pear.php.net/HTTP_WebDAV_Server-1.0.0RC8
[root@localhost ~]#

horde-groupware-504-13

[root@localhost ~]# pear install Net_SMTP
WARNING: “pear/Auth_SASL” is deprecated in favor of “pear/Auth_SASL2”
downloading Net_SMTP-1.6.1.tar …
Starting to download Net_SMTP-1.6.1.tar (Unknown size)
…………….done: 65,024 bytes
install ok: channel://pear.php.net/Net_SMTP-1.6.1
[root@localhost ~]#

horde-groupware-504-14

[root@localhost ~]# pear install XML_Serializer
Failed to download pear/XML_Serializer within preferred state “stable”, latest release is version 0.20.2, stability “beta”, use “channel://pear.php.net/XML_Serializer-0.20.2” to install
install failed
[root@localhost ~]# pear install channel://pear.php.net/XML_Serializer-0.20.2
WARNING: “pear/XML_Parser” is deprecated in favor of “pear/XML_Parser2”
downloading XML_Serializer-0.20.2.tar …
Starting to download XML_Serializer-0.20.2.tar (Unknown size)
…………………………………………………done: 273,408 bytes
downloading XML_Parser-1.3.4.tar …
Starting to download XML_Parser-1.3.4.tar (Unknown size)
…done: 90,624 bytes
install ok: channel://pear.php.net/XML_Parser-1.3.4
install ok: channel://pear.php.net/XML_Serializer-0.20.2
[root@localhost ~]#

horde-groupware-504-15

配置IMP邮件服务器端参数

[root@localhost ~]# cd /usr/local/apache/htdocs/imp/config/
[root@localhost config]# cp backends.php backends.local.php
[root@localhost config]# vi backends.local.php

登录

horde-groupware-504-16

horde-groupware-504-17

 

horde-groupware-504-18

关闭测试页面

horde-groupware-504-19

错误分析

# cat /usr/local/apache/logs/error_log
[Wed Apr 10 02:16:46 2013] [error] [client 192.168.1.151] PHP Warning:  phpinfo() [<a href=’function.phpinfo’>function.phpinfo</a>]: It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘Asia/Chongqing’ for ‘CST/8.0/no DST’ instead in /usr/local/apache/htdocs/php.php on line 1

修改php.ini时区设置

# vi /usr/local/php/lib/php.ini
date.timezone = Asia/Chongqing

3月 302013
 

为Horde Webmail 1.2.11编译的PHP 5.2.17环境配置

horde-webmail-03

ss

horde-webmail-04

 

horde-webmail-05

修改Horde日志文件路径

horde-webmail-06

错误分析1 登录webmail页面反应缓慢且产生错误日志信息

Apr 08 13:54:18 HORDE [warning] [imp] Could not complete request. 
Reason Given: [AUTHENTICATIONFAILED] Authentication 
failed.: NO [pid 12547 on line 384 of "/usr/local/horde/imp/lib/IMAP/Client.php"]

修改dovecot验证方法配置

# vi /usr/local/dovecot/etc/dovecot/conf.d/10-auth.conf
auth_mechanisms = plain login

错误分析2 通过Horde Webmail发送邮件失败

horde-webmail-07

发送邮件失败时的Horde错误日志

Apr 01 11:27:25 HORDE [error] [imp] sendmail returned error code 127 
[pid 23321 on line 754 of "/usr/local/horde/imp/lib/Compose.php"]

发送邮件失败时的Apache错误日志

sh: /usr/lib/sendmail: 没有那个文件或目录

解决方法

[root@mail ~]# cd /usr/lib/
[root@mail lib]# ln -s /usr/sbin/sendmail sendmail

相关下载:(1) Horde Webmail 1.2.11