← Numbas editor installation instructions

Installing the Numbas editor on Ubuntu

These are outline instructions on setting up the Numbas editor with a backend MySQL database.

The Numbas editor uses Django, a web framework written in the Python programming language. Django has many configuration options, which we won't detail here. For more information, consult the Django documentation.

The following instructions are for a server running Ubuntu Xenial (16.04) or newer.

Essential package installation

Packages that would be installed as part of a standard Ubuntu install are not listed.

Virtualenv

Rather than rely on the packaged version of Django, a more flexible approach is to use virtualenv, which is a tool to create an isolated Python environment.

Database

Create directories and set permissions

Clone the editor and compiler repositories

Configuration

Ongoing maintenance

To keep the editor up to date, run the following script: source /opt/python/numbas-editor/bin/activate cd /srv/numbas/compiler git pull origin master pip install -r requirements.txt cd /srv/www/numbas_editor git pull origin master python manage.py migrate python manage.py collectstatic --noinput pip install -r requirements.txt touch web/django.wsgi

Note that if any changes are made to the editor code, including editing the settings files, then for the web server to recognise these changes you must either touch the web/django.wsgi file, or restart the Apache server.