Skip to content

Installation on Fedora Server 26

ranebull edited this page Oct 20, 2017 · 4 revisions

Installation on Fedora Server 26

Upgrade system:

$ sudo yum upgrade -y

Install some prerequisites:

$ sudo yum install -y htop vim mc tmux git gcc-c++ python-devel

Install Flask, dataset and simplejson:

$ sudo pip install Flask flask-seasurf simplejson "dataset==0.6.4"

Clone the repo:

$ git clone https://github.com/balidani/tinyctf-platform.git
$ cd tinyctf-platform

Fix SQLAlchemy error:

$ sed -i -e s/ctf.db/ctf.db?check_same_thread=False/g config.json

Or adding ?check_same_thread=False after ctf.db in config.json.

$ firewall-cmd --add-port=8888/tcp --permanent
$ systemctl restart firewalld

Or stop firewall daemon:

systemctl stop firewalld

Import the tasks (Must do after every task-change):

$ python2 task_import.py

If you want to clear all old tasks, then import the tasks from tasks.json, run:

python task_import.py purge

Start the server:

$ python2 server.py

Note: Flask should run on top of a proper web server if you plan to have many players.