Running iCal Server on Tiger Part 1
So if you are at WWDC you picked up your Leopard preview disks and have been tearing through them with great enthusiasm. We have ours and it's really cool stuff, but we also can't tell you about anything beyond what is on the Apple webpage or the NDA ninjas will drop from the ceiling and attack.One bit that we can talk about in a bit more detail is the iCal Server since it, along with a few other projects, have been turned out to the community on the new Mac OS Forge site.
This article is going to cover the quick and dirty way to get caldavd running on Mac OS X Server 10.4. Part 2 is going to cover how to integrate it with your existing directory services the best that we can with the currently available code.
(Updated 9/13/2006)
Read on for more...
First things first
Apple has released several more projects as traditional open source efforts this week. Bonjour, xnu, launchd, and caldavd (iCal Server) have all joined WebKit at the new Mac OS Forge site. This is really cool stuff, as some of these projects are completely home grown, and not things that Apple had simply modified existing OSS projects for.
Anyway, there are a few things that we need to download before we can get everything up and running. Obviously to do any of this you need to have a current version of Xcode installed.
Getting the source
Getting the source code is pretty easy with Subversion. Since it's not part of the default Tiger install you probably need to install it. Fire up a terminal and enter
$ curl -O http://metissian.com/downloads/macosx/subversion/subversion-client-1.3.1.dmg
Followed by
$ hdiutil mount subversion-client-1.3.1.dmg
$ sudo installer -pkg /Volumes/Subversion Client 1.3.1/SubversionClient-1.3.1.pkg -target /
(As of 9/13/2006 you need svn 1.3.1 as shown above.)
Once that is done we can create a download directory and checkout the latest version of the caldavd code.
$ mkdir iCalServer
$ cd iCalServer
$ svn checkout http://svn.macosforge.org/repository/collaboration/CalendarServer/trunk CalendarServerAfter a few minutes you will have the current source code for the iCalServer sitting on your Tiger machine.
Before you get too excited though we also need to install the current version of Python since that is what the iCal Server is written in. You can get a .pkg installer from the official Python site here. If you are doing all this from the command line then do the following:
$ curl -O http://www.python.org/ftp/python/2.4.3/Universal-MacPython-2.4.3.dmg
$ hdiutil mount Universal-MacPython-2.4.3.dmg
$ sudo installer -pkg /Volumes/Univeral MacPython 2.4.3/MacPython.mpkg -target / Build time
The developers have made it very easy to build the server by including a script that will download all the needed libraries and build. (Update: In the current builds there is no need to do all the run script hacking as before.)
Just move into the source folder and use the "run" script. The -s flag will tell it to just set everything up but not run yet.
./run -s
Wait a while and it will download and build all the bits and pieces that you need.
Basic dev config
Since this is just a quick and dirty test of caldavd we are just going to copy a test config file that has a single local user in it. From the CalendarServer folder do a:
cp ./conf/repository-static.xml ./conf/repository-dev.xml
This file contains a user named "admin" with a password of "admin" and full rights on the server. If you want to add other static users in here you can simply take a look at the existing demo account and copy it as needed.
The current build has a functioning, self-signed, SSL cert. It should come up secure up without issue.
Fire it up
Now all you need to do is change into your CalendarServer source folder and run:
./run
and you will see the server start up. Now point a web browser at your server on port 8008 and you should be able to login and see the basic structure of the iCal Server. If you have the WWDC Leopard iCal you can point that at it or download Chandler or Sunbird and run those on earlier versions of Mac OS X. Mac OS Forge has setup pages that show how to configure the clients here.
Wrapping up...
OK, so this is about as nasty a test as you can get. It's not installed anywhere meaningful, it's not integrated into anything, and it won't start at boot time. That's for part 2, when we will look at OD, Kerberos, and launchd.
Have fun!
