Personal tools
  • We're Hiring!

You are here: Home Support OMERO v4.2.0 OMERO.server Archives 4.0 Install - Windows

Install - Windows

OMERO.server Installation for Microsoft Windows

NOTE: We have not tested the windows servers as thoroughly as our Linux or Mac OS X versions, as such Windows is not our preferred platform of choice for production servers.

NOTE: If you are upgrading your OMERO.server installation you want to follow instructions on the upgrade page.

NOTE: If you are attempting a UNIX Based Platform install (Linux, Mac OS X, etc.) please see the UNIX Based Platform install page.


Installation will require an "administrator" level account for which you know the password. If you are unsure of what it means to have a "root" level account, or if you are generally having issues with the various users/passwords described in this install guide, please see the section under "Troubleshooting".

Limitations

  • This has only been tested by the OMERO team on 32-bit Windows XP installations.
  • processor.py functionality is currently disabled, this means the scripting engine will not work.
  • Spaces are not currently supported in installation path names
  • A reboot is required after installing the prerequisites
  • bin\omero config does not work as advertised. omero config uses the registry but sets values for the current user, while the service is run as Local Services. If you are interested in running as another user, please contact the OME lists) See the "Installation" section for how to configure your setup.

Prerequisites

  • PostgreSQL 8.2 or higher installed and configured with PL/pgSQL and to accept TCP connections

    Yes, this is a higher prerequisite than the UNIX based operating systems. Only recently has PostgreSQL provided Windows service and UTF8 support availability in the default installation on Microsoft Windows. The Windows One click installer can be found on the PostgreSQL Windows download page.

    NOTE: You must install PostgreSQL as a service if you want to follow this document, other PostgreSQL installation environments are supported but are outside the scope of this document.

    NOTE: This document assumes a PostgreSQL 8.2 or higher install for ease of installation and documentation. PostgreSQL 8.2 installations are supported but are again, outside the scope of this document.

  • Java 1.5 SE Development Kit (JDK) or higher installed http://java.sun.com/javase/downloads/index.jsp

  • Ice 3.3.x installed

    Windows installers can be found on the ZeroC download page and will be called something like Ice-3.3.1-VC80.msi (for Ice 3.3.1).

  • ActivePython 2.5.x installed

    Windows installers can be found on the ActivePython download page and will be called something like ActivePython-2.5.4.3-win32-x86.msipython-2.5.4.msi (for Python 2.5.4). Packages from http://www.python.org can be used but are outside the scope of this document as further configuration is required to get them up and running.

    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

  • OMERO.server ZIP available from the OMERO downloads page.

Environment variables

For the pre-requisite software to run properly, both your PATH and PYTHONPATH system environment variables must be configured.

The bin\omero python script will also respect the OMERO_HOME environment variable. If you have this set, please make sure it points to your current installation.

  • Update your Windows environment variables: (REQUIRES RESTART!)

    1. Locate the System control panel page on the Start Menu under Settings --> Control Panel, open it and navigate to the Advanced tab (on Windows Vista the dialog will be visible after clicking the Change settings link on the System control panel page):

      Advanced System Properties

    2. Open the Environment Variables dialog by clicking on the Environment Variables... button of the above dialog:

      Environment Variables

    3. Edit the existing System environment variable Path and add a new variable pointing to the Ice installation 'bin' directory. Then add a brand new System environment variable called PYTHONPATH pointing to the Ice installation 'python' location:

      PATH variable PYTHONPATH variable

    4. Restart your computer. For environment changes to take effect in background services, a restart is unfortunately necessary. See http://support.microsoft.com/kb/821761 for more information.

Creating a database

  • Create a non-superuser database user (make sure to note down the name and password) using pgAdmin III. You can find pgAdmin III on the Start Menu under Programs --> PostgreSQL 8.3 --> pgAdmin III:

    1. Double-click on the PostgreSQL Database Server 8.3 and provide your postgres user login password

      Connect to the database server

    2. Right-click on Login Roles (or left-click on Login Roles and navigate to Edit --> New Object...) and select New Login Role...

      Create a new role

    3. Create a new role with the Role name omero and a Password omero

  • Create an omero database:

    1. Right-click on Databases (or left-click on Databases and navigate to Edit --> New Object...) and select New Database...

    2. Create a new database with the Name omero and Owner omero (this may take a few moments)

      Create a new database

  • Confirm PL/pgSQL language support to your newly created database

    1. First, go to File --> Options select the Display tab and activate the Languages option:

      Create a new database

    2. Navigate back to your database, expand the database's tree view and finally expand the now available Languages item:

      Create a new database

    3. If the plpgsql language is missing, right-click on the Languages item and select the New language... option in the menu. Finally, add the plpgsql language, accepting all defaults.

      Create a new database

