On 2010/09/18 8:41 AM, Freek Dijkstra wrote:
I'm trying to get starting running a carddav server under Linux, but got
stuck.
I recently got CalDAV working under Linux (I have to look into getting
CardDAV setup soon) but since they're similar hopefully my workarounds will
work for you too! I'm guessing that most of what I've posted below should
work just by substituting caldavd for carddavd when necessary.
The ./run -I command does not seem to work:
./run -I /opt/calendarserver
did
* create a folder /opt/calendarserver/bin with a copy of all tools from
/usr/bin and /usr/local/bin (huh?)
* abort with an error rsync: change_dir "/usr/caldavd" failed: No such
file or directory (2) (huh again?)
Installation worked (mostly) for me but I used a system install (-i):
$ ./run -i /opt/CalendarServer
First thing you'll want to do is setup some default configs:
$ rm -rf /opt/CalendarServer/usr/caldavd/caldavd.plist
$ cp conf/servertoserver-test.xml
/opt/CalendarServer/etc/caldavd/servertoserver.xml
$ cp conf/accounts.xml /opt/CalendarServer/etc/caldavd/accounts.xml
$ cp conf/caldavd-test.plist /opt/CalendarServer/etc/caldavd/caldavd.plist
$ cp conf/sudoers.plist /opt/CalendarServer/etc/caldavd/sudoers.plist
$ chmod 600 /opt/CalendarServer/etc/caldavd/*
I presume that twisted searches for a *.tap, *.tax or *.tas file in the
current directory, and executes that application description. However, I
can not find any such file in the calendarserver directory (there is
this calendarserver/tap folder though). However, I'm at loss why it
behaves differently with logging on or off.
There are two bugs on Linux [1] [2] that result in in the Twisted extensions
being installed to the wrong place on 64-bit systems, resulting in an error
similar to what you're describing - are you on x86_64 by any chance?
To fix the x86_64 bug, run:
mv ../lib/python2.6/site-packages/twisted/plugins/caldav.py*
../lib64/python2.6/site-packages/twisted/plugins
As for the PYTHONPATH bug, you'll need to modify the PYTHONPATH variable set
in /opt/CalendarServer/usr/bin/caldavd and include the "site-packages"
folders inside your CalendarServer installation directory as well as the
system packages. For reference, mine looks like this:
PATH="/usr/bin:$PATH"
DESTDIR=/opt/CalendarServer
PYTHONPATH="/usr/lib/python2.6/site-packages/:$PYTHONPATH:$DESTDIR/usr/lib/python2.6/site-packages/:$DESTDIR/usr/lib64/python2.6/site-packages/"
I've added $DESTDIR to make it easy to change later should I decide to move
my CalendarServer installation out of /opt. If you're using x86, then forget
the last part with the lib64 (":$DESTDIR/usr/lib64/python2.6/site-packages/")
[1] https://trac.calendarserver.org/ticket/391
[2] https://trac.calendarserver.org/ticket/390
Just to emphasize my noob status, let me ask the obvious question:
how do I start the server and have it read the config file?
Any help is highly appreciated.
I have a little script "run.sh" that I use when testing:
#!/bin/sh
/opt/CalendarServer/usr/bin/caldavd -X -f
/opt/CalendarServer/etc/caldavd/caldavd.plist -T
/opt/CalendarServer/usr/bin/twistd
That starts CalendarServer forcing the use of the CalendarServer-patched
Twisted with config file /opt/CalendarServer/etc/caldavd.
Regards,
Stewart
_______________________________________________
calendarserver-users mailing list
calendarserver-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/calendarserver-users