Page Contents


Feature List

Previous topic

OMERO.server Mac OS X installation walk-through with Homebrew

Next topic

OMERO.server binary repository

This Page

OMERO.server Linux walkthrough

This is an example walkthrough for installing OMERO on Linux with Nginx, using a dedicated system user, and should be read in conjunction with OMERO.server installation. You can use this as a guide for setting up your own test server. For production use you should also read the pages listed under Optimizing Server Configuration.

Example shell scripts for installing OMERO on Ubuntu 14.04 are included in-line, and can be downloaded. Separate instructions for installing on CentOS 6 are also available where this differs from the Ubuntu instructions. These instructions assume your Linux distribution is configured with a UTF-8 locale (this is normally the default).

For convenience in this walkthrough the main OMERO configuration options have been defined as environment variables. When following this walkthrough you can either use your own values, or alternatively source the following file:







As root install Ice, Java, Postgres:


apt-get update
apt-get -y install \
	unzip \
	wget \
	python-{imaging,matplotlib,numpy,pip,scipy,tables,virtualenv} \
	openjdk-7-jre-headless \
	ice-services python-zeroc-ice \

service postgresql start

Create an omero system user, and a directory for the OMERO repository:


useradd -m omero
chmod a+X ~omero

mkdir -p "$OMERO_DATA_DIR"
chown omero "$OMERO_DATA_DIR"

Create a database user and initialize a new database for OMERO:


    su - postgres -c psql
su - postgres -c "createdb -E UTF8 -O '$OMERO_DB_USER' '$OMERO_DB_NAME'"

# If you are using PostgreSQL 8.4 you must run:
#su - postgres -c "createlang plpgsql '$OMERO_DB_NAME'"

psql -P pager=off -h localhost -U "$OMERO_DB_USER" -l

Installing OMERO.server

As the omero system user download, unzip and configure OMERO, and create a configuration file for Nginx. The rest of this walkthrough assumes the OMERO.server is installed into the home directory of this user.

Note that this script requires the same environment variables that were set earlier in settings.env, so you may need to copy and/or source this file as the omero user.


set -e -u -x

source settings.env


wget $SERVER
unzip -q `basename $SERVER`
ln -s `basename "${}"` OMERO.server

OMERO.server/bin/omero config set "$OMERO_DATA_DIR"
OMERO.server/bin/omero config set "$OMERO_DB_NAME"
OMERO.server/bin/omero config set omero.db.user "$OMERO_DB_USER"
OMERO.server/bin/omero config set omero.db.pass "$OMERO_DB_PASS"
OMERO.server/bin/omero db script -f OMERO.server/db.sql "" "" "$OMERO_ROOT_PASS"

psql -h localhost -U "$OMERO_DB_USER" "$OMERO_DB_NAME" < OMERO.server/db.sql

OMERO.server/bin/omero web config nginx --system --http "$OMERO_WEB_PORT" > OMERO.server/nginx.conf.tmp

Installing Nginx

As root install Nginx, copy the Nginx OMERO configuration file into the Nginx configuration directory, and disable the default configuration:


apt-get -y install nginx

# See for the nginx config file creation

cp ~omero/OMERO.server/nginx.conf.tmp /etc/nginx/sites-available/omero-web
rm /etc/nginx/sites-enabled/default
ln -s /etc/nginx/sites-available/omero-web /etc/nginx/sites-enabled/

service nginx start

Running OMERO

OMERO should now be set up. To start the server log in as the omero system user, and run:

OMERO.server/bin/omero admin start

To start the OMERO.web client run:

OMERO.server/bin/omero web start

Nginx should already be running, so you should be able to log in as the OMERO root user by going to http://localhost/ in your web browser.

In addition some example init.d scripts are available should you wish to start OMERO and OMERO.web automatically:


cp omero-init.d /etc/init.d/omero
chmod a+x /etc/init.d/omero

cp omero-web-init.d /etc/init.d/omero-web
chmod a+x /etc/init.d/omero-web

update-rc.d -f omero remove
update-rc.d -f omero defaults 98 02
update-rc.d -f omero-web remove
update-rc.d -f omero-web defaults 98 02


If you are running a system with SELinux enabled (for example, it is enabled by default on CentOS6) and are unable to access OMERO.web via Nginx you may need to adjust the security policy:


if [ $(getenforce) != Disabled ]; then
    yum -y install policycoreutils-python
    setsebool -P httpd_read_user_content 1
    setsebool -P httpd_enable_homedirs 1
    semanage port -a -t http_port_t -p tcp 4080