I’m trying to setup CMS (which can be found here here ) on Ubuntu 16.04 32bit.
I’m a complete noob when it comes to Ubuntu so I would like to ask you guys and gals if someone can guide me through this I would be very grateful.
Also please could you provide a lot of details from A to Z because I don't think I can solve a problem on my own when it comes to Ubuntu.


1 Answer 1


Copied straight from the official installation instructions:


Dependencies and available compilers



On Ubuntu 16.04, one will need to run the following script to satisfy all dependencies:

# Feel free to change OpenJDK packages with your preferred JDK.
sudo apt-get install build-essential openjdk-8-jre openjdk-8-jdk fpc postgresql postgresql-client gettext python2.7 iso-codes shared-mime-info stl-manual cgroup-lite

# Only if you are going to use pip/virtualenv to install python dependencies
sudo apt-get install python-dev libpq-dev libcups2-dev byaml-dev libffi-dev python-pip

# Optional
sudo apt-get install nginx-full php7.0-cli php5-fpm phppgadmin texlive-latex-base a2ps gcj-jdk haskell-platform

Preparation steps

Download CMS 1.3.rc0 from GitHub as an archive, then extract it on your filesystem. You should then access the cms folder using a terminal.

Warning: If you decided to git clone the repository instead of downloading the archive, and you didn’t use the --recursive option when cloning, then you need to issue the following command to fetch the source code of the sandbox:

git submodule update --init

In order to run CMS there are some preparation steps to run (like installing the sandbox, compiling localization files, creating the cmsuser, and so on). You can either do all these steps by hand or you can run the following command:

sudo ./prerequisites.py install

This script will add you to the cmsuser group if you answer Y when asked. If you want to handle your groups by yourself, answer N and then run:

sudo usermod -a -G cmsuser <your user>

You can verify to be in the group by issuing the command:


Remember to logout, to make the change effective.

Warning: Users in the group cmsuser will be able to launch the isolate program with root permission. They may exploit this to gain root privileges. It is then imperative that no untrusted user is allowed in the group cmsuser.

Installing CMS and its Python dependencies

There are a number of ways to install CMS and its Python dependencies:

Method 1: Global installation with pip

There are good reasons to install CMS and its Python dependencies via pip (Python Package Index) instead of your package manager (e.g. apt-get). For example: two different Linux distro (or two different versions of the same distro) may offer two different versions of python-sqlalchemy. When using pip, you can choose to install a specific version of sqlalchemy that is known to work correctly with CMS.

Assuming you have pip installed, you can do this:

sudo pip2 install -r requirements.txt
sudo python2 setup.py install

This command installs python dependencies globally. Note that on some distros, like Arch Linux, this might interfere with the system package manager. If you want to perform the installation in your home folder instead, then you can do this instead:

pip2 install --user -r requirements.txt
python2 setup.py install --user

Method 2: Virtual environment

Warning: An alternative method to perform the installation is with a virtual environment, which is an isolated Python environment that you can put wherever you like and that can be activated/deactivated at will. The tool you need in order to create a virtual environment is called virtualenv, and can be installed by looking for virtualenv using your Linux distribution's package manager. For example:

Once you installed virtualenv, you will need to create a virtual environment somewhere in your filesystem. For example, let's assume that you decided to create it under your home directory (as ~/cms_venv):

virtualenv -p python2 ~/cms_venv

To activate it:

source ~/cms_venv/bin/activate

After the activation, the pip command will always be available (even if it was not available globally, e.g. because you did not install it). In general, every python command (python, pip) will refer to their corresponding virtual version. So, you can install python dependencies by issuing:

pip install -r requirements.txt
python setup.py install

Note: Once you finished using CMS, you can deactivate the virtual environment by issuing:


Method 3: Using apt-get on Ubuntu

Warning: It is usually possible to install python dependencies using your Linux distribution's package manager. However, keep in mind that the version of each package is controlled by the package mantainers and could be too new or too old for CMS. On Ubuntu, this is generally not the case since we try to build on the python packages that are available for the current LTS version.

To install CMS and its Python dependencies on Ubuntu, you can issue:

sudo python setup.py install
sudo apt-get install python-setuptools python-tornado python-psycopg2 python-sqlalchemy python-psutil python-netifaces python-crypto python-tz python-six python-beautifulsoup python-mechanize python-coverage python-mock python-requests python-werkzeug python-gevent python-bcrypt python-chardet patool

# Optional.
sudo apt-get install python-yaml python-sphinx python-cups python-pypdf2

Running CMS non-installed

To run CMS without installing it in the system, you need first to build the prerequisites:

./prerequisites.py build

There are still a few steps to complete manually in this case. First, add CMS and isolate to the path and create the configuration files:

export PATH=$PATH:./isolate/
export PYTHONPATH=./
cp config/cms.conf.sample config/cms.conf
cp config/cms.ranking.conf.sample config/cms.ranking.conf

Second, perform these tasks (that require root permissions):

  • create the cmsuser user and a group with the same name;
  • add your user to the cmsuser group;
  • set isolate to be owned by root:cmsuser, and set its suid bit.

For example:

sudo useradd cmsuser
sudo usermod -a -G cmsuser <your user>
sudo chown root:cmsuser ./isolate/isolate
sudo chmod u+s ./isolate/isolate

Updating CMS

As CMS develops, the database schema it uses to represent its data may be updated and new versions may introduce changes that are incompatible with older versions.

To preserve the data stored on the database you need to dump it on the filesystem using cmsDumpExporter before you update CMS (i.e. with the old version).

You can then update CMS and reset the database schema by running:


To load the previous data back into the database you can use cmsDumpImporter: it will adapt the data model automatically on-the-fly (you can use cmsDumpUpdater to store the updated version back on disk and speed up future imports).

Not the answer you're looking for? Browse other questions tagged .