CalendarServer

Differences between revisions 1 and 38 (spanning 37 versions)
Revision 1 as of 2008-01-11 13:03:07
Size: 3255
Editor: 26-191
Comment:
Revision 38 as of 2008-01-15 05:25:43
Size: 8185
Editor: 98-191
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
THIS PAGE IS NOT FINISHED. DON'T FOLLOW ANY ADVISE IN IT UNTIL THIS LINE IS REMOVED. ## page was renamed from CalDAVServer
/!\ ''' THIS PAGE IS NOT FINISHED. CONSIDER THE INSTRUCTIONS OF ALPHA RELEASE QUALITY. '''
 ''If you have any problems with any of the instructions here, please provide comment and feedback.''
Line 4: Line 6:
This page will explain how to install Apple's iCal Server on Ubuntu Server, though desktop variants should also work without any problems. This page explains how to install Apple's [http://en.wikipedia.org/wiki/Darwin_Calendar_Server Darwin Calendar Server] (also called DCS, and the basis for their iCal Server) on Ubuntu Server 7.10, though desktop variants of both 7.10 and Hardy Heron should also work.
Line 6: Line 8:
What is CalDAV?
Explain that here, together with an explanation between CalDAV and WebDAV/webcal, with a link to a page describing how to make that happen.
== What is CalDAV? ==
There are many ways of enabling other people to see your calendar, but the two most common, are what Evolution calls "On the web"-calendars (or [http://en.wikipedia.org/wiki/Webcal webcal]), and CalDAV-calendars. "On the web" calendars are simply iCalendar files stored on a web-server for clients to download. Nothing magical about it. Your calendar application will open a normal http connection to the web server, download the calendar file and use it just like a normal, local calendar, except in most cases it will be read-only. The application can also publish the calendar to the web-server using WebDAV.
Line 9: Line 11:
Install procedure for Ubuntu Server 7.10 WebDAV, an abbreviation that stands for Web-based Distributed Authoring and Versioning, refers to the set of extensions to the Hypertext Transfer Protocol (HTTP) which allows users to collaboratively edit and manage files on remote World Wide Web servers. The "On the web"-type of calendar is suitable when you want anyone in the world to have access to the calendar. A TV-channel could use this to announce their program, for instance, or Free Software communities can use it to enable users to see how the project is progressing, release dates, etc. If this is all you want, then you don't really need a CalDAV server. Apache will do the trick, with with mod_dav if you want WebDAV publishing support. ([http://www.digital-arcanist.com/sanctum/article.php?story=20070427101250622 WebDAV with Apache 2.x on Ubuntu])
Line 11: Line 13:
Installing Apple's iCal Server is fairly trivial once you know what to do. We do need to download some additional packages using apt-get, and we need to download some software using subversion. Most users will be familiar with apt-get, many with subversion. If you're not familiar with subversion, don't panic though. This guide will be a detailed, step by step howto, showing exactly which commands to enter and when. Built on top of WebDAV, CalDAV is a standard protocol, specified in [http://tools.ietf.org/html/rfc4791 RFC 4791], which enables advanced online calendar functions. Concepts such as users, groups, locations and resources are introduced, enabling collaborative scheduling. Different users of different groups can have different permissions to read and write to a calendar, etc. Also, a CalDAV calendar doesn't use a single file, but stores calendar events as files in directories. It also handles recurring events, enables free/busy lookups, etc. This makes CalDAV suitable for an office environment.


== Install procedure for Ubuntu Server 7.10 ==
Installing Apple's iCal Server is fairly trivial once you know what to do. You do need to download some additional packages using apt-get, and you'll need to download some software using subversion. Most users will be familiar with apt-get, many with subversion. If you're not familiar with subversion, don't panic. This guide will be a detailed, step by step howto, showing exactly which commands to enter and when.

To make this work you will need to enable the Universe repositories (see ["AddingRepositoriesHowto"] and remember to do an {{{ apt-get update }}} afterwards).
Line 14: Line 22:
* Log into the server console or via ssh, so you can enter commands, and run sudo -s to get a root shell.
* Install subversion: apt-get install subversion
* Execute the following commands. It's ok to simply copy and paste them. It's quite alot of packages, and it may take a while for all of them to download and install.
Line 18: Line 23:
apt-get install libkrb5-dev
apt-get attr
apt-get install attr
apt-get install subversion
apt-get install curl
apt-get install build-essential
apt-get install libssl-dev
apt-get install python-pysqlite2
apt-get install bzip2
apt-get install curl
apt-get install zope3
apt-get install python-xml
apt-get install python-pyopenssl
apt-get install python-dateutil
apt-get install python-xattr
apt-get install python-pysqlite2
apt-get install python-twisted
apt-get install python-vobject
apt-get install python-kerberos
 * Log into the server console or via ssh, so you can enter commands.
 * Install some software:
 {{{ sudo apt-get install subversion libkrb5-dev attr curl build-essential libssl-dev python-pysqlite2 bzip2 }}}
 * Install some more software:
 {{{ sudo apt-get install curl zope3 python-xml python-pyopenssl python-dateutil python-xattr python-pysqlite2 python-twisted python-vobject python-kerberos }}}
 * We now need to edit our /etc/fstab file and add {{{ user_xattr }}} to the options for the partition containing the CalDAV server, / in this case: {{{ sudo vim /etc/fstab }}}
Line 38: Line 30:
* We now need to edit our /etc/fstab file and add user_xattr to the partition containing the CalDAV server, / in this case. vim /etc/fstab.
My / before edit: UUID=94a96528-c889-45a1-bc98-d9d02ecdd59c / ext3 defaults,errors=remount-ro 0 1
After edit: UUID=94a96528-c889-45a1-bc98-d9d02ecdd59c / ext3 defaults,errors=remount-ro,user_xattr 0 1

* We must now remount the filesystem: mount -o remount /
* Make a directory for the server in /opt: mkdir /opt/iCalServer
* Let's download the server software itself using subversion:
svn checkout http://svn.macosforge.org/repository/calendarserver/CalendarServer/trunk CalendarServer
* Subversion created a directory for us, called CalendarServer. Let's change into it: cd CalendarServer
* And run a script to download some necessary packages, etc: ./run -s
* Ok. (Unless something is wrong and you got alot of errors, in which case, it's not ok) Our CalDAV server is almost ready for action. Let's copy the test configuration so we can get up as quickly as possible. Real configuration can wait:
cp conf/caldavd-test.plist conf/caldavd-dev.plist
* We do need to do some configuration though: vim conf/caldavd-test.plist

ADD PRECISE DESCRIPTION OF NECESSARY EDIT FOR EXTERNAL CONNECTIONS AND FOR EVOLUTION USERS!
 This is what the /etc/fstab change looks like:
 {{{ Before: UUID=94a96528-c889-45a1-bc98-d9d02ecdd59c / ext3 defaults,errors=remount-ro 0 1
After : UUID=94a96528-c889-45a1-bc98-d9d02ecdd59c / ext3 defaults,errors=remount-ro,user_xattr 0 1 }}}
Line 55: Line 35:
  /!\ You ''must'' modify the settings for the partition on which you're installing the server. So if your /opt is on a different partition, you must set the {{{ user_xattr }}} flag and modify the instructions below.
Line 58: Line 38:
References:
Cam's blog: http://cam.moobox.org/blog/?p=5
Lenfis blog:http://blog.jl42.de/index.php?/archives/231-Installation-of-the-Apple-Calendar-Server-on-Ubuntu-Edgy.html
http://trac.macosforge.org/projects/calendarserver/wiki/
 * Remount the file system (to activate user_xattr): {{{ sudo mount -o remount / }}}
 * Make a directory for it, {{{ sudo mkdir /opt/CalendarServer }}
 * And change into it; {{{ cd /opt/CalendarServer }}}
 * Let's download the server software itself using subversion:
 {{{ sudo svn checkout http://svn.macosforge.org/repository/calendarserver/CalendarServer/trunk CalendarServer }}}
 * Subversion has downloaded a lot of software, and created a directory for us, called CalendarServer. Let's change into it: {{{ cd CalendarServer }}}
 * And run a script to download some necessary packages, configure, etc: {{{ sudo ./run -s }}}
 * Our CalDAV server is almost ready for action. Let's copy the test configuration so we can get it up as quickly as possible. Real configuration can wait: {{{ sudo cp conf/caldavd-test.plist conf/caldavd-dev.plist }}}
 * We do need to do a little configuration though: {{{ sudo vim conf/caldavd-dev.plist }}}
 * First change the hostname for the server. Locate the line {{{ <!-- Network host name --> }}} and change {{{ <string>localhost</string> }}} to {{{ <string>your-real-hostname</string> }}} (That is, put the actual name of your server inside the string, it's used within URLs within the software.)
 * To make the server available to connections from other computers. Locate this line: {{{ <!-- List of IP addresses to bind to [empty = all] --> }}} and replace {{{ 127.0.0.1 }}} in {{{ <string>127.0.0.1</string> }}} with either nothing or a specific, public ip address for your server.


/!\ [https://bugs.launchpad.net/ubuntu/+source/evolution/+bug/160190 Bug #160190]: As of 2007-11-05 there is a bug in Evolution that prevents us from using this set-up to authenticate to the caldavd server. The report has contributions which explain how to enable Evolution to connect. It's not included here, because it's important that you check out the bug yourself.

 * Run the server: {{{ ./run }}}

That's it! The server is up and running, and you can connect to it with your CalDAV client using {{{ caldav://ADDRESS:8008/calendars/users/admin/calendar }}} to test the server using username {{{ admin }}} and password {{{ admin }}}

 * Create a new user and group named caldavd; {{{ sudo adduser --system caldavd --group }}}
 * Change ownership; {{{ sudo chown -R caldavd:caldavd /opt/CalendarServer }}}
 * Run the server as the new user in the background: {{{ sudo -u caldavd -b /opt/CalendarServer/CalendarServer/run }}}

== To Do ==

We also need to set up users and permissions for the server itself, so people can connect to the server and share their calendars, which is what we've been aiming for.

We should also document where the server-data is stored, so the information that users have entrusted to the server can be backed up.

Ideally we should package this application so the installation is installable with a single command.


== References: ==
 * [http://tools.ietf.org/html/rfc4791 CalDAV protocol specification, RFC 4791]
 * [http://cam.moobox.org/blog/?p=5 Cam's blog]
 * [http://blog.jl42.de/index.php?/archives/231-Installation-of-the-Apple-Calendar-Server-on-Ubuntu-Edgy.html Lenfis blog]
 * [http://www.recycledpapyr.us/2008/01/09/installing-apples-darwin-calendar-server/ JT's blog]
 * [http://trac.macosforge.org/projects/calendarserver/wiki/ Calendar Server wiki]
 * [http://ubuntuforums.org/showthread.php?p=4114408&posted=1#post4114408 Ubuntu Forum Thread]
 * [http://www.nabble.com/Re:-'Run'-script-crashes-p11433982.html Maxime Wacker's trouble shooting tips]
 * [https://bugs.launchpad.net/ubuntu/+source/evolution/+bug/160190 Bug #160190]
 * [http://en.wikipedia.org/wiki/Caldav CalDAV - Wikipedia entry]
 * [http://en.wikipedia.org/wiki/WebDAV WebDAV - Wikipedia entry]
 * [http://www.digital-arcanist.com/sanctum/article.php?story=20070427101250622 HOWTO Enable WebDAV with Apache 2.x on Ubuntu Linux]

Warning /!\ THIS PAGE IS NOT FINISHED. CONSIDER THE INSTRUCTIONS OF ALPHA RELEASE QUALITY.

  • If you have any problems with any of the instructions here, please provide comment and feedback.

This page explains how to install Apple's [http://en.wikipedia.org/wiki/Darwin_Calendar_Server Darwin Calendar Server] (also called DCS, and the basis for their iCal Server) on Ubuntu Server 7.10, though desktop variants of both 7.10 and Hardy Heron should also work.

What is CalDAV?

There are many ways of enabling other people to see your calendar, but the two most common, are what Evolution calls "On the web"-calendars (or [http://en.wikipedia.org/wiki/Webcal webcal]), and CalDAV-calendars. "On the web" calendars are simply iCalendar files stored on a web-server for clients to download. Nothing magical about it. Your calendar application will open a normal http connection to the web server, download the calendar file and use it just like a normal, local calendar, except in most cases it will be read-only. The application can also publish the calendar to the web-server using WebDAV.

WebDAV, an abbreviation that stands for Web-based Distributed Authoring and Versioning, refers to the set of extensions to the Hypertext Transfer Protocol (HTTP) which allows users to collaboratively edit and manage files on remote World Wide Web servers. The "On the web"-type of calendar is suitable when you want anyone in the world to have access to the calendar. A TV-channel could use this to announce their program, for instance, or Free Software communities can use it to enable users to see how the project is progressing, release dates, etc. If this is all you want, then you don't really need a CalDAV server. Apache will do the trick, with with mod_dav if you want WebDAV publishing support. ([http://www.digital-arcanist.com/sanctum/article.php?story=20070427101250622 WebDAV with Apache 2.x on Ubuntu])

Built on top of WebDAV, CalDAV is a standard protocol, specified in [http://tools.ietf.org/html/rfc4791 RFC 4791], which enables advanced online calendar functions. Concepts such as users, groups, locations and resources are introduced, enabling collaborative scheduling. Different users of different groups can have different permissions to read and write to a calendar, etc. Also, a CalDAV calendar doesn't use a single file, but stores calendar events as files in directories. It also handles recurring events, enables free/busy lookups, etc. This makes CalDAV suitable for an office environment.

Install procedure for Ubuntu Server 7.10

Installing Apple's iCal Server is fairly trivial once you know what to do. You do need to download some additional packages using apt-get, and you'll need to download some software using subversion. Most users will be familiar with apt-get, many with subversion. If you're not familiar with subversion, don't panic. This guide will be a detailed, step by step howto, showing exactly which commands to enter and when.

To make this work you will need to enable the Universe repositories (see ["AddingRepositoriesHowto"] and remember to do an  apt-get update  afterwards).

Ready?

  • Log into the server console or via ssh, so you can enter commands.
  • Install some software:

     sudo apt-get install subversion libkrb5-dev attr curl build-essential libssl-dev python-pysqlite2 bzip2 

  • Install some more software:

     sudo apt-get install curl zope3 python-xml python-pyopenssl python-dateutil python-xattr python-pysqlite2 python-twisted python-vobject python-kerberos 

  • We now need to edit our /etc/fstab file and add  user_xattr  to the options for the partition containing the CalDAV server, / in this case:  sudo vim /etc/fstab  This is what the /etc/fstab change looks like: {{{ Before: UUID=94a96528-c889-45a1-bc98-d9d02ecdd59c / ext3 defaults,errors=remount-ro 0 1

After : UUID=94a96528-c889-45a1-bc98-d9d02ecdd59c / ext3 defaults,errors=remount-ro,user_xattr 0 1 }}}

Warning /!\ You must modify the settings for the partition on which you're installing the server. So if your /opt is on a different partition, you must set the  user_xattr  flag and modify the instructions below.

  • Remount the file system (to activate user_xattr):  sudo mount -o remount / 

  • Make a directory for it, { sudo mkdir /opt/CalendarServer

  • And change into it;  cd /opt/CalendarServer 

  • Let's download the server software itself using subversion:

     sudo svn checkout http://svn.macosforge.org/repository/calendarserver/CalendarServer/trunk CalendarServer 

  • Subversion has downloaded a lot of software, and created a directory for us, called CalendarServer. Let's change into it:  cd CalendarServer 

  • And run a script to download some necessary packages, configure, etc:  sudo ./run -s 

  • Our CalDAV server is almost ready for action. Let's copy the test configuration so we can get it up as quickly as possible. Real configuration can wait:  sudo cp conf/caldavd-test.plist conf/caldavd-dev.plist 

  • We do need to do a little configuration though:  sudo vim conf/caldavd-dev.plist 

  • First change the hostname for the server. Locate the line  <!-- Network host name -->  and change  <string>localhost</string>  to  <string>your-real-hostname</string>  (That is, put the actual name of your server inside the string, it's used within URLs within the software.)

  • To make the server available to connections from other computers. Locate this line:  <!-- List of IP addresses to bind to [empty = all] -->  and replace  127.0.0.1  in  <string>127.0.0.1</string>  with either nothing or a specific, public ip address for your server.

Warning /!\ [https://bugs.launchpad.net/ubuntu/+source/evolution/+bug/160190 Bug #160190]: As of 2007-11-05 there is a bug in Evolution that prevents us from using this set-up to authenticate to the caldavd server. The report has contributions which explain how to enable Evolution to connect. It's not included here, because it's important that you check out the bug yourself.

  • Run the server:  ./run 

That's it! The server is up and running, and you can connect to it with your CalDAV client using  caldav://ADDRESS:8008/calendars/users/admin/calendar  to test the server using username  admin  and password  admin 

  • Create a new user and group named caldavd;  sudo adduser --system caldavd --group 

  • Change ownership;  sudo chown -R caldavd:caldavd /opt/CalendarServer 

  • Run the server as the new user in the background:  sudo -u caldavd -b /opt/CalendarServer/CalendarServer/run 

To Do

We also need to set up users and permissions for the server itself, so people can connect to the server and share their calendars, which is what we've been aiming for.

We should also document where the server-data is stored, so the information that users have entrusted to the server can be backed up.

Ideally we should package this application so the installation is installable with a single command.

References:

CalendarServer (last edited 2014-07-13 21:21:52 by 5ac9a5f8)