Location for the your OMERO binary repository

NOTE: This is not where you want the OMERO application to be installed, it is a seperate directory that OMERO.server will use to store binary data:

  • Create a directory for the OMERO binary data repository. C:\OMERO is the default location and should be used unless you explicitly have a reason not to and know what you are doing.

You can read more about there OMERO binary repository here.

Installation

  • Extract the OMERO ZIP and note its location. Below it is referred to as: C:\omero_dist

  • Configure the path to your installation (directory names with files spaces are **not** supported):

    If you've installed the OMERO server in a location other than c:omero_dist, you'll get the following message on startup:

    No descriptor given. Using etc\grid\windefault.xml
    
        c:\omero_dist\etc\grid\templates.xml does not exist. Aborting...
    
        Please see the installation instructions on modifying
        the files for your installation (c:\my_omero_install):
    
          etc\Windows.cfg
          etc\grid\windefault.xml
    

    If so, modify the configuration values in etc/Windows.cfg

    IceGrid.Registry.Data=c:\omero_dist\var\registry
    IceGrid.Registry.DefaultTemplates=c:\omero_dist\etc\grid\templates.xml
    IceGrid.Node.Data=c:\omero_dist\var\master
    Ice.StdOut=c:\omero_dist\var\log\master.out
    Ice.StdErr=c:\omero_dist\var\log\master.err
    

    becomes

    IceGrid.Registry.Data=c:\my_omero_install\var\registry
    IceGrid.Registry.DefaultTemplates=c:\my_omero_install\etc\grid\templates.xml
    IceGrid.Node.Data=c:\my_omero_install\var\master
    Ice.StdOut=c:\my_omero_install\var\log\master.out
    Ice.StdErr=c:\my_omero_install\var\log\master.err
    

    and
    etc/grid/windefault.xml:

    variable name="OMERO_HOME"   value="c:\\omero_dist"
    

    becomes

    variable name="OMERO_HOME"   value="c:\\my_omero_install"
    
  • Review C:\omero_dist\etc\omero.properties which contains all default settings

  • Add any settings you'd like to modify to the "Profile" properties element in etc\grid\windefault.xml.

    For example,

      properties id="Profile"
          property name="omero.db.name" value="myDatabase"
          property name="omero.db.user" value="me"
          property name="omero.db.pass" value="TopSecret"
    
  • One property which it is often useful to change is the omero.data.dir value, which points to your OmeroBinaryRepository. However, when using C:\ style file paths it is necessary to "escape" the backslashes. For example:

          property name="omero.data.dir" value="D:\\OMERO"
    
  • Initialize the OMERO database. You will be asked for the version of the script which you would like to generate, where both defaults can be accepted. Finally, you'll be asked to enter and confirm password for your newly created OMERO root user (this should not be the same as your Windows login user!)

    cd C:\omero_dist\
    bin\omero db script
    Please enter omero.db.version [OMERO4]: 
    Please enter omero.db.patch [0]: 
    Please enter password for new OMERO root user: 
    Please re-enter password for new OMERO root user: 
    Saving to C:\omero_dist\OMERO4__0.sql
    
    1. Launch SQL Shell (psql) from the Start Menu under Programs --> PostgreSQL 8.3 --> SQL Shell (psql) and execute run the following to populate your database:

      Server [localhost]:
      Database [postgres]: omero
      Port [5432]:
      Username [postgres]: omero
      Password for user omero:
      Welcome to psql 8.3.7, the PostgreSQL interactive terminal.
      
      Type:  \copyright for distribution terms
             \h for help with SQL commands
             \? for help with psql commands
             \g or terminate with semicolon to execute query
             \q to quit
      
      Warning: Console code page (850) differs from Windows code page (1252)
               8-bit characters might not work correctly. See psql reference
               page "Notes for Windows users" for details.
      
      omero=> \i /omero_dist/OMERO4__0.sql
      ...
      ...
      omero=> \q
      
  • Start the server:

    $ bin\omero admin start
    Creating var\master
    Initializing var\log
    Creating var\registry
    No descriptor given. Using etc\grid\default.xml
    $
    

OMERO.web and Administration

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.

Configuration Guide for mod_python (production mode) is available on the separated page. If you wish to run OMERO.web on demonstration server please continue.

Starting OMERO.web on the Django server

The OMERO.web server does not start automatically on the windows server installation and needs to be started from the command line.

  • Edit the existing System environment variable Path and add a new System environment variable PYTHONPATH pointing to the 'omero_dist\lib\python' directory.

    PYTHONPATHOMEROWEB variable

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):

  • In your C:\omero_dist\lib\python\omeroweb\ directory configure the following in settings.py:

    • DATABASE_NAME

      DATABASE_NAME = 'C:\omero_dist\lib\python\omeroweb\db.sqlite3'
      

    $ C:>cd C:omero_dist $ bin/omero web omero web [settings|superuser|syncdb]

    OMERO.web tools:

    settings - Configuration for web superuser - Creates a superuser for managing OMERO.web local database syncdb - Local database synchronization

  • 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 C:\omero_dist\lib\python\omeroweb\custom_settings.py
    
  • Superuser and Syncdb

    $ bin/omero web superuser
    Please enter Username for OMERO.web administrator: webadmin
    Please enter Email address: omeroweb@openmicroscopy.org.uk
    Please enter password for OMERO.web administrator: 
    Please re-enter password for OMERO.web administrator: 
    Saving to C:\omero_dist\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.
    
  • Run the webserver

    C:\omero_dist\lib\python\omeroweb> python manage.py runserver
    

Web server start up error on WINDOWS (Beta4.0.0 ONLY)

If you see an error ValueError: I/O operation on closed file:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\omero_dist\lib\omeroweb>python manage.py runserver
Traceback (most recent call last):
    File "manage.py", line 29, in <module>
    import settings # Assumed to be in the same directory.
    File "C:\omero_dist\lib\omeroweb\settings.py", line 159, in <module>
    fileLog.doRollover()
    File "C:\Python25\lib\logging\handlers.py", line 274, in doRollover
    os.rename(self.baseFilename, dfn)
WindowsError: [Error 32] The process cannot access the file because  
    it is being used by another process
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
    File "C:\Python25\lib\atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
    File "C:\Python25\lib\logging\__init__.py", line 1354, in shutdown
    h.flush()
    File "C:\Python25\lib\logging\__init__.py", line 731, in flush
    self.stream.flush()
ValueError: I/O operation on closed file
Error in sys.exitfunc:
Traceback (most recent call last):
    File "C:\Python25\lib\atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
    File "C:\Python25\lib\logging\__init__.py", line 1354, in shutdown
    h.flush()
    File "C:\Python25\lib\logging\__init__.py", line 731, in flush
    self.stream.flush()
ValueError: I/O operation on closed file

In your C:\omero_dist\lib\omeroweb\ directory comment the following in settings.py:

# fileLog.doRollover()

I can access OMERO.web but every request produce error page (Beta 4.0.0 ONLY)

  • If you did not install PIL please go to

    C:\omero_dist\lib\omeroweb\webclient\view.py and comment:
    Line 37 import Image,ImageDraw
    

Installing OMERO.web on Apache for a production server

Information on how to deploy OMERO.web with Apache and mod_python can be found here. Please note that Windows is not our preferred platform of choice for production servers.

Once you have deployed and started the server you can use your browser to access the OMERO.webadmin administration interface:

Update Notification

As of milestone:3.0-Beta2.3, your OMERO.server installation will check for updates each time it is started from the Open Microscopy Environment update server. If you wish to disable this functionality you should do so now as outlined on the UpgradeCheck page.

Security

It is now recommended that you read the Security page to get a good idea as to what you need to do to get OMERO clients speaking to your newly installed OMERO.server in accordance with your institution or company's security policy.

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.

Document Actions