Updated README.md
This commit is contained in:
parent
654240abca
commit
f17ccd954c
26
README.md
26
README.md
@ -25,13 +25,13 @@ Instructions for installing and running AnkiServer:
|
|||||||
|
|
||||||
3. Download and install libanki. You can find the latest release of Anki here:
|
3. Download and install libanki. You can find the latest release of Anki here:
|
||||||
|
|
||||||
http://code.google.com/p/anki/downloads/list
|
http://code.google.com/p/anki/downloads/list
|
||||||
|
|
||||||
Look for a *.tgz file with a Summary of "Anki Source". At the time of this writing
|
Look for a *.tgz file with a Summary of "Anki Source". At the time of this writing
|
||||||
that is anki-2.0.11.tgz.
|
that is anki-2.0.11.tgz.
|
||||||
|
|
||||||
Download this file and extract.
|
Download this file and extract.
|
||||||
|
|
||||||
Then either:
|
Then either:
|
||||||
|
|
||||||
a. Run the 'make install', or
|
a. Run the 'make install', or
|
||||||
@ -44,7 +44,27 @@ Instructions for installing and running AnkiServer:
|
|||||||
|
|
||||||
5. Copy the example.ini to production.ini and edit for your needs.
|
5. Copy the example.ini to production.ini and edit for your needs.
|
||||||
|
|
||||||
6. Then we can run AnkiServer like so:
|
6. Create authentication database:
|
||||||
|
|
||||||
|
$ sqlite3 auth.db 'create table auth (user varchar primary key, hash varchar)'
|
||||||
|
|
||||||
|
7. Create user:
|
||||||
|
|
||||||
|
Enter username and password when prompted.
|
||||||
|
|
||||||
|
$ read -p "Username: " USER && read -sp "Password: " PASS
|
||||||
|
|
||||||
|
$ SALT=$(openssl rand -hex 8)
|
||||||
|
|
||||||
|
$ HASH=$(echo -n $USER$PASS$SALT | sha256sum | sed 's/[ ]*-$//')$SALT
|
||||||
|
|
||||||
|
$ sqlite3 test.db "INSERT INTO auth VALUES ('$USER', '$HASH')"
|
||||||
|
|
||||||
|
$ mkdir -p collections/$USER
|
||||||
|
|
||||||
|
$ unset USER PASS SALT HASH
|
||||||
|
|
||||||
|
8. Then we can run AnkiServer like so:
|
||||||
|
|
||||||
$ AnkiServer.env/bin/paster serve production.ini
|
$ AnkiServer.env/bin/paster serve production.ini
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user