方法一(官網方法):python
useradd caluser ----爲日曆服務器創建一個新用戶,方便管理sql
passwd caluser -----新用戶更改密碼bash
su caluser服務器
mkdir ~/CalendarServer ---- 建立一個專門存放安裝包的文件夾session
cd ~/CalendarServerpython2.7
svn co http://svn.calendarserver.org/repository/calendarserver/CalendarServer/trunk/ CalendarServer-------下載源代碼tcp
./run -s # 什麼也沒發生。。。ide
./run # 什麼也沒發生svn
感受多是python版本版本不對,目前是2.4. 只是感受不對,沒有依據。放棄此方法。ui
方法二(自強方法):
出處:http://www.productionmonkeys.net/guides/calendar-server/darwin-calendar-and-contact-server
1 修改文件系統格式
/etc/fstab
/dev/sda1 / ext3 defaults,user_xattr 1 1
yum
install
sqlite-devel -y
wget peak.telecommunity.com
/dist/ez_setup
.py
python2.6 ez_setup.py
easy_install pysqlite
<!-- Data root --> <key>DataRoot</key> <string>/var/calData/data</string> <!-- Document root --> <key>DocumentRoot</key> <string>/var/calData/documents</string> <!-- 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>/opt/CalendarServer/etc/caldavd/accounts.xml</string> </dict> </dict> <!-- Principals that can pose as other principals --> <key>SudoersFile</key> <string>/opt/CalendarServer/etc/caldavd/sudoers.plist</string> <!-- Wikiserver authentication (Mac OS X) --> <!-- COMMENT THIS SECTION OUT <key>Wiki</key> <dict> <key>Enabled</key> <true/> <key>Cookie</key> <string>sessionID</string> <key>URL</key> <string>http://127.0.0.1/RPC2</string> <key>UserMethod</key> <string>userForSession</string> <key>WikiMethod</key> <string>accessLevelForUserWikiCalendar</string> </dict> --> <key>LogRoot</key> <string>Logs</string> <!-- Apache-style access log --> <key>AccessLogFile</key> <string>/opt/CalendarServer/var/log/caldavd/access.log</string> <key>RotateAccessLog</key> <false/> <!-- Server activity log --> <key>ErrorLogFile</key> <string>/opt/CalendarServer/var/log/caldavd/error.log</string> <!-- Server process ID file --> <key>PIDFile</key> <string>/opt/CalendarServer/var/run/caldavd/caldavd.pid</string> <!-- Process management --> <key>UserName</key> <string>daemon</string> <key>GroupName</key> <string>daemon</string> <!-- iSchedule protocol options --> <key>iSchedule</key> <dict> <key>Enabled</key> <false/> <key>AddressPatterns</key> <array> </array> <key>Servers</key> <string>/opt/CalendarServer/etc/caldavd/servertoserver.xml</string> </dict> <!-- For child-master IPC. [empty = use tcp] --> <key>ControlSocket</key> <string>/opt/CalendarServer/var/run/caldavd/caldavd.sock</string> <!-- Twisted --> <key>Twisted</key> <dict> <key>twistd</key> <string>/opt/CalendarServer/usr/bin/twistd</string> </dict>
16 啓動!
/opt/CalendarServer/usr/bin/caldavd -T /opt/CalendarServer/usr/bin/twistd -f /etc/caldavd/caldavd.plist -X
17 運行時
.....CalendarServer/run -n
可能遇到的問題是
1 python2.7.3 ImportError: No module named twisted.scripts.twistd————安裝twisted,或者指定twisted路徑
2 python2.7.3 找不到_sqlite3模塊——重裝安裝sqlite-devel以後,從新編譯安裝python2.7.3