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 (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 is started by default with the Django lightweight development Web server bound to port 8000 on 127.0.0.1 when you deploy your OMERO.server instance. A build-in web server written purely in Python is ideal for demonstrating/testing how powerful application is. Unfortunately, this server is only designed to run in a local environment and could not deal with the pressures of a production mode of the application 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.1 and its prerequisites
- If you are using Python 2.4, you will need pysqlite. Use version 2.0.3 or higher. Python 2.5 ships with an SQLite wrapper in the standard library, so you do not need to install anything extra in that case.
- 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 the OMERO.web first time please configure the following options (in production environment please remember to run as apache_user: sudo -u apache_user):
Create log and database directories with
apache_user:apache_groupownership:mkdir /home/omero/weblog chown apache_user:apache_group /home/omero/weblog mkdir /home/omero/webdb chown apache_user:apache_group /home/omero/webdbIn your
/home/omero/omero_dist/lib/python/omeroweb/directory configure the following insettings.py:DATABASE_NAME
DATABASE_NAME = '/home/omero/webdb/db.sqlite3'LOGDIR
# LOGS # to change the log place, please specify new path for LOGDIR. # LOGDIR = os.path.join(os.path.dirname(__file__), 'log') # LOGDIR = os.path.join(os.path.join(os.path.join(os.path.join(os.path.dirname(__file__), '../'), '../'), '../'), 'var'), 'log') LOGDIR = '/home/omero/weblog/'
(4.1.1 and newer):
Settings (optional field can be blank)
$ 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/lib/python/omeroweb/custom_settings.py Please enter Username for OMERO.web administrator: webadmin Please enter Email address: webadmin@openmicroscopy.org.uk Please enter password for OMERO.web administrator: Please re-enter password for OMERO.web administrator: Saved to ~/Desktop/omero/lib/python/omeroweb/initial_data.json Database synchronization... (...) Creating table feedback_emailtemplate Creating table webadmin_gateway Installing custom SQL for feedback.EmailTemplate model (...) Installing json fixture 'initial_data' from absolute path. Installed 2 object(s) from 1 fixture(s) OMERO.web was configured successful. Please start the application.
(4.1.0 version only):
Settings (optional field can be blank)
$ bin/omero web settings Reconfiguring 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): Saving to ~/Desktop/omero/lib/python/omeroweb/custom_settings.pySuperuser and Syncdb
$ bin/omero web superuser Please enter Username for OMERO.web administrator: webadmin Please enter Email address: webadmin@openmicroscopy.org.uk Please enter password for OMERO.web administrator: Please re-enter password for OMERO.web administrator: Saving to ~/Desktop/omero/lib/python/omeroweb/initial_data.json $ bin/omero web syncdb Database synchronization... (...) Creating table feedback_emailtemplate Creating table webadmin_gateway (...) Installing json fixture 'initial_data' from absolute path. Installed 7 object(s) from 1 fixture(s) OMERO.web was prepared. Please start the application.
Configuration Guide for mod_python
If you have enabled the OMERO.web instance that is using the Django lightweight development web server, you will need to shut it down. In your
/home/omero/omero_dist/etc/grid/directory change the following indefault.xml:<server-instance template="ShellTemplate" id="Web" act="on-demand"/>If you have started OMERO.web instance that is using the Django lightweight development web server, shut that down manually:
$ cd /home/omero/omero_dist/ $ bin/omero admin ice Ice 3.3.0 Copyright 2003-2008 ZeroC, Inc. >>> server disable Web >>> server stop WebConfigure
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/lib/python/omeroweb] + sys.path" </Location>Go to the link http://your_host/webclient/ or http://your_host/webadmin/
If you wish to modify the predefined list of the OMERO.servers please go to admin panel: http://your_host/admin/webadmin/gateway/. To login, use the user superuser username and password created you created when initializing the Django settings database above.
Once you have deployed and started the server you can use your browser to access the OMERO.webadmin or 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.

