File: INSTALL

package info (click to toggle)
davical 1.1.8-1%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 9,420 kB
  • sloc: php: 19,111; sql: 4,456; perl: 3,520; sh: 499; makefile: 83
file content (231 lines) | stat: -rw-r--r-- 7,516 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
Installation
============

Debian Users
------------

DAViCal is in Debian Sid so you should be able to simply:

apt-get install davical

Or synaptic or some other equivalent package manager to fetch and install
DAViCal and all the dependencies.

Skip to the "Database Setup" part if you have done that already.


Gentoo Users
------------

DAVical is in the Sunrise overlay. You will have to add this overlay,
following the instructions on https://overlays.gentoo.org/proj/sunrise.

You can then use emerge to install DAVical and its dependencies.

emerge davical


Other Linux Users
-----------------

You will need to download the latest versions of the davical and awl packages
from the DAViCal site. See https://www.davical.org/ for more information.

You will need to untar these. Preferably you will untar them from within
the "/usr/share" directory and everything will be in it's expected location
(well, except the docs, but it will at least be tidy and everything will be
in one place).

I would like to hear from non-Debian users regarding things I might have
missed, or things you have learned about the system, so please tell us on
IRC, or post to the mailing list or forums.


Non-Linux Users
---------------

I would really like to hear from you. As far as I can see there is no
reason why this can't all work on FreeBSD, Microsoft Windows, VMS, Mac OS
or whatever else, as long as the pre-requisites are able to be installed.

For Unix and unix-like operating systems the "Other Linux Users"
instructions are likely to be reasonably close to what you need. For other
systems everything will need some adjustment, and in particular some of
the path name and shell expectations coded into the database creation
scripts are likely to need love.

I'm available to answer questions, anyway :-)

Getting Help
------------

The best place to get help is on IRC.  The official DAViCal
IRC channel is #davical on irc.oftc.net

The starting point for further help should be the DAViCal website
at https://www.davical.org/ and from there you might visit the wiki
which contains a fair amount of information about configuring
DAViCal in a variety of different circumstances.


Pre-requisites
==============

DAViCal depends on a number of things.  Firstly, it depends
on Andrew's Web Libraries (AWL) which is a set of useful
PHP functions and objects written by Andrew McMillan over
a number of years.

The following other software is also needed:
  Apache: 1.3.x or 2.x.x
  PHP: 5.1 or greater (along with the PDO and PostgreSQL extensions)
  PostgreSQL: 8.2 or greater

The PostgreSQL database may be installed on a server other
than the web server, and that kind of situation is recommended
if you want to increase the security or scalability of your
installation.

Since the CalDAV store takes over a significant amount of path
hierarchy, it is designed to be installed in it's own virtual
host.  If you want it to operate within the web root of some
other application I will happily accept patches to make it do
that, but I am pretty sure it won't work that way out of the
box.

Several helper programs are needed to setup and upgrade davical:
  Perl with DBI and DBD-Pg
    Debian: aptitude install libdbi-perl libdbd-pg-perl
    Gentoo: emerge dev-perl/DBI dev-perl/DBD-Pg

  Yaml
    Debian: aptitude install libyaml-perl
    Gentoo: emerge dev-perl/yaml

  pwgen (not mandatory)
    Debian: aptitude install pwgen
    Gentoo: app-admin/pwgen

Database Setup
==============

On your database server you will need to create a user called
'general' which should not be able to create databases or users,
and which will be granted minimum privileges for the application.

To create the database itself, run the script:

dba/create-database.sh

Note that this script calls the AWL database scripts as part
of itself and it expects them to be located in /usr/share/awl/dba
which might be a reasonable place, but it might not be where you
have put them.

This script also expects to be running as a user who has rights
to create a new database.




Apache VHost Configuration
==========================

Your Apache instance needs to be configured for Virtual Hosts.  If
this is not already the case you may want to read some documentation
about that, and you most likely will want to ensure that any existing
site becomes the **default** virtual host, with DAViCal only being a
single virtual host.

I use a Virtual Host stanza like this:

#
# Virtual Host def for Debian packaged DAViCal
<VirtualHost 123.4.56.78 >
  DocumentRoot /usr/share/davical/htdocs
  DirectoryIndex index.php index.html
  ServerName davical.example.net
  ServerAlias calendar.example.net
  Alias /images/ /usr/share/davical/htdocs/images/
  php_value include_path /usr/share/davical/inc:/usr/share/awl/inc
  php_value magic_quotes_gpc 0
  php_value register_globals 0
  php_value error_reporting "E_ALL & ~E_NOTICE"
  php_value default_charset "utf-8"
</VirtualHost>

Replace 123.4.56.78 with your own IP address, of course (you can
use a name, but your webserver may fail on restart if DNS happens
to be borked at that time).

At this point it is necessary to have register_globals enabled. All
variables are sanitised before use, but some routines do assume
this is turned on.

The various paths and names need to be changed to reflect your
own installation, although those are the recommended locations
for the various pieces of the code (and are standard if you
installed from a package.

Once your VHost is installed an working correctly, you should be
able to browse to that address and see a page telling you that
you need to configure DAViCal.



DAViCal Configuration
=====================

The DAViCal configuration generally resides in /etc/davical/<domain>-conf.php
and is a regular PHP file which sets (or overrides) some specific variables.

<?php
//  $c->domainname = "calendar.example.net";
//  $c->sysabbr     = 'davical';
//  $c->admin_email = 'admin@example.net';
//  $c->system_name = "DAViCal CalDAV Server";
//  $c->collections_always_exist = false;

  $c->pg_connect[] = 'dbname=davical port=5432 user=general';

?>

Multiple values may be specified for the PostgreSQL connect string,
so that you can (e.g.) use PGPool to cache the database connection
but fall back to a raw database connection if it is not running.

The "collections_always_exist" value defines whether a MKCALENDAR
command is needed to create a calendar collection before calendar
resources can be stored in it.  You will want to leave this to the
default (true) if people will be using Evolution or Sunbird /
Lightning against this because that software does not support the
creation of calendar collections.

You should set the 'domainname' and 'admin_email' as they are used
within the system for constructing URLs, and for notifying some
kinds of events.


Completed?
==========

If all is going well you should now be able to browse to the admin
pages and log in as 'admin' (the password is the bit after the '**'
in the 'password' field of the 'usr' table so:

psql davical -c 'select username, password from usr;'

should show you a list.  Note that once you change a password it
won't be readable in this way - only the initial configuration
leaves passwords readable like this for security reasons.

If all is working then you should be ready to configure a client
to use this, and the docs for that are elsewhere.

See:

https://wiki.davical.org/

Which is the place where documentation will generally be kept up to
date the most.