Erstellt am: 13.04.2008 | Editiert am: 30.05.2008

Darwin Kalender Server unter Debian

Hier entsteht ein neues Tutorial zum Apple Darwin Calendar Server

  1. CalendarServer installieren
    1. Pakete installieren
    2. Verzeichnisse erstellen
    3. Quellcode von SubVersion
    4. Benötigte Bibliotheken installieren
    5. Standard-Konfiguration erstellen
    6. Dokumenten Verzeichnis erstellen
    7. Start Script erstellen
  2. Config Dateien
    1. caldavd-dev.plist
  3. CalendarServer starten
  4. Fehlerbehebung
    1. svn: Can't open file '/root/.subversion/servers': Permission denied
    2. src/kerberos.c:19:27: error: Python/Python.h: Datei oder Verzeichnis nicht gefunden
  5. Links und Quellen
  6. Kommentar schreiben

CalendarServer installieren

Pakete installieren
aptitude install subversion curl libkrb5-dev krb5-config gcc python-dev python-dateutil python-pyopenssl python-xattr python-pysqlite2 python-twisted python-zopeinterface python-vobject python-kerberos python-pyopenssl python-xml zope3 libc6-dev-amd64
Verzeichnisse erstellen

Das Verzeichnis für das Virtuelle Filesystem, die Log Dateien, die Statistik Datei, sowie die Config Dateien erstellen

mkdir /virtual_fs
mkdir /var/log/caldavd
mkdir /var/run/caldavd
mkdir /etc/caldavd

Dateisystem mit user_xattr erweitern
Danach rebooten oder neu mounten.

nano /etc/fstab
/dev/hda2 /virtual_fs ext3 defaults,errors=remount-ro,user_xattr 0 2

User und Gruppe caldav erstellen

adduser --system --group caldavd --home /virtual_fs

Subversion Config kopieren

cp -R /root/.subversion /virtual_fs/

Rechte anpassen

chown -R caldavd:caldavd /virtual_fs
chown -R caldavd:caldavd /var/log/caldavd
chown -R caldavd:caldavd /var/run/caldavd
chown -R caldavd:caldavd /etc/caldavd
Quellcode von SubVersion
cd /virtual_fs
sudo -H -u caldavd -b svn checkout --config-dir /virtual_fs http://svn.macosforge.org/repository/calendarserver/CalendarServer/trunk CalendarServer
Benötigte Bibliotheken installieren
sudo -H -u caldavd -b /virtual_fs/CalendarServer/run -s
Standard-Konfiguration erstellen

Datei caldavd-dev.plist vorbereiten

cp /virtual_fs/CalendarServer/conf/caldavd-test.plist /virtual_fs/CalendarServer/conf/caldavd-dev.plist

Andere Dateien vorbereiten

ln -s /virtual_fs/CalendarServer/conf/caldavd-dev.plist /etc/caldavd/caldavd-dev.plist
ln -s /virtual_fs/CalendarServer/conf/sudoers.plist /etc/caldavd/sudoers.plist
ln -s /virtual_fs/CalendarServer/conf/accounts.xml /etc/caldavd/accounts.xml
chown caldavd:caldavd /etc/caldavd/caldavd-dev.plist
chown caldavd:caldavd /etc/caldavd/accounts.xml
chown caldavd:caldavd /etc/caldavd/sudoers.plist
Dokumenten Verzeichnis erstellen
mkdir /virtual_fs/CalendarServer/documents
chown caldavd:caldavd /virtual_fs/CalendarServer/documents
Start Script erstellen
nano /etc/init.d/caldavd
#!/bin/sh
NAME=caldavd
USER=caldavd
PIDFILE=/var/run/$NAME.pid
DAEMON=/virtual_fs/CalendarServer/run

case "$1" in
  start)
    sudo -H -u $USER -b $DAEMON -d > /dev/null;
    ;;

  stop)
    sudo -H -u $USER -b $DAEMON -k > /dev/null;
    ;;

  restart)
    sudo -H -u $USER -b $DAEMON -r > /dev/null;
    ;;

  *)
    echo "Usage: /etc/init.d/$NAME {start|stop|restart}"
    exit 1
    ;;
