通过 apt-get 安装

1. 添加 apt 源: sudo nano /etc/apt/sources.list   添加: deb http://debian.mcmillan.net.nz/debian lenny awm

2. 获取 Public Key: sudo apt-key advanced –keyserver pgp.net.nz –recv-keys F6E0FA5CF0307507BB23A512EAFCFEBF8FEB8EBF

3. 更新 apt 库: sudo apt-get update

4. 安装 DaviCal: sudo apt-get install davical

 

初始化 DaviCal 数据库

su postgres /usr/share/davical/dba/create-database.sh

(初始化 DAViCal  数据库之后,终端会提示管理员初始密码,注意记下来)

 

修改 pg_hba.conf

nano /var/postgres/pg_hba.conf

加入:local   davical    davical_app   trust

加入:local   davical    davical_dba   trust

 

修改 DaviCal 服务端配置文件

sudo nano /etc/davical/config.php

<?php
$c->domain_name = “www.xxxx.com”;
$c->sysabbr = ‘DAViCal’;
$c->admin_email = ‘xxx@xxxxx.xxx’;
$c->system_name = “XXXX DAViCal Server”;
$c->enable_row_linking = true;
$c->pg_connect[] = ‘dbname=davical port=5432 user=davical_app’;

$c->do_not_sync_from_ldap = array(‘admin’ => true);
$c->authenticate_hook[‘call’] = ‘LDAP_check’;
$c->authenticate_hook[‘config’] = array(
‘host’ => ‘ldap://xxx.xxx.xxx.xxx’,
‘bindDN’ => ‘LDAP_USERNAME’,
‘passDN’ => ‘PASSWORD’,
‘baseDNUsers’ => ‘OU=XXXX,DC=XXXXXXXX,DC=XXX’,
‘protocolVersion’ => 3,
‘optReferrels’ => 0,
‘filterUsers’ => ‘(&(objectclass=person)(objectclass=user))’,
‘mapping_field’ => array(“username” => “sAMAccountName”,
“updated” => “whenChanged” ,
“fullname” => “cn” ,
“email” =>”mail”),
‘default_value’ => array(“date_format_type” => “E”,”locale” => “en_NZ”),
‘format_updated’=> array(‘Y’ => array(0,4),
‘m’ => array(4,2),
‘d’ => array(6,2),
‘H’ => array(8,2),
‘M’ => array(10,2),
‘S’ => array(12,2)),
);
include_once(‘drivers_ldap.php’);