Updated README.md
This commit is contained in:
parent
654240abca
commit
f17ccd954c
22
README.md
22
README.md
@ -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