OMERO.web installation with OMERO.server on CentOS 7 and IcePy 3.6

Please first read OMERO.server installation on CentOS 7.

This is an example walkthrough for installing OMERO.web with OMERO.server using NGINX. For convenience in this walkthrough, we will use the same configuration options that are used for the installation of the OMERO.server and an additional option specific to the OMERO.web installation. When following this walkthrough you can either use your own values, or alternatively source settings-web.env:

WEBPORT=80

export WEBPORT

Installing prerequisites

The following steps are run as root.

Install Pillow and Numpy:

yum -y install python-pillow numpy

Install NGINX:

yum -y install nginx

Configuring OMERO.web

The following steps are run as the omero system user.

Install other OMERO.web dependencies using pip:

pip install -r OMERO.server/share/web/requirements-py27.txt

Configure and create the NGINX OMERO configuration file:

OMERO.server/bin/omero config set omero.web.application_server wsgi-tcp
OMERO.server/bin/omero web config nginx --http "$WEBPORT" > OMERO.server/nginx.conf.tmp

For more customization, please read Customizing your OMERO.web installation.

Configuring NGINX

The following steps are run as root.

Copy the generated configuration file into the NGINX configuration directory, disable the default configuration and start NGINX:

sed -i.bak -re 's/( default_server.*)/; #\1/' /etc/nginx/nginx.conf

cp OMERO.server/nginx.conf.tmp /etc/nginx/conf.d/omero-web.conf

systemctl enable nginx

systemctl start nginx

Running OMERO.web

The following steps are run as the omero system user.

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 omero-web-systemd.service is available should you wish to start OMERO.web automatically.

Regular tasks

The following steps are run as root.

The default OMERO.web session handler uses temporary files to store sessions which should be deleted at regular intervals, for instance by creating a cron job:

OMERO_USER=omero
OMERO_SERVER=/home/omero/OMERO.server
su - ${OMERO_USER} -c "${OMERO_SERVER}/bin/omero web clearsessions"

Copy this script into the appropriate location:

cp omero-web-cron /etc/cron.daily/omero-web
chmod a+x /etc/cron.daily/omero-web

Maintenance

The steps are run as the omero system user.

Please read OMERO.web maintenance.

SELinux

The following steps are run as root.

If you are running a system with SELinux enabled and are unable to access OMERO.web 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
fi