esac

Rechte vergeben

chmod 755 /etc/init.d/caldavd

Config Dateien

caldavd-dev.plist
nano /etc/caldavd/caldavd-dev.plist
<?xml version="1.0" encoding="UTF-8"?>

<!--
Copyright (c) 2006-2007 Apple Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
 -->

<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>

  <!--
    Public network address information

    This is the server's public network address, which is provided to
    clients in URLs and the like.  It may or may not be the network
    address that the server is listening to directly, though it is by
    default.  For example, it may be the address of a load balancer or
    proxy which forwards connections to the server.
  -->

  <!-- Network host name -->
  <key>ServerHostName</key>
  <string>localhost</string>

  <!-- HTTP port [0 = disable HTTP] -->
  <key>HTTPPort</key>
  <integer>0</integer>

  <!-- SSL port [0 = disable HTTPS] -->
  <!-- (Must also configure SSLCertificate and SSLPrivateKey below) -->
  <key>SSLPort</key>
  <integer>8443</integer>

  <!--
    Network address configuration information

    This configures the actual network address that the server binds to.
  -->

  <!-- List of IP addresses to bind to [empty = all] -->
  <key>BindAddresses</key>
  <array></array>

  <!-- List of port numbers to bind to for HTTP [empty = same as "Port"] -->
  <key>BindHTTPPorts</key>
  <array></array>

  <!-- List of port numbers to bind to for SSL [empty = same as "SSLPort"] -->
  <key>BindSSLPorts</key>
  <array></array>


  <!--
    Data Store
  -->

  <!-- Data root -->
  <key>DataRoot</key>
  <string>/var/run/caldavd</string>

  <!-- Document root -->
  <key>DocumentRoot</key>
  <string>/virtual_fs/CalendarServer/documents</string>

  <!-- User quota (in bytes) -->
  <key>UserQuota</key>
  <integer>10485760</integer><!-- 10Mb -->

  <!-- Attachment size limit (in bytes) -->
  <key>MaximumAttachmentSize</key>
  <integer>1048576</integer><!-- 1Mb -->


  <!--
    Directory service

    A directory service provides information about principals (eg.
    users, groups, locations and resources) to the server.

    A variety of directory services are available for use.
  -->

  <!--  XML File Directory Service -->
  <key>DirectoryService</key>
  <dict>
    <key>type</key>
    <string>twistedcaldav.directory.xmlfile.XMLDirectoryService</string>
 
    <key>params</key>
    <dict>
      <key>xmlFile</key>
      <string>/etc/caldavd/accounts.xml</string>
    </dict>
  </dict>
 
  <!--  Open Directory Service -->
  <key>DirectoryService</key>
  <dict>
    <key>type</key>
    <string>twistedcaldav.directory.appleopendirectory.OpenDirectoryService</string>
 
    <key>params</key>
    <dict>
      <key>node</key>
      <string>/Search</string>
      <key>requireComputerRecord</key>
      <true />
    </dict>
  </dict>


  <!--
    Special principals

    These principals are granted special access and/or perform
    special roles on the server.
  -->

  <!-- Principals with "DAV:all" access (relative URLs) -->
  <key>AdminPrincipals</key>
  <array>
    <!-- <string>/principals/users/admin/</string> -->
  </array>

  <!-- Principals that can pose as other principals -->
  <key>SudoersFile</key>
  <string>/etc/caldavd/sudoers.plist</string>

  <!-- Create "proxy access" principals -->
  <key>EnableProxyPrincipals</key>
  <true />


  <!--
    Authentication
  -->

  <key>Authentication</key>
  <dict>

    <!-- Clear text; best avoided -->
    <key>Basic</key>
    <dict>
      <key>Enabled</key>
      <false />
    </dict>

    <!-- Digest challenge/response -->
    <key>Digest</key>
    <dict>
      <key>Enabled</key>
      <true />
      <key>Algorithm</key>
      <string>md5</string>
      <key>Qop</key>
      <string></string>
    </dict>

    <!-- Kerberos/SPNEGO -->
    <key>Kerberos</key>
    <dict>
      <key>Enabled</key>
      <true />
      <key>ServicePrincipal</key>
      <string></string>
    </dict>

  </dict>


  <!--
    Logging
  -->

  <key>Verbose</key>
  <false />

  <!-- Apache-style access log -->
  <key>AccessLogFile</key>
  <string>/var/log/caldavd/access.log</string>
  <key>RotateAccessLog</key>
  <false />

  <!-- Server activity log -->
  <key>ErrorLogFile</key>
  <string>/var/log/caldavd/error.log</string>

  <!-- Server statistics file -->
  <key>ServerStatsFile</key>
  <string>/var/run/caldavd/stats.plist</string>

  <!-- Server process ID file -->
  <key>PIDFile</key>
  <string>/var/run/caldavd.pid</string>


  <!--
    SSL/TLS
  -->

  <!-- Public key -->
  <key>SSLCertificate</key>
  <string></string>

  <!-- Private key -->
  <key>SSLPrivateKey</key>
  <string></string>


  <!--
    Process management
  -->

  <key>UserName</key>
  <string>calendar</string>

  <key>GroupName</key>
  <string>calendar</string>

  <key>ProcessType</key>
  <string>Combined</string>

  <key>MultiProcess</key>
  <dict>
    <key>ProcessCount</key>
    <integer>0</integer> <!-- 0 = one per CPU core -->
  </dict>


  <!--
    Service ACLs
  -->

  <key>EnableSACLs</key>
  <true />


  <!--
    Non-standard CalDAV extensions
  -->

  <!-- Calendar Drop Box -->
  <key>EnableDropBox</key>
  <true />

  <!-- Drop Box Notifications -->
  <key>EnableNotifications</key>
  <true />

  <!-- Private Events -->
  <key>EnablePrivateEvents</key>
  <true />


