Web on production
OMERO.web Install and Configuration
OMERO.web is the web application component of the OMERO platform which allows for the management, viewing (in a fully multi-dimensional image viewer), attachment and association of files to images, datasets, and projects from one or more OMERO.server's. It also includes webadmin for managing users and groups.
OMERO.web ships with OMERO.server and can be started with the Django lightweight development Web server bound to port 8000 on 127.0.0.1 after you've deployed your OMERO.server instance. A build-in web server written purely in Python is ideal for demonstrating/testing how powerful OMERO.web is. Unfortunately, this server is only designed to run in a local environment, and will not deal with the pressures of a production server used by many people concurrently. For that, you need to deploy OMERO.web to a production-grade web server, such as mod_python module for Apache. You can find more information on the Django site here.
If you need help configuring your firewall rules, see the Security page.
Prerequisites
- OMERO 4.2 and its prerequisites
- Python version from 2.5 or 2.6 (due to backwards incompatibilities in Python 3.0, Django does not currently work with Python 3.0; for more information see the Django Installation page).
- Python Imaging Library (for OMERO.web only) Packages should be available for your distribution from here
- Matplot Lib (for OMERO.web only) Packages should be available for your distribution from here
- Apache with mod_python. Packages should be available for your distribution from here
Pre-configuration
When you run OMERO.web for the first time, be sure to configure the following options (in production environments please remember to run as the apache_user: sudo -u apache_user):
Create the log and database directories with
apache_user:apache_groupownership:mkdir /home/omero/weblog chown apache_user:apache_group /home/omero/weblog chown apache_user:apache_group /home/omero/var/lib(4.2 and newer):
Settings (optional fields can be blank).(You are no longer required to touch settings.py)
$ bin/omero web settings You just installed OMERO, which means you didn't have settings configured in OMERO.web. Please enter the domain you want to run OMERO.web on (http://www.domain.com:8000/):http://web.openmicroscopy.org.uk/ Please enter the Email address you want to send from (omero_admin@example.com): web@openmicroscopy.org.uk Please enter the SMTP server host you want to send from (smtp.example.com): smtp.openmicroscopy.org.uk Optional: please enter the SMTP server port (default 25): Optional: Please enter the SMTP server username: Optional: Password: Optional: TSL? (yes/no): Saved to ~/Desktop/omero/var/lib/custom_settings.pyYou may receive an erroneous error message here (we are trying to eliminate this):
Error: Can't find the file 'var/lib/custom_settings.py'It appears you haven't customized things. You'll have to run 'bin/omero web settings', passing it your settings module. (If the file custom_settings.py does indeed exist, it's causing an ImportError somehow.)
However, if the file
var/lib/custom_settings.pyand the symlink~/Desktop/omero/lib/python/omeroweb/media/webgateway -> ~/Desktop/omero/lib/python/omeroweb/webgateway/mediaexist, then you should be okay to start the web server, as below.In your
/home/omero/omero_dist/var/lib/directory add the following to yourcustom_settings.pyfile:LOGDIR
LOGDIR = '/home/omero/weblog/'Server list (optional):
SERVER_LIST = ( ('omero1.domain.com', 4064, 'omero1'), ('omero2.domain.com', 4064, 'omero2'), ... )Pagination (optional-defines how many images is shown per page):
PAGE = 24
Configuration Guide for mod_python
If you have enabled the OMERO.web instance which uses the Django lightweight development web server, you will need to shut it down before continuing.
Configure
mod_python:<Location "/"> SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE omeroweb.settings PythonDebug On PythonPath "['/home/omero/omero_dist/lib/python', '/home/omero/omero_dist/var/lib', '/home/omero/omero_dist/lib/python/omeroweb'] + sys.path" </Location>Go to the link http://your_host/webclient/ or http://your_host/webadmin/
Once you have deployed and started the server, you can use your browser to access OMERO.webadmin or the OMERO.webclient:
http://your_host/webadmin
http://your_host/webclient
Troubleshooting
My OMERO install doesn't work! What do I do now!?! Examine the Troubleshooting page and if all else fails post a message to our ome-users mailing list discussed on the Community page.

