Vamos a desplegar un cms en python como es mezzanine, para ello vamos a seguir los siguientes pasos:

Instalar apache, modulo wsgi, python y msql

El primer paso sera instalar un servidor web apache y las distintas dependencias necesarias para su correcto funcionamiento, como, python, modulo wsgi y la base de datos MySQL.

root@python:/home/usuario# apt update && apt upgrade
root@python:/home/usuario# apt install apache2 libapache2-mod-wsgi python-virtualenv python python-setuptools python-dev build-essential mysql-server libmysqlclient-dev

Creamos un entorno virtual

Para poder utilizar pip, vamos a crear un entorno virtual y lo activaremos:

usuario@python:~$ virtualenv mezzanine
Running virtualenv with interpreter /usr/bin/python2
New python executable in mezzanine/bin/python2
Also creating executable in mezzanine/bin/python
Installing setuptools, pip...done.
usuario@python:~$ source mezzanine/bin/activate
(mezzanine)usuario@python:~$

Una vez creado el entorno virtual actualizamos pip y setuptools:

pip install --upgrade pip
pip install setuptools
pip install setuptools --upgrade 

Instalamos mezzanine y pillow

Una vez tenemos actualizado pip, procedemos a instalar mezzanine y pillow:

(mezzanine)usuario@python:~$ pip install mezzanine
(mezzanine)usuario@python:~$ pip install pillow

Creamos proyecto para mezzanine

El siguiente paso es crear un proyecto e instalar el paquee mysql-python para poder utilizar la base de datos de MySQL.

(mezzanine)usuario@python:~$ mezzanine-project juanluramirez
(mezzanine)usuario@python:~$ pip install mysql-python

Crear una base de datos y un usuario con privilegios

Es importante no solo crear una base de datos, sino, también crear un usuario con privilegios:

(mezzanine)usuario@python:~$ mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 43
Server version: 5.5.54-0+deb8u1 (Debian)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database juanluramirez
    -> ;
Query OK, 1 row affected (0.00 sec)

mysql> create user 'juanlu' identified by 'juanlu';
Query OK, 0 rows affected (0.00 sec)

mysql> grant all privileges on juanluramirez.* to 'juanlu'@'localhost' identified by 'juanlu' with grant option;
Query OK, 0 rows affected (0.00 sec)

Enlazar base de datos a mezzanine

Una vez tengamos creada la base de datos, vamos a enlazarla a mezzanine modificando el fichero juanluramirez/juanluramirez/local_settings.py, primero editamos el apartado DATABASES, para que quede así:

DATABASES = {
    "default": {
        # Ends with "postgresql_psycopg2", "mysql", "sqlite3" or "oracle".
        "ENGINE": "django.db.backends.mysql",
        # DB name or path to database file if using sqlite3.
        "NAME": "juanluramirez",
        # Not used with sqlite3.
        "USER": "juanlu",
        # Not used with sqlite3.
        "PASSWORD": "juanlu",
        # Set to empty string for localhost. Not used with sqlite3.
        "HOST": "",
        # Set to empty string for default. Not used with sqlite3.
        "PORT": "",
    }
}

Y a continuación descomentamos la linea «ALLOWED_HOSTS» y añadimos la IP de nuestra maquina:

###################
# DEPLOY SETTINGS #
###################

# Domains for public site
ALLOWED_HOSTS = ["[IP_Maquina]"]

Poblamos la base de datos.

Ahora una vez enlazada vamos a poblar la base de datos, para ello ejecutamos el script en python manage.py y la opción createdb:

(mezzanine)usuario@python:~/juanluramirez$ python manage.py createdb
Operations to perform:
  Apply all migrations: admin, auth, blog, conf, contenttypes, core, django_comments, forms, galleries, generic, pages, redirects, sessions, sites, twitter
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying sites.0001_initial... OK
  Applying blog.0001_initial... OK
  Applying blog.0002_auto_20150527_1555... OK
  Applying conf.0001_initial... OK
  Applying core.0001_initial... OK
  Applying core.0002_auto_20150414_2140... OK
  Applying django_comments.0001_initial... OK
  Applying django_comments.0002_update_user_email_field_length... OK
  Applying django_comments.0003_add_submit_date_index... OK
  Applying pages.0001_initial... OK
  Applying forms.0001_initial... OK
  Applying forms.0002_auto_20141227_0224... OK
  Applying forms.0003_emailfield... OK
  Applying forms.0004_auto_20150517_0510... OK
  Applying forms.0005_auto_20151026_1600... OK
  Applying galleries.0001_initial... OK
  Applying galleries.0002_auto_20141227_0224... OK
  Applying generic.0001_initial... OK
  Applying generic.0002_auto_20141227_0224... OK
  Applying pages.0002_auto_20141227_0224... OK
  Applying pages.0003_auto_20150527_1555... OK
  Applying redirects.0001_initial... OK
  Applying sessions.0001_initial... OK
  Applying sites.0002_alter_domain_unique... OK
  Applying twitter.0001_initial... OK

