Installing Wagtail on Ubuntu 16.04
Install Postgres
# sudo apt-get install postgresql postgresql-contrib
# sudo apt-get install postgresql-server-dev-9.5
Python 3 is installed by default
Install the Python packages and dependencies
# sudo apt-get install python3-pip
# sudo apt-get install python3-venv
# sudo apt-get install python3-setuptools
# sudo apt-get install libtiff5-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk
Create Python Virtual Environment
Create the Python virtual environment and install the necessary Wagtail dependencies into the virtual environment
# python3 -m venv python_wagtaildemo
# source python_wagtaildemo/bin/activate
# pip install wheel
# pip install wagtail
# pip install psycopg2
Create database and user for website
This should be done as the 'postgres' user
$ createuser demouser -P
$ createdb demodb -O demouser
Create the site
# wagtail start wagtaildemo
# cd wagtaildemo
# vi wagtaildemo/settings/base.py
...
...
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'demodb',
'USER': 'demouser',
'PASSWORD': 'demopassword',
'HOST':'127.0.0.1',
'PORT':'', # Set to empty string for default.
}
}
:wq!
# ./manage.py migrate
# ./manage.py createsuperuser
Run the site
# ./manage.py runserver