Installation instructions

Quick setup

Note

Most path names are represented using the linux convention of a / separator. If you are installing in a Windows environment you will need to use the Windows \ separator.

  1. Install python (might need to be 2.7)

  2. Install setuptools and pip

  3. Install OpenREM
    • pip install OpenREM-ver.tar.gz
  4. Configure OpenREM
    • Locate install location, typically something/lib/python2.7/site-packages/openrem

    • There are two files that need renaming:
      • openrem/openrem/settings.py.example to openrem/openrem/settings.py
      • openrem/openrem/wsgi.py.example to openrem/openrem/wsgi.py
    • in the settings.py file, set the database details.

    • For testing ONLY, use
      • 'ENGINE': 'django.db.backends.sqlite3',

      • 'NAME': '/ENTER/PATH/WHERE/DB/FILE/CAN/GO'
        • Windows example: 'NAME': 'C:\Documents\User\OpenREM\openrem.db'
        • Linux example: 'NAME': '/var/openrem/openrem.db'
  5. Create the database
    • python path/to/openrem/manage.py syncdb
    • (optional when just testing) python path/to/openrem/manage.py convert_to_south remapp
  6. Start test web server
    • python path/to/openrem/manage.py runserver
    • If you are using a headless server and need to be able to see the web interface from another machine, use python path/to/openrem/manage.py runserver x.x.x.x:8000 replacing the ‘x’ with the IP address of the server and ‘8000’ with the port you wish to use.
  7. Open the web addesss given, appending /openrem (http://localhost:8000/openrem)

  8. Add some data!
    • openrem_rdsr.py rdsrfile.dcm

More in depth process

  1. Install virtualenv or maybe virtualenvwrapper

    Recommended if the server is ever going to be used for more than one python application – virtualenv sets up an isolated python environment

  2. Install OpenREM

    As per the Quick setup instructions above. Don’t configure OpenREM yet

  3. Install a production database

    SQLite is great for getting things running quickly and testing if the setup works, but is really not recommended for production use on any scale. Therefore it is recommended to use a different database such as PostgreSQL or MySQL.

    Here are the authors instructions for installing PostgreSQL on linux:

  4. Install and configure a production webserver

    Unlike the database, the production webserver can be left till later and can be changed again at any time.

    However, for performance it is recommended that a production webserver is used. Popular choices would be either Apache or you can do as the cool kids do and use Gunicorn with nginx.

  5. Configure OpenREM

    Follow the ‘Configure OpenREM’ instuctions in the Quick setup section above, but this time with the production database details.

    Configure the production webserver too.

  6. Create the database
    • python path/to/openrem/manage.py syncdb
  7. Convert the database to use South

    South is a django application to manage database migrations. Using South means that future changes to the database model can be calculated and executed automatically with simple commands when OpenREM is upgraded.

    • python path/to/openrem/manage.py convert_to_south remapp