Install Mezzanine CMS on a Debian VPS

install-mezzanine-cms-on-a-debian-vpsIn this blog post we will show you how to install the Mezzanine CMS on a Debian 8 VPS. Mezzanine is open source content management system built using the Django framework. Some of the main features include: Blog engine, Shopping cart module, User accounts and profiles, In-line page editing ..etc.

Login to your VPS via SSH

ssh user@vps

Update the system and install necessary packages.

[user]$ sudo apt-get update && sudo apt-get -y upgrade
[user]$ sudo apt-get install python-software-properties build-essential python python-dev libjpeg62-turbo-dev libssl-dev

Install MariaDB 10.0 and create a database

To install MariaDB, run the following commands:

[user]$ sudo apt-key adv --recv-keys --keyserver 0xcbcb082a1bb943db
[user]$ sudo add-apt-repository 'deb jessie main'
[user]$ sudo apt-get update
[user]$ sudo apt-get install -y mariadb-server libmariadbclient-dev

When the installation is complete, run the following command to secure your installation:

[user]$ mysql_secure_installation

Next, we need to create a database for our mezzanine installation.

[user]$ mysql -uroot -p
MariaDB [(none)]> CREATE DATABASE mezzanine;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON mezzanine.* TO 'mezzanineuser'@'localhost' IDENTIFIED BY 'mezzanineuser_passwd';
MariaDB [(none)]> \q

Install pip and a python virtual environment

[user]$ sudo apt-get install python-pip
[user]$ sudo pip install --upgrade virtualenv
[user]$ mkdir -p ~/.virtualenvs/mezzanine
[user]$ virtualenv ~/.virtualenvs/mezzanine
[user]$ source ~/.virtualenvs/mezzanine/bin/activate

Install Mezzanine and create a new project

(mezzanine)$ pip install mezzanine
(mezzanine)$ mezzanine-project my_mezzanine
(mezzanine)$ cd ~/my_mezzanine

Open the file and edit the database configuration values:

(mezzanine)$ nano
    "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": "mezzanine",
        # Not used with sqlite3.
        "USER": "mezzanineuser",
        # Not used with sqlite3.
        "PASSWORD": "mezzanineuser_passwd",
        # Set to empty string for localhost. Not used with sqlite3.
        "HOST": "",
        # Set to empty string for default. Not used with sqlite3.
        "PORT": "",

Initialize the database:

(mezzanine)$ python createdb

The script will ask you to create a superuser and a few other questions.

When the initialization is finished, run the following command to start the Mezzanine:

(mezzanine)$ python runserver

If you see the following message, it means you’ve successfully installed Mezzanine.

Validating models...

0 errors found
July 08, 2015 - 13:45:18
Django version 1.6.11, using se.settings'
Starting development server at
Quit the server with CONTROL-C.

That’s it. You have successfully installed Mezzanine. The application should be available at http://your_server_ip:8000/ or http://localhost:8000/

For more info about the Mezzanine CMS please go to:

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install this for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

How to install and configure Tinyproxy on Ubuntu 14.04
How to install Chive on a Debian Wheezy VPS
How to install The Bug Genie Issue Tracker on a CentOS 7 VPS