[CalendarServer-users] Getting started under Linux
maillist at diffingo.com
Sat Sep 18 07:37:20 PDT 2010
On 2010/09/18 8:41 AM, Freek Dijkstra wrote:
> I'm trying to get starting running a carddav server under Linux, but got
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
> * 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
$ 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   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:
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:
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/")
> 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:
/opt/CalendarServer/usr/bin/caldavd -X -f
That starts CalendarServer forcing the use of the CalendarServer-patched
Twisted with config file /opt/CalendarServer/etc/caldavd.
More information about the calendarserver-users