方法一(官网方法):
useradd caluser ----为日历服务器建立一个新用户,方便管理
passwd caluser -----新用户更改密码
su caluser
mkdir ~/CalendarServer ---- 创建一个专门存放安装包的文件夹
cd ~/CalendarServer
svn co http://svn.calendarserver.org/repository/calendarserver/CalendarServer/trunk/ CalendarServer-------下载源代码
./run -s # 什么也没发生。。。
./run # 什么也没发生
感觉可能是python版本版本不对,目前是2.4. 只是感觉不对,没有依据。放弃此方法。
方法二(自强方法):
出处: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