While there are installation instructions in the repositories, I found them lacking as they assume there is already a configured system. These instructions are done on a freshly installed Arch based server (Manjaro), and detail all the steps that I required to get Konishi running.
I opted to go for a simple sqlite installation, instead of postgres, so I added the steps for creating and configuring the sqlite db.
Also, I couldn't get the register user part of the site working, so one of the steps here is to inject a user into the empty database.
Register is now working, this part is obsolete. I keep it in as extra info, might you ever need it again.
su
pacman -Syy
pacman -S python-pip
mkdir /var/www
cd /var/www/
git clone https://github.com/konishi-project/zimmerman.git
cd zimmerman
pip install virtualenv
virtualenv konishienv
source konishienv/bin/activate
pip install -r requirements.txt
chown <username>: /var/www -R
- exit root user
cd /var/www/zimmerman
sqlite3 konishi.db
-
.exit
- In config.py, set: SQLALCHEMY_DATABASE_URI = 'sqlite:////var/www/zimmerman/konishi.db' sqlite
source konishienv/bin/activate
python3
from app import db # Import the database object from app.py
db.create_all() # Create the database cluster
quit() # Exit out of python
You can skip this section since registration works now.
- Generate password hash
cd /var/www/zimmerman
source konishienv/bin/activate
python3
>> from werkzeug.security import generate_password_hash
>> generate_password_hash('Zuccalicious666#', method='sha512')
>> exit()
'sha512$p5dTmOr1$13d80ee99606cd9f541cc6d7599803e460989da02d814395405abf95f4dcb2b3bcac9307b721601723ca41b4a1ad2fa0642e6e808ee4dbb4a47930d9e2093ff0'
cd /var/www/zimmerman
sqlite3 konishi.db
INSERT INTO user (email,username,first_name,last_name,password,joined_date)
VALUES ('[email protected]','gudetama','mr','gudetama','sha512$p5dTmOr1$13d80ee99606cd9f541cc6d7599803e460989da02d814395405abf95f4dcb2b3bcac9307b721601723ca41b4a1ad2fa0642e6e808ee4dbb4a47930d9e2093ff0',DATETIME());
cd /var/www/zimmerman
source konishienv/bin/activate
# if not stil in the venvpython3 app.py
sudo pacman -S npm
cd /var/www
git clone https://github.com/konishi-project/higala.git
cd /var/www/higala/src
nano store.js
- Change the backend url from 127.0.0.1:4000 to <your server ip>:4000
cd /var/www/higala
npm install
# first time onlynpm audit fix
# first time onlynpm run serve --fix
# --fix is first time only
After running the frontend, do:
ctrl+z
(close process)bg
(runs last run process in background)disown
(unlinks it from your account?)
Do the same for the backend, then you can close the terminal and it will keep running.