A site record is required.
Please enter the domain and optional port in the format 'domain:port'.
For example 'localhost:8000' or 'www.example.com'. 
Hit enter to use the default (127.0.0.1:8000): [IP_Maquina]

Creating default site record: [IP_Maquina] ...

Creating default account ...

Username (leave blank to use 'usuario'): juanlu
Email address: [Email]
Password: [Contraseña]
Password (again): [Contraseña] 
Superuser created successfully.
Installed 2 object(s) from 1 fixture(s)

Would you like to install some initial demo pages?
Eg: About us, Contact form, Gallery. (yes/no): yes

Creating demo pages: About us, Contact form, Gallery ...

Installed 16 object(s) from 3 fixture(s)

Configuracion contenido estatico

Para ello vamos a añadir las siguiente lineas en el fichero juanluramirez/local_settings.py

PROJECT_APP_PATH = os.path.dirname(os.path.abspath(__file__))
PROJECT_APP = os.path.basename(PROJECT_APP_PATH)
PROJECT_ROOT = BASE_DIR = os.path.dirname(PROJECT_APP_PATH)
CACHE_MIDDLEWARE_KEY_PREFIX = PROJECT_APP
STATIC_URL = "/static/"
STATIC_ROOT = os.path.join(PROJECT_ROOT, STATIC_URL.strip("/"))

Y ejecutamos el script manage.py con la opcion collectstatic:

(mezzanine)usuario@python:~/juanluramirez$ python manage.py collectstatic

You have requested to collect static files at the destination
location as specified in your settings:

    /home/usuario/juanluramirez/static

This will overwrite existing files!
Are you sure you want to do this?

Type 'yes' to continue, or 'no' to cancel: yes
412 static files copied to '/home/usuario/juanluramirez/static'.

Desactivamos el entorno virtual

Por ultimo vamos a desactivar el entorno virtual.

(mezzanine)usuario@python:~/juanluramirez$ deactivate
usuario@python:~/juanluramirez$ 

Crear virtualhost para mezzanine

Para ello vamos a crear un virtualhost que vamos a llamar mezzanine.conf:

root@python:/home/usuario# cd /etc/apache2/sites-available/
root@python:/etc/apache2/sites-available# cp 000-default.conf mezzanine.conf
root@python:/etc/apache2/sites-available# nano mezzanine.conf 

Y dejamos el fichero de configuracion creado asi:

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /home/usuario/juanluramirez/

        Alias /static /home/usuario/juanluramirez/static

        <Directory /home/usuario/juanluramirez/static>
                Require all granted
        </Directory>

        <Directory /home/usuario/juanluramirez/juanluramirez>
                <Files wsgi.py>
                        Require all granted
                </Files>
        </Directory>

        WSGIDaemonProcess mezzanine \
                python-home=/home/usuario/mezzanine \
                python-path=/home/usuario/juanluramirez/:/home/usuario
        WSGIProcessGroup mezzanine
        WSGIScriptAlias / /home/usuario/juanluramirez/juanluramirez/wsgi.py
        
	ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Deshabilitamos el virtualhost por defecto

Deshabilitamos el sitio por defecto 000-default.conf, activamos el nuestro mezzanine.conf y reiniciamos el servicio

root@python:/etc/apache2/sites-available# a2dissite 000-default.conf 
Site 000-default disabled.
To activate the new configuration, you need to run:
  service apache2 reload
root@python:/etc/apache2/sites-available# a2ensite mezzanine.conf 
Enabling site mezzanine.
To activate the new configuration, you need to run:
  service apache2 reload
root@python:/etc/apache2/sites-available# systemctl restart apache2

Prueba funcionamiento

Una vez realizado esto tendremos nuestro CMS en Python desplegado: