-
-
Notifications
You must be signed in to change notification settings - Fork 58
Installing on Ubuntu and Debian
Cristian Souza edited this page Aug 18, 2020
·
1 revision
$ sudo apt update && sudo apt upgrade -y
$ sudo apt install git python3 python3-dev python3-pip python3-mysqldb python3-setuptools python3-virtualenv automake libfuzzy-dev libssl-dev libffi-dev mariadb-server libmariadbclient-dev
$ sudo mysql_secure_installation
$ sudo mysql -u root -p
mysql> CREATE USER 'freki'@'localhost' IDENTIFIED BY 'yourpassword';
mysql> GRANT ALL PRIVILEGES ON * . * TO 'freki'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> exit
$ git clone https://github.com/crhenr/freki.git
$ sudo mkdir /opt/freki
$ sudo chown -R youruser:usergroup /opt/freki
$ cd freki/freki
$ virtualenv venv
$ source venv/bin/activate
(venv) $ pip3 install -r requirements.txt
(venv) $ pip3 install mysqlclient
(venv) $ export FREKI_MYSQL_HOST="localhost"
(venv) $ export FREKI_MYSQL_PASSWORD="yourpassword"
(venv) $ export FREKI_SECRET_KEY="yoursecretkey"
(venv) $ python3 run.py
or
(venv) $ gunicorn --bind 0.0.0.0:5000 run:app