GutsyRecipe
3930
Comment:
|
← Revision 72 as of 2011-05-23 21:08:50 ⇥
6353
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
## page was renamed from CalendarServerGutsyRecipe ## page was copied from CalendarServer |
|
Line 2: | Line 4: |
THIS PAGE IS NOT FINISHED. DON'T FOLLOW ANY ADVISE IN IT UNTIL THIS LINE IS REMOVED. | /!\ ''' 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 is a candidate for deletion.'' |
Line 5: | Line 9: |
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 Gutsy. |
Line 7: | Line 11: |
== 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. |
|
Line 11: | Line 13: |
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. | |
Line 12: | Line 15: |
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. 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 16: | Line 19: |
* Log into the server console or via ssh, so you can enter commands, and run {{{ sudo -s }}} to get a root shell. * Install some software: {{{ apt-get install subversion libkrb5-dev attr curl build-essential libssl-dev python-pysqlite2 bzip2 }}} * Install some more software: {{{ apt-get install curl zope3 python-xml python-pyopenssl python-dateutil python-xattr python-pysqlite2 python-twisted python-vobject python-kerberos }}} |
* Log into the server console or via ssh, so you can enter commands, and run {{{ sudo -s }}} to get a root shell. * Install some software: {{{ apt-get install subversion libkrb5-dev attr curl build-essential libssl-dev python-pysqlite2 bzip2 }}} * Install some more software: {{{ apt-get install curl zope3 python-xml python-pyopenssl python-dateutil python-xattr python-pysqlite2 python-twisted python-vobject python-kerberos python-dev }}} |
Line 22: | Line 26: |
This is how my change looked 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 }}} |
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 28: | Line 31: |
* We must now remount the filesystem: {{{ mount -o remount / }}} * We'll install the server in /opt, so lets change into it: {{{ cd /opt }}} * Let's download the server software itself using subversion: {{{ svn checkout http://svn.macosforge.org/repository/calendarserver/CalendarServer/trunk CalendarServer }}} [[BR]] * Subversion has downloaded alot of software, and created a directory for us, called CalendarServer. Let's change into it: {{{ cd CalendarServer }}}[[BR]] * And run a script to download some necessary packages, configure, etc: {{{ ./run -s }}} [[BR]] * Ok, 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: {{{ cp conf/caldavd-test.plist conf/caldavd-dev.plist }}} [[BR]] * We do need to do some configuration though: {{{ vim conf/caldavd-dev.plist }}} [[BR]] [[BR]] |
* Remount the file system (to activate user_xattr): {{{ mount -o remount / }}} * Create a directory for our server to live in; {{{ mkdir /opt/caldavd }}} * and change into it, {{{ cd /opt/caldavd }}} * Let's download the server software itself using subversion: {{{ 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: {{{ ./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: {{{ cp conf/caldavd-test.plist conf/caldavd-dev.plist }}} * We do need to do a little configuration though: {{{ vi conf/caldavd-dev.plist }}} |
Line 36: | Line 41: |
* Let's change the hostname for the server. Locate the line {{{ <!-- Network host name --> }}} and change {{{ <string>localhost</string> }}} to {{{ <string>your-real-hostname</string> }}} [[BR]] * We have to make it 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 spesific, public ip address for your server. [[BR]] |
|
Line 39: | Line 42: |
* There is a bug in Evolution that prevents us from using this setup. The bug is located here, and please visit it now to see if it's been fixed. It also explains how to enable Evolution to connect. I won't include it here, because it's important that you check out the bug yourself: https://bugs.launchpad.net/ubuntu/+source/evolution/+bug/16019 [[BR]] [[BR]] | * 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. |
Line 43: | Line 47: |
* Create a user and group to give our server an identity of its own, but we don't need a home directory for it; {{{ adduser --system --group caldavd --no-create-home }}} * Set permissions; {{{ chown -R caldavd:caldavd /opt/caldavd }}} * Run the server: {{{ sudo -u caldavd -b /opt/caldavd/CalendarServer/run }}} |
|
Line 45: | Line 54: |
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 }}} To work with Apple iCal under Mac OS 10.5, the URI required was simply: {{{ caldav://ADDRESS:8008 }}} |
|
Line 47: | Line 59: |
We want our CalendarServer to start up when our server starts up. Thatfor we write a little startup script: |
|
Line 48: | Line 62: |
{{{/etc/init.d/caldavd}}} {{{#! /bin/sh #! /bin/sh |
|
Line 49: | Line 66: |
* Run the server: ./run * That's it! :) |
. /lib/lsb/init-functions |
Line 53: | Line 68: |
CALDAVD="/opt/caldavd/CalendarServer/run" CALDAVD_USER="caldavd" CALDAVD_OPTS="-d" PIDFILE="/opt/caldavd/CalendarServer/logs/caldavd.pid" NAME=caldavd |
|
Line 54: | Line 74: |
References: | test -x $CALDAVD || exit 0 |
Line 56: | Line 76: |
Cam's blog: [[BR]] http://cam.moobox.org/blog/?p=5 [[BR]] [[BR]] Lenfis blog: [[BR]] http://blog.jl42.de/index.php?/archives/231-Installation-of-the-Apple-Calendar-Server-on-Ubuntu-Edgy.html [[BR]] [[BR]] Calendar Server wiki: [[BR]] http://trac.macosforge.org/projects/calendarserver/wiki/ [[BR]] [[BR]] |
case "$1" in start) log_daemon_msg "Starting Darwin Calendar Server" "$NAME" if start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --chuid $CALDAVD_USER --exec $CALDAVD -- $CALDAVD_OPTS; then log_end_msg 0 else log_end_msg 1 fi ;; stop) log_daemon_msg "Stopping Darwin Calendar Server" "$NAME" if start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE; then log_end_msg 0 else log_end_msg 1 fi ;; restart) log_daemon_msg "Restarting Darwin Calendar Server" "$NAME" start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile $PIDFILE if start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --chuid $CALDAVD_USER --exec $CALDAVD -- $CALDAVD_OPTS; then log_end_msg 0 else log_end_msg 1 fi ;; status) status_of_proc -p "$CALDAVD" "$NAME" && exit 0 || exit $? ;; *) log_action_msg "Usage: /etc/init.d/caldavd {start|stop|restart|status}" exit 1 esac exit 0 }}} And to get it to load on boot and shutdown safely: {{{ update-rc.d caldavd defaults }}} == 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. |
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 is a candidate for deletion.
This page explains how to install Apple's Darwin Calendar Server (also called DCS, and the basis for their iCal Server) on Ubuntu Gutsy.
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, and run sudo -s to get a root shell.
- Install some software:
apt-get install subversion libkrb5-dev attr curl build-essential libssl-dev python-pysqlite2 bzip2
- Install some more software:
apt-get install curl zope3 python-xml python-pyopenssl python-dateutil python-xattr python-pysqlite2 python-twisted python-vobject python-kerberos python-dev
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: 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
Remount the file system (to activate user_xattr): mount -o remount /
Create a directory for our server to live in; mkdir /opt/caldavd
and change into it, cd /opt/caldavd
- Let's download the server software itself using subversion:
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: ./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: cp conf/caldavd-test.plist conf/caldavd-dev.plist
We do need to do a little configuration though: vi 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.
Create a user and group to give our server an identity of its own, but we don't need a home directory for it; adduser --system --group caldavd --no-create-home
Set permissions; chown -R caldavd:caldavd /opt/caldavd
Run the server: sudo -u caldavd -b /opt/caldavd/CalendarServer/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
To work with Apple iCal under Mac OS 10.5, the URI required was simply: caldav://ADDRESS:8008
We want our CalendarServer to start up when our server starts up. Thatfor we write a little startup script:
/etc/init.d/caldavd
. /lib/lsb/init-functions CALDAVD="/opt/caldavd/CalendarServer/run" CALDAVD_USER="caldavd" CALDAVD_OPTS="-d" PIDFILE="/opt/caldavd/CalendarServer/logs/caldavd.pid" NAME=caldavd test -x $CALDAVD || exit 0 case "$1" in start) log_daemon_msg "Starting Darwin Calendar Server" "$NAME" if start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --chuid $CALDAVD_USER --exec $CALDAVD -- $CALDAVD_OPTS; then log_end_msg 0 else log_end_msg 1 fi ;; stop) log_daemon_msg "Stopping Darwin Calendar Server" "$NAME" if start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE; then log_end_msg 0 else log_end_msg 1 fi ;; restart) log_daemon_msg "Restarting Darwin Calendar Server" "$NAME" start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile $PIDFILE if start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --chuid $CALDAVD_USER --exec $CALDAVD -- $CALDAVD_OPTS; then log_end_msg 0 else log_end_msg 1 fi ;; status) status_of_proc -p "$CALDAVD" "$NAME" && exit 0 || exit $? ;; *) log_action_msg "Usage: /etc/init.d/caldavd {start|stop|restart|status}" exit 1 esac exit 0
And to get it to load on boot and shutdown safely:
update-rc.d caldavd defaults
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.
CalendarServer/GutsyRecipe (last edited 2011-05-23 21:08:50 by cpc11-cdif12-2-0-cust1)