This document provides basic instructions for setting up your own instance of the Zotero data server for development and testing. Please feel free to flesh out or otherwise improve these instructions as you see fit. Note that all relevant inquiries should be directed to the Zotero development mailing list (zotero-dev@googlegroups.com) and that the core development team directed by the Center for History and New Media will not be able to respond to requests for support. [[BR]] [[BR]] Note that this assumes you have an apache server running and know how to make basic configuration changes to it. [[BR]] [[BR]] Check out the dataserver source from svn: [[BR]] https://www.zotero.org/svn/dataserver/trunk/ [[BR]] [[BR]] set up an apache VirtualHost for the dataserver [[BR]] name it synctest.zotero.org [[BR]] add a ServerAlias for apitest.zotero.org [[BR]] add an /etc/hosts entry for synctest.zotero.org and apitest.zotero.org to 127.0.0.1 [[BR]] in the VirtualHost, add AllowEncodedSlashes On [[BR]] add a entry for the htdocs subdir [[BR]] {{{ Options FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all }}} this directory is also the docroot [[BR]] [[BR]] Copy the sample config files under include/config and remove "sample" from the filenames [[BR]] fill out credentials and paths in config files [[BR]] [[BR]] create mysql user zoterotest [[BR]] password testtest [[BR]] create zoterotest and zoterotest_sessions Databases and give zoterotest user access to them [[BR]] [[BR]] create a zotero_www_test DB [[BR]] create a users table for zotero_www_test [[BR]] {{{ CREATE TABLE `users` ( `userID` mediumint UNSIGNED auto_increment NOT NULL, `username` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `slug` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL, `password` char(40) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `email` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `openid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL, `role` enum('member', 'admin') DEFAULT 'member' NOT NULL, `resetValidationKey` char(40) CHARACTER SET utf8 COLLATE utf8_bin NULL, `resetValidationExp` int NULL, `emailValidationKey` char(10) CHARACTER SET utf8 COLLATE utf8_bin NULL, `emailValidated` tinyint(1) DEFAULT '0' NOT NULL, `hasImage` tinyint(1) DEFAULT '0' NOT NULL, `lastUpdated` timestamp ON UPDATE CURRENT_TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, `dateRegistered` timestamp NOT NULL, PRIMARY KEY (`userID`), UNIQUE KEY (`username`), UNIQUE KEY (`slug`), UNIQUE KEY (`email`), UNIQUE KEY (`resetValidationKey`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; }}} necessary fields should be userID, username, password, slug [[BR]] password entries are generated by taking a sha1 hash of the user's password concatenated to the salt. [[BR]] slugs are generated by taking the username and trimming whitespace, lowercasing, {{{preg_replace("/[^a-z0-9 ._-]/", "", $input)}}}, and replacing spaces with underscores [[BR]] [[BR]] give write access to the tmp dir to apache [[BR]] loading http://synctest.zotero.org should give a page saying "Nothing to see here" [[BR]] [[BR]] create or edit .my.cnf in your home dir with [client] or [mysql] and user = and password = for root [[BR]] {{{ [client] user = root password = foobar }}} cd to 'misc' directory [[BR]] ./test_reset [[BR]]