分类: LINUX
2007-07-02 10:29:52
安装Horde步骤或方法
保证PHP模块,HTTP是好的,下列包被正确安装
mysql-
mysqlclient10-
mysqlclient10-devel-
mysql-devel-
mysql-server-
perl-DBD-MySQL-2.9004-3.1.i386.rpm
php-
php-devel-
php-domxml-
php-imap-
php-ldap-
php-mysql-
php-pear-
下载Horde
wget
tar xzvf horde-webmail-
mv horde-webmail-
测试一下少了那些模块。另外要手工安装这两个模块
pear install fileinfo; #留意生成so路径(/usr/lib/php4/fileinfo.so);
pecl install memcache #留意生成so路径(/usr/lib/php4/memcache.so);
赋予模块文件执行权限:
chmod 755 /usr/lib/php4/fileinfo.so;
chmod 755 /usr/lib/php4/memcache.so;
检查PHP是否安装下列模块:
[root@Mail html]# rpm -qa |grep php-*
php-odbc-
php-
php-ncurses-
php-pgsql-
php-xmlrpc-
php-ldap-
php-pear-
php-devel-
php-mbstring-
php-imap-
php-snmp-
php-gd-
php-mcrypt-
php-domxml-
php-pecl-memcache-
php-mysql-
[root@Mail html]#
rpm -ivh ftp://fr.rpmfind.net/linux/PLD/current/dists/ra/updates/security/i386/libmcrypt-2.5.5-1.i386.rpm
rpm -Uvh
rpm -ivh
注(如果少依赖不知道是那个包,可以在这里找(这里输入少的库名))
也可以利用 yum -y install mhash php-mhash
及 yum -y install libmcrypt php-mcrypt 來安裝所需要的套件
pear install Crypt_CHAP
模块安装好后,进行Horde的初始配置
首先配置Mysql,启动mysqld,导入数据库。
先修改Horde的导入文件Vi /var/www/html/horde/scripts/sql/groupware.mysql.sql,找到
-- IMPORTANT: Change this password!
PASSWORD('hymis') //修改这里的密码,下面在配置Horde的时候要设置相同的密码,保存退出。
导入数据库:mysql < /var/www/html/horde/scripts/sql/groupware.mysql.sql
配置Horde与数据库的连接:
-------------------------------------------------------------------------------
cd /var/www/html/horde
./scripts/setup.php; #进入互动配置界面,调整相关参数,操作界面如下:
-------------------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
What is the root path on your web server for this installation? [/horde]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
如上显示,默认目录就是/horde(无需修改),直接按[Enter]键,显示操作菜单如下:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Configuration Menu
(0) Exit
(1) Configure database settings
(2) Create database or tables
(3) Configure administrator settings
Type your choice: 1 #选择操作菜单(1);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
显示(1)子操作菜单如下:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
What database backend should we use? [false]
(false) [None]
(dbase) dBase
(ibase) Firebird/InterBase
(fbsql) Frontbase
(ifx) Informix
(msql) mSQL
(mssql) MS SQL Server
(mysql) MySQL
(mysqli) MySQL (mysqli)
(oci8) Oracle
(odbc) ODBC
(pgsql) PostgreSQL
(sqlite) SQLite
(sybase) Sybase
Type your choice: mysql #配置使用mysql数据库,输入"mysql"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
配置连接数据库的连线性质:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Request persistent connections? [0]
(1) Yes
(0) No
Type your choice: 1 #使用持续连接
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
配置连接mysql数据库的用户名称(用前面刚建立的mysql用户horde):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Username to connect to the database as* [] horde #输入horde
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
配置连接mysql数据库的用户密码(用前面刚建立的mysql用户密码):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Password to connect with [] F5wMvP8Dzk
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
配置连接数据库的连接方式(可使用socket方式):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
How should we connect to the database? [unix]
(unix) UNIX Sockets
(tcp) TCP/IP
Type your choice: unix #输入unix,将使用socket连接数据库
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
指定socket文件的路径(用ps aux | grep mysql命令可发现mysql.sock的位置):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Location of UNIX socket [] /var/lib/mysql/mysql.sock #输入sock的完整路径
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
指定数据库名称(用前面刚建立的mysql数据库horde):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Database name to use* [] horde #输入数据库名称horde
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
配置内部使用的字符集:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Internally used charset* [iso-8859-1] #无须输入,直接按[Enter],使用缺省配置
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Configuration Menu
(0) Exit
(1) Configure database settings
(2) Create database or tables
(3) Configure administrator settings
Type your choice: 3
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
设置管理者用户名称(这里使用电邮地址作为用户名称):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Specify a mail user who should have administrator permissions (optional):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Configuration Menu
(0) Exit
(1) Configure database settings
(2) Create database or tables
(3) Configure administrator settings
Type your choice: 0
Thank you for using Horde Groupware Webmail Edition!
--------------------------------------------------------------------------------
自动生成的conf.php可能不完全符合系统的配置,需要手工调整部分参数:
--------------------------------------------------------------------------------
vi /var/www/html/horde/config/conf.php;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$conf['mailer']['params']['sendmail_path'] = '/usr/lib/sendmail';
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
请注意: 发送电邮需要指定上述参数;
--------------------------------------------------------------------------------
vi /var/www/html/horde/imp/config/servers.php //这里设置Horde收发邮件连接SMTP IMAP的参数
$servers['imap'] = array(
'name' => 'IMAP Server',
'server' => 'localhost',
'hordeauth' => false,
'protocol' => 'imap/notls',
'port' => 143,
'maildomain' => 'huayangprinting.com', //这项一定要加上.否则发邮件的时候会提示错误。
'realm' => '',
'preferred' => '',
);
调整网站的安全权限:
--------------------------------------------------------------------------------
chown root.apache /var/www/html/horde/config/*;
chmod 0440 /var/www/html/horde/config/*;
chown root.apache /var/www/html/horde/gollem/config/*;
chmod 0440 /var/www/html/horde/gollem/config/*;
--------------------------------------------------------------------------------
用户灯录,可以正常的收发邮件。修改用户默认的显示界面可以修改默认的参数,imp/config/prefs.php这个文件
max_msgs 这个表示一页显示多少封邮件
sortdir这个表示排序方式
compose_html 这个表示是否HTML编辑器和HTML显示。
安装通讯录,要导入通讯录的数据表。
mysql horde < /var/www/html/horde/turba/scripts/sql/turba_objects.mysql.sql
安装一些插件,比如自动回复(vacation),转发(forwards),改密码(passwd)
安装修改密码模块
修改密码的功能由Horde的一个非官方的模块Passwd for Imp完成。它通过向poppassd服务提交请求来完成修改密码的功能。
1. 安装Poppassd
1.1安装Poppassd
# cd /tmp
# tar zxvf poppassd-1.8.1.tar.gz
# cd poppassd-1.8.1
# make
# make install
1.2设置xinetd,创建文件/etc/xinetd.d/poppassd
# default: off
# The POPPASSD port 106.
service poppassd
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/sbin/poppassd
log_on_success += USERID
log_on_failure += USERID
}
重新启动xinetd
# /etc/rc.d/init.d/xinetd restart
1.3测试poppassd
# telnet localhost 106
如果看到欢迎信息,则poppassd成功安装
安装Passwd for Imp
2.1拷贝Passwd for Imp到horde目录
# cd /usr/local/apache/htdocs/horde/
# cp /tmp/passwd.tgz .
# tar zxvf passwd.tgz
2.2配置Horde和Imp使Passwd工作在Horde之下
编辑文件horde/config/registry.php,增加以下内容:
// 在Horde中注册passwd
$this->applications['passwd'] = array(
'fileroot' => dirname(__FILE__) . '/../passwd',
'webroot' => $this->applications['horde']['webroot'] . '/passwd',
'icon' => $this->applications['horde']['webroot'] .
'/passwd/graphics/lock.gif',
'name' => _("修改密码"), // 出现在链接上的文字
'allow_guests' => false,
'show' => true
);
在Imp中链接Passwd,编辑文件horde/imp/config/conf.php
$conf['menu']['apps'] = array('turba', 'passwd');
2.3配置passwd
# cd horde/passwd/config
# for foo in *.dist; do cp -v $foo `basename $foo .dist`; done
参考资料:
http://www.evanlin.com/blog/archives/000032.html