Changes between Version 1 and Version 2 of dataserver_setup


Ignore:
Timestamp:
06/21/10 12:04:00 (6 years ago)
Author:
fcheslack
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • dataserver_setup

    v1 v2  
    11This document provides basic instructions for setting up your own instance of the Zotero data server for development and testing. Please feel free to add to flesh out or otherwise improve these instructions as you see fit. Note that all support 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 respond to requests for support. 
     2[[BR]] 
     3[[BR]] 
     4Note that this assumes you have an apache server running and know how to make basic configuration changes to it. 
     5[[BR]] 
     6[[BR]] 
     7Check out the dataserver source from svn: [[BR]] 
     8https://www.zotero.org/svn/dataserver/trunk/ [[BR]] 
     9[[BR]] 
     10set up an apache VirtualHost for the dataserver [[BR]] 
     11name it synctest.zotero.org [[BR]] 
     12add a ServerAlias for apitest.zotero.org [[BR]] 
     13add an /etc/hosts entry for synctest.zotero.org and apitest.zotero.org to 127.0.0.1 [[BR]] 
     14in the VirtualHost, add AllowEncodedSlashes On [[BR]] 
     15add a <Directory> entry for the htdocs subdir [[BR]] 
     16{{{ 
     17<Directory "/path/to/zotero-dataserver/htdocs"> 
     18    Options FollowSymLinks MultiViews 
     19    AllowOverride All 
     20    Order allow,deny 
     21    Allow from all 
     22</Directory> 
     23}}} 
     24this directory is also the docroot [[BR]] 
     25[[BR]] 
     26Copy the sample config files under include/config and remove "sample" from the filenames [[BR]] 
     27fill out credentials and paths in config files [[BR]] 
     28[[BR]] 
     29create mysql user zoterotest [[BR]] 
     30password testtest [[BR]] 
     31create zoterotest and zoterotest_sessions Databases and give zoterotest user access to them [[BR]] 
     32[[BR]] 
     33create a zotero_www_test DB [[BR]] 
     34create a users table for zotero_www_test [[BR]] 
     35{{{ 
     36CREATE TABLE  `users` ( 
     37  `userID`             mediumint      UNSIGNED auto_increment                               NOT NULL, 
     38  `username`           varchar(40)    CHARACTER SET utf8 COLLATE utf8_general_ci            NOT NULL, 
     39  `slug`               varchar(40)    CHARACTER SET utf8 COLLATE utf8_general_ci                NULL, 
     40  `password`           char(40)       CHARACTER SET utf8 COLLATE utf8_bin                   NOT NULL, 
     41  `email`              varchar(100)   CHARACTER SET utf8 COLLATE utf8_general_ci            NOT NULL, 
     42  `openid`             varchar(100)   CHARACTER SET utf8 COLLATE utf8_general_ci                NULL, 
     43  `role`               enum('member', 
     44                            'admin')  DEFAULT 'member'                                      NOT NULL, 
     45  `resetValidationKey` char(40)       CHARACTER SET utf8 COLLATE utf8_bin                       NULL, 
     46  `resetValidationExp` int                                                                      NULL, 
     47  `emailValidationKey` char(10)       CHARACTER SET utf8 COLLATE utf8_bin                       NULL, 
     48  `emailValidated`     tinyint(1)     DEFAULT '0'                                           NOT NULL, 
     49  `hasImage`           tinyint(1)     DEFAULT '0'                                           NOT NULL, 
     50  `lastUpdated`        timestamp      ON UPDATE CURRENT_TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, 
     51  `dateRegistered`     timestamp                                                            NOT NULL, 
     52  PRIMARY KEY (`userID`), 
     53  UNIQUE KEY  (`username`), 
     54  UNIQUE KEY  (`slug`), 
     55  UNIQUE KEY  (`email`), 
     56  UNIQUE KEY  (`resetValidationKey`) 
     57) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; 
     58}}} 
     59necessary fields should be userID, username, password, slug [[BR]] 
     60password entries are generated by taking a sha1 hash of the user's password concatenated to the salt. [[BR]] 
     61slugs are generated by taking the username and trimming whitespace, lowercasing, {{{preg_replace("/[^a-z0-9 ._-]/", "", $input)}}}, and replacing spaces with underscores [[BR]] 
     62[[BR]] 
     63give write access to the tmp dir to apache [[BR]] 
     64loading http://synctest.zotero.org should give a page saying "Nothing to see here" [[BR]] 
     65[[BR]] 
     66create or edit .my.cnf in your home dir with [client] or [mysql] and user = and password = for root [[BR]] 
     67{{{ 
     68[client] 
     69user = root 
     70password = foobar 
     71}}} 
     72 
     73cd to 'misc' directory [[BR]] 
     74./test_reset [[BR]]