KarmicRecipe

Differences between revisions 1 and 73 (spanning 72 versions)
Revision 1 as of 2008-01-11 13:03:07
Size: 3255
Editor: 26-191
Comment:
Revision 73 as of 2010-08-08 16:52:21
Size: 5562
Editor: ip72-208-203-158
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 CalendarServerKarmicRecipe
## page was copied from CalendarServerGutsyRecipe
## page was copied from CalendarServer
## page was renamed from CalDAVServer

== Install procedure for Ubuntu Server 9.10 ==

There has recently been a fair amount of work on performing installation of the 2.3 version of calendar server from source. They have been described in detail at this [[http://www.deanspot.org/content/installing-darwin-calendar-server-23-ubuntu-910|blog]]. This has been tested on a fresh install of 9.10 with only the ssh server installed on top.

== Package based procedure for installing caldavd 1.2 on Ubuntu Server 9.10 ==

These instructions appear to install the calendar server 1.2 version from the packages. To do so, you can stick to the [[CalendarServerGutsyRecipe|procedure]] described for version 7.10. Only slight changes have to be done to the list of packages we want to install

 {{{ apt-get install subversion libkrb5-dev attr curl build-essential libssl-dev python-pysqlite2 curl python-zodb python-pyopenssl python-dateutil python-xattr python-pysqlite2 python-twisted python-vobject python-kerberos python-dev}}}

Sofar i checked the tutorial until this following steps:
 * 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: {{{ 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.
Line 4: Line 24:
This page will explain how to install Apple's iCal Server on Ubuntu Server, though desktop variants should also work without any problems. /!\ [[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.
Line 6: Line 26:
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.
 * 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 }}}
Line 9: Line 28:
Install procedure for Ubuntu Server 7.10  * Set permissions; {{{ chown -R caldavd:caldavd /opt/caldavd }}}
Line 11: Line 30:
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.

Ready?
* 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.

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

* 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!
 * Run the server: {{{ sudo -u caldavd -b /opt/caldavd/CalendarServer/run }}}
Line 55: Line 33:
 
Line 58: Line 35:
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/
Let's test our Server using Thunderbird 3 RC2 with lightning addon.
But before we check that lets see if we can access it via Browser.
Type into your addressbar: http://IPADDRESS:8008/calendars/users/admin/calendar

And you should be prompted with a fild asking for your '''username''' and '''password''' which are '''admin''' and '''admin'''

Ok, now in Thunderbird:
- First create a "New Callendar - On the Network".
- Choose CalDAV and type http://ADDRESS:8008/calendars/users/admin/calendar

using http instead of caldav does not seem to right, but it works (?)
I need to check this out further.
In [[http://wiki.debian.org/HowTo/CalendarServer| this Debian CalendarServer tutorial]] it seems to be right.




Here is an example init script : {{{/etc/init.d/caldavd}}}
{{{#! /bin/sh
#! /bin/sh

. /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.

Install procedure for Ubuntu Server 9.10

There has recently been a fair amount of work on performing installation of the 2.3 version of calendar server from source. They have been described in detail at this blog. This has been tested on a fresh install of 9.10 with only the ssh server installed on top.

Package based procedure for installing caldavd 1.2 on Ubuntu Server 9.10

These instructions appear to install the calendar server 1.2 version from the packages. To do so, you can stick to the procedure described for version 7.10. Only slight changes have to be done to the list of packages we want to install

  •  apt-get install subversion libkrb5-dev attr curl build-essential libssl-dev python-pysqlite2 curl python-zodb  python-pyopenssl python-dateutil python-xattr python-pysqlite2 python-twisted python-vobject python-kerberos python-dev

Sofar i checked the tutorial until this following steps:

  • 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:  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 /!\ 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.

  • 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 

Let's test our Server using Thunderbird 3 RC2 with lightning addon. But before we check that lets see if we can access it via Browser. Type into your addressbar: http://IPADDRESS:8008/calendars/users/admin/calendar

And you should be prompted with a fild asking for your username and password which are admin and admin

Ok, now in Thunderbird: - First create a "New Callendar - On the Network". - Choose CalDAV and type http://ADDRESS:8008/calendars/users/admin/calendar

using http instead of caldav does not seem to right, but it works (?) I need to check this out further. In this Debian CalendarServer tutorial it seems to be right.

Here is an example init 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/KarmicRecipe (last edited 2010-08-08 16:52:21 by ip72-208-203-158)