diff --git a/20220319091825-anki.org b/20220319091825-anki.org new file mode 100644 index 0000000..7f9d989 --- /dev/null +++ b/20220319091825-anki.org @@ -0,0 +1,96 @@ +:PROPERTIES: +:ID: 97d8c2d9-a539-4f0b-ad2e-953bf7845e8c +:mtime: 20220319160846 +:ctime: 20220319091825 +:END: +#+title: anki + +* Introduction +TODO + +* Installer son serveur Anki +** Howto +*** On the server: +#+BEGIN_SRC shell +# Get last version source code. +cd /opt/ +ROOT=/opt/anki-sync-server +mkdir ${ROOT} +chown ubuntu ${ROOT} +git clone https://github.com/ankicommunity/anki-sync-server.git +cd ${ROOT} +git checkout tags/v2.3.0 + +# Prépare virtual environment. +PATH=/home/ubuntu/.local/bin:$PATH +virtualenv . +. bin/activate +make init + +# Create first user +./src/ankisyncctl.py adduser + +# Edit daemon config file. +CONFIG_PATH=${ROOT}/src/ankisyncd.conf +sed -i 's/port = 27701/port = 27702/' ${CONFIG_PATH} +sed -i 's/host = 0.0.0.0/host = 127.0.0.1/' ${CONFIG_PATH} + +# Configure ngingx +cat >/etc/nginx/sites-available/anki-sync-server </etc/systemd/system/anki-sync-server.service <