</dict>
</plist>

CalendarServer starten

/etc/init.d/caldavd start


Jetzt kannst du via Webbrowser auf den CalendarServer zugreifen:
http://localhost:8008/
Benutzername: admin
Passwort: admin

Fehlerbehebung

  • svn: Can't open file '/root/.subversion/servers': Permission denied
    Da ist wohl irgendwas bei der Installation von diesen Tutorial schief gelaufen. Entweder du überprüfst alle Schritte aus diesem Tutorial oder du verwendest folgendes (Vorsicht Unsicher!!!!):
    cp -R /root/.subversion /virtual_fs/
    mv /root/.subversion /root/subversion-save
    ln -s /virtual_fs/.subversion/ /root/.subversion
    chown -R caldavd:caldavd /virtual_fs/.subversion
    chmod o+rx /root
    Damit hast du dem Verzeichnis root Ausführ- und Leserechte gegeben. Nicht zu empfehlen!
  • src/kerberos.c:19:27: error: Python/Python.h: Datei oder Verzeichnis nicht gefunden
    Im Verzeichnis PyKerberos/src muss in den Dateien kerberos.c, kerberosbasic.c und kerberosgss.c der Eintrag <Python/Python.h> in "Python.h" geändert werden.

     

    1. Ubuntu iCal Server
    2. Installation of the Apple Calendar Server on Ubuntu Edgy
    3. CalendarServer unter Ubuntu einrichten
    4. CalendarServer trac Source Browser
    5. Caldavd man page
    6. Bug #160190 in evolution (Ubuntu)

    Kommentar schreiben

    • Benötigte Felder sind mit einem Stern (*) markiert.
    Sollte der Sicherheitscode unleserlich sein, kann durch einen Klick auf das Bild ein neuer Sicherheitscode erzeugt werden.

    Sicherheitscode:
     


Database: 0,0144 s, 23 Anfragen, PHP: 0,3786 s, total: 0,3929 s