[CalendarServer-users] Install of CalenderServer fails on Ubuntu 10.04

Robert Moggach rob at dashing.tv
Tue Feb 1 09:33:07 PST 2011


Got it working with a little sweat. I have a few things to work through though for a clean integration...
Because it wasn't working out of the box with addressbook you'll notice I create a separate carddavd server in here... I think this is redundant, right?

So this was last night:

1) Install ubuntu server 10.04 with minimal virtual install on my virtual host machine (virtualbox macbook pro ) with intent of migrating .vdi to .qcow2 on my main virtual machine host server. (quad 6-core hp with 16 sas drives)

2) Install the basic ubuntu server and ssh server and let it reboot.

3) Install some of my usuals... apt-get install wget acpid multitail

4) Edit /etc/fstab to enable xattrs by adding the 'user_xattr' option then run 'mount / -o remount' (sudo)

5) Install the dependencies and a few other things...
	apt-get build-dep postgresql
	apt-get install python-setuptools python-xattr python-twisted subversion curl python-ldap python-pip
	apt-get install libldap-2.4-2 slapd libldap2-dev libsasl2-modules-ldap libsasl2-2 libsasl2-dev libsasl2-modules sasl2-bin php5-sasl
	apt-get install libkrb5-dev attr build-essential libssl-dev bzip2 
	apt-get install python-pysqlite2 python-zodb python-pyopenssl python-dateutil  python-twisted python-vobject python-kerberos python-dev
	apt-get install libtool readlin6-dev libzip-dev rehash
	
6) I checked out revision 6836 into /root/CalendarServer
	svn co http://svn.macosforge.org/repository/calendarserver/CalendarServer/trunk/ /root/CalendarServer

7) I tried a number of ways...
	a) starting with ./run -s which installs the dependencies into /root/  ...( be nice if this was a virtualenv instead? although it kind of is)
	b) then I did ./run -i /opt/caldavd like one of the blogs out there...
	c) started to get a sense of what was happening so then went back to the dependencies that were downloaded and looking at the support/build.sh script rebuilt them all manually from the source to get a real system install based on the ubuntu prefixes etc.
	d) some of the compiles break... things like pg_config are not on the path after they're installed so i fixed alot of these things by adjust the system path as need be... I could've fixed the prefix in some of those apps but... 1am... 
	e) also need to fix some of the ld/lib dirs... add /usr/local/lib and /usr/local/pgsql/lib to /etc/ld.so.conf.d/libc.conf and run ldconfig -v to reload
	f) it's really just a trial and error... step through the build.sh dependencies one by one and make sure where need be you also install the libraries for python apps... (using python setup.py install_lib) (also some have scripts and other install options... )
	g) basically what i did... copy the whole './run -s' history from my shell to a text editor and walk through it trying to duplicate it for my manual compile/install

8) Not working... So I see all these things in /usr/local/bin ... carddavd calendarserver_manage_principals... etc. etc.. but they don't work SO copy them from the build directory in the original isolated build I did using './run -s'

9) Hmmm... not working... there are a bunch of missing python libs namely twistedcaldav txdav twext calendarserver and also the twisted plugins so I copy these to the system python... also watch the twisted cache files... i just deleted them and killed the pyc files as well to start byte-compiles fresh

10) Still?? ok... look at the plugins.... hmm... there are some in the build directory too so I looked at those and they have the TAP code built in but only for the caldavd plugin so I copy that to the system python and then copy that file to carddavd.py and replace the lines that reference the TAP bits at the end with the same lines from the carddavd plugin

11) Create all the directories we need... (these will cause errors/exceptions)
	/etc/caldavd
	/etc/carddavd
	/var/db/caldavd
	/var/db/carddavd
	/var/log/carddavd
	/var/log/caldavd

12) Create users...
	adduser --system --group caldavd --no-create-home
	adduser --system --group carddavd --no-create-home

13) Add them to groups...
	adduser carddavd ssl-certs
	adduser caldavd ssl-certs
	adduser caldavd carddavd (just because)
	adduser carddavd caldavd

14) Read through all the different config files... I think the resources ones seem the most complete... watch for typos -- cardavd instead of carddavd in a few of them. I followed along with some of the blogs out there and my hybrid is working. Edit them for ubuntu standards... (as much as possible that is)

15) caldav seems to be working great... except I don't know how to add group calendars ... I can add write proxies but no calendar exists... 

16) carddavd... why isn't it working... ahh... memcached using the same port so kill caldavd and try again... works after I realize that the path is the issue... it doesn't autosense it when I run my hacked carddavd...  this helps... http://www.ronregev.com/misc/pim_server_tutorial/  but man is that a painful hack...

17) now realize that caldavd is running an addressbook server... time to get that working....



More information about the calendarserver-users mailing list