Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
OMERO cheat sheet

Update root password

omero db password
Please enter password for OMERO root user: 
Please re-enter password for OMERO root user: 
UPDATE password SET hash = 'ibTzrADXfsKFfNwBdQsa+g==' WHERE experimenter_id  = 0;

Check password hash

psql -h localhost omdbprim -U omdbusr1 -c " select * from password"
Password for user omdbusr1: 
experimenter_id |           hash           | changed 
-----------------+--------------------------+---------
               0 | kO7cztnXqU33M8Hk5kr6DQ== | 
               1 |                          |

Update password hash

psql -h localhost omdbprim -U omdbusr1 -c "UPDATE password SET hash = 'ibTzrADXfsKFfNwBdQsa+g==' WHERE experimenter_id  = 0;"

Error messages

  • ImportError: No module named pipeline

Turn off IPv6

OMERO.server/bin/omero config set Ice.IPv6 0

Generate nginx config file

OMERO.py/bin/omero web config nginx

Upgrade Instructions 5.2 --> 5.4

#send the database
root@old-omero:~# pg_dump -h localhost -U databaseuser -Fc -f omero.postgresql.before_upgrade.db.dump databasename
root@old-omero:~# rsync -azv omero.postgresql.before_upgrade.db.dump omero-server-address:~

# sync the binary data store, the path is different on the new installation
root@old-omero:/BMC-OMERO# rsync -avz ./ root@omero-server-address:/OMERO/

# I could have used the same database, but I create a new empty one on omero
root@omero:~# export OMERO_DB_USER="databaseuser" 
root@omero:~# export OMERO_DB_NAME=databasename
root@omero:~# su - postgres -c "createdb -E UTF8 -O '$OMERO_DB_USER' '$OMERO_DB_NAME'"

# didn't know how to import data to postgresql as root at this point, so switched to user postgres
root@omero:~# cp omero.postgresql.before_upgrade.db.dump /var/lib/postgresql/.
root@omero:~# su - postgres
postgres@omero:~$ pg_restore -Fc -d databasename omero.postgresql.before_upgrade.db.dump

# changed settings
omero@omero:~$ OMERO.server/bin/omero config edit

# Edit your preferences below. Comments are ignored
omero.config.version=5.1.0
omero.data.dir=/OMERO
omero.db.name=databasename
omero.db.pass=databasepassword
omero.db.user=databaseuser
omero.web.application_server=wsgi-tcp

# save and exit

# pre check for 5.3, went well
omero@omero:~$ psql -h localhost -U databaseuser databasename < OMERO.server/sql/psql/OMERO5.3__0/OMERO5.2__0-precheck.sql
# upgrade to 5.3
omero@omero:~$ psql -h localhost -U databaseuser databasename < OMERO.server/sql/psql/OMERO5.3__0/OMERO5.2__0.sql 

# pre check for 5.4, went well
omero@omero:~$ psql -h localhost -U databaseuser databasename < OMERO.server/sql/psql/OMERO5.4__0/OMERO5.3__0-precheck.sql

# upgrade to 5.4
omero@omero:~$ psql -h localhost -U databaseuser databasename < OMERO.server/sql/psql/OMERO5.4__0/OMERO5.3__0.sql 

# check that all files under /OMERO is owned by user omero, should give no output, which it didn't:
root@omero:/OMERO# find . \! -user omero -print

# then starts the omero and omero-web services

Important links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment