OMERO - Image Server - Install

This page documents the installation of required packages and the OMERO server. Once completed, you should have a server ready for running a standalone (single node) instance of OMERO.

It's assumed that you have an already installed Linux server. These instructions are for Debian Wheezy, but should be fairly easy to adopt to another Linux flavour.

The insructions are essential the same as in the omero-install-debian.sh script available from the download page.

Create directories

Create the server and data directories for OMERO:

  bash$> mkdir -p /usr/local/omero
  bash$> mkdir -p /data/omero

Setup source list

Some required packages belongs to contrib and non-free. We need to add these to APT sources list:

  bash$> grep -q contrib /etc/apt/sources.list || ( \
    echo >> /etc/apt/sources.list; \
    echo "deb http://ftp.sunet.se/pub/Linux/distributions/debian/ wheezy contrib" >>  /etc/apt/sources.list; \
    echo "deb-src http://ftp.sunet.se/pub/Linux/distributions/debian/ wheezy contrib" >> /etc/apt/sources.list; \
  )
        
  bash$> grep -q non-free /etc/apt/sources.list || ( \
    echo >> /etc/apt/sources.list; \
    echo "deb http://ftp.sunet.se/pub/Linux/distributions/debian/ wheezy non-free" >> /etc/apt/sources.list; \
    echo "deb-src http://ftp.sunet.se/pub/Linux/distributions/debian/ wheezy non-free" >> /etc/apt/sources.list: \
  )

Run apt-get to update the APT package cache:

  bash$> apt-get update

Install packages

The next step is to install all required packages. This installation us going to use Apache as web server. Other alternatives are i.e. nginx.

  # Install sudo:
  bash$> apt-get install sudo

  # Install Java:
  bash$> apt-get install openjdk-7-jdk

  # Install core packages:
  bash$> apt-get install unzip build-essential mencoder
  bash$> apt-get install python python-imaging python-numpy python-tables python-matplotlib
  bash$> apt-get install zeroc-ice33
  bash$> apt-get install zeroc-ice34
  bash$> apt-get install postgresql
  bash$> apt-get install apache2 libapache2-mod-fastcgi
        
  # Install utility programs:
  bash$> apt-get install jed
  bash$> apt-get install pwgen
        

Create system account

The OMERO server shouldn't be runned as root. Create a system account for the service:

  bash$> useradd -c "OMERO server account" -d /usr/local/omero -r -s /bin/bash omero

Install OMERO server

Now download and install OMERO under /usr/local/omero. You might want to check if a newer archive is available for download first:

  bash$> cd /usr/local/omero
  bash$> wget http://cvs.openmicroscopy.org.uk/snapshots/omero/4.4.8p1/OMERO.server-4.4.8p1-ice34-b304.zip
  bash$> unzip OMERO.server-4.4.8p1-ice34-b304.zip

Create symbolic links. These will make maintenance easier:

  bash$> ln -s OMERO.server-4.4.8p1-ice34-b304 server
  bash$> ln -s /data/omero data

Finalize with updating ownership:

  bash$> chown -R omero:omero /usr/local/omero /data/omero

Setup environment

Export required environment variables. These will be read by the service start/stop script or when doing a su as omero:

  bash$> cat << END >> .bashrc \
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 \
export ICE_HOME=/usr/share/Ice-3.4.2 \
export POSTGRES_HOME=/usr/lib/postgresql/9.1 \
export OMERO_PREFIX=/usr/local/omero/server \
export PATH=\$PATH:\$JAVA_HOME/bin:\$ICE_HOME:\$POSTGRES_HOME/bin:\$OMERO_PREFIX/bin \
export PYTHONPATH=/usr/lib/pymodules/python2.7:\$PYTHONPATH \
export LD_LIBRARY_PATH=/usr/share/java:/usr/lib:\$LD_LIBRARY_PATH \
END

Remember to link .bashrc as .profile or it won't be read by bash login shell:

  bash$> ln -sf .bashrc .profile

Create database

Create the PostgreSQL database. It should be created as root, but populated (later) logged on as the omero user.

Chose a password or generate it using pwgen:

  bash$> pwgen -s -c -n 12 1

Continue with creating the SQL user and database:

  bash$> sudo -u postgres createuser -P -D -R -S omero
  bash$> sudo -u postgres createdb -O omero omero
  bash$> sudo -u postgres createlang plpgsql omero

Update access control and restart PostgreSQL:

  bash$> sed -i '/127.0.0.1/s/md5/trust/' /etc/postgresql/9.1/main/pg_hba.conf
  bash$> /etc/init.d/postgresql restart

Start/stop script

Boot script can be downloaded from the download page. You should at least install the initrc-omero-server.sh unless you are setting up an test instance of OMERO.

Download and install the start/stop script:

  bash$> wget --output-document=/etc/init.d/omero-server http://it.bmc.uu.se/andlov/proj/edu/omero/files/initrc-omero-server.sh
  bash$> wget --output-document=/etc/init.d/omero-web    http://it.bmc.uu.se/andlov/proj/edu/omero/files/initrc-omero-web.sh

Use update-rc.d to enable start at boot time (only after testing):

  bash$> update-rc.d omero-server defaults
  bash$> update-rc.d omero-web defaults

Packet filter (iptables)

You should configure packet filter (iptables), at least if the server isn't already protected by another firewall. A script can be downloaded from the download page:

  bash$> wget --output-document=/etc/init.d/iptables http://it.bmc.uu.se/andlov/proj/edu/omero/files/omero-server-iptables.sh
  bash$> update-rc.d iptables defaults

Notice: You should review the omero-server-iptables.sh before enable it!

Next step

The next step is to open another terminal and configure your OMERO installation. See the configuration page for more information.