10. Installing CamCOPS on the server

10.1. Hardware and operating system requirements

The CamCOPS server is cross-platform software written in Python. It’s been tested primarily under Linux with MySQL.

10.2. URLs for CamCOPS source code

10.3. Installing CamCOPS

See Linux flavours for a reminder of some common differences between Linux operating systems.

10.3.1. Ubuntu installation from Debian package

To install CRATE and all its dependencies, download the Debian package and use gdebi:

$ sudo gdebi camcops-VERSION.deb

where VERSION is the CamCOPS version you’re installing. (If you don’t have gdebi, install it with sudo apt-get install gdebi.)

CamCOPS will now be installed in /usr/share/camcops.

You should be able to type camcops and see something relevant.

10.3.2. CentOS installation from RPM

First, to get Centos 6.5 to a basic standard, see here. Then:

sudo yum install camcops_VERSION.noarch.rpm

# Or, for more verbosity and to say yes to everything, use this command instead:
# sudo yum --assumeyes --verbose --rpmverbosity=debug install camcops_VERSION.noarch.rpm
# ... but, curiously, yum temporarily swallows the output from the post-install
#     scripts and only spits it out at the end. This makes it look like the
#     installation has got stuck (because packages like numpy are very slow
#     to install); use "watch pstree" or "top" to reassure yourself
#     that progress is indeed happening.

You should be able to type camcops and see something relevant.

10.3.3. Installation for any OS

  • Create and activate a Python 3.5+ virtual environment:

    export CAMCOPS_VENV=~/dev/camcops_venv
    python3 -m virtualenv $CAMCOPS_VENV
    . $CAMCOPS_VENV/bin/activate
    
  • Install the CamCOPS server package:

    pip install camcops-server
    

Todo

sort out MySQL dependencies and/or provide database driver advice

Todo

implement Windows service

10.4. Installing other prerequisites

For example, you might be running Ubuntu and want to use Apache as your front-end web server and MySQL as your database:

sudo apt-get install apache2 mysql-client mysql-server

See also the more detailed MySQL configuration tips.