Page 1 of 1

Ubuntu 10.04 LTS (Lucid)

PostPosted: Mon Apr 25, 2011 2:57 pm
by cxallan
Edits:
  • Made sure apt-get update was included the OMERO dependencies step

Java

Add the following two lines to your /etc/apt/sources.list:

Code: Select all
deb http://archive.canonical.com/ubuntu lucid partner
deb-src http://archive.canonical.com/ubuntu lucid partner


Code: Select all
# apt-get update
# apt-get install sun-java6-jdk


Accept the licensing terms.

ZeroC Ice

Code: Select all
# apt-get install zeroc-ice33


PostgreSQL

Install PostgreSQL and create an "omero" database super-user with the default password "omero".

Code: Select all
# apt-get install postgresql-8.4
# sudo -u postgres createuser -P -s omero
could not change directory to "/root"
Enter password for new role:
Enter it again:


OMERO dependencies

Ensure that you have "universe" and "multiverse" enabled in your /etc/apt/sources.list:

Code: Select all
deb http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ lucid main universe multiverse
deb-src http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ lucid main universe multiverse
deb http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ lucid-updates main universe multiverse
deb-src http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ lucid-updates main universe multiverse
deb http://security.ubuntu.com/ubuntu lucid-security main universe multiverse
deb-src http://security.ubuntu.com/ubuntu lucid-security main universe multiverse
deb http://archive.canonical.com/ubuntu lucid partner
deb-src http://archive.canonical.com/ubuntu lucid partner


Code: Select all
# apt-get update
# apt-get install python-imaging mencoder python-numpy python-tables python-matplotlib unzip apache2 libapache2-mod-fastcgi


Create an "omero" user and an OMERO data directory owned by that user:

Code: Select all
# adduser omero
...
# mkdir /OMERO
# chown omero:omero /OMERO


Switch to the "omero" user:

Code: Select all
# sudo -u omero -i


Download and extract the latest OMERO.server bundle:

Code: Select all
$ wget http://hudson.openmicroscopy.org.uk/view/Beta4.2/job/OMERO-Beta4.2/lastSuccessfulBuild/artifact/trunk/target/OMERO.server-Beta-4.2.3-DEV-56b0ba3f.zip
$ unzip OMERO.server*


Perform initial OMERO.server setup:

Code: Select all
$ cd OMERO.server*
$ bin/omero db script
Please enter omero.db.version [OMERO4.2]:
Please enter omero.db.patch [0]:
Please enter password for OMERO root user:
Please re-enter password for OMERO root user:
Saving to /home/omero/OMERO.server-Beta-4.2.3-DEV-56b0ba3f/OMERO4.2__0.sql
$ createdb -O omero omero
$ createlang plpgsql omero
$ psql -h localhost -U omero omero < OMERO4.2__0.sql
Password for user omero:
$ bin/omero admin start
Creating /home/omero/OMERO.server-Beta-4.2.3-DEV-56b0ba3f/var/master
Creating /home/omero/OMERO.server-Beta-4.2.3-DEV-56b0ba3f/var/registry
No descriptor given. Using etc/grid/default.xml
Waiting on startup. Use CTRL-C to exit


OMERO.server will now be available on TCP/4063 and TCP/4064.

Perform OMERO.web setup:

Generate an OMERO.web Apache stanza as the "omero" user:

Code: Select all
# sudo -u omero -i
$ cd OMERO.server*
$ bin/omero web config apache
###
### Stanza for OMERO.web created 2011-04-25 12:02:26.635085
###
FastCGIExternalServer "/home/omero/OMERO.server-Beta-4.2.3-DEV-56b0ba3f/var/omero.fcgi" -host 0.0.0.0:4080

<Directory "/home/omero/OMERO.server-Beta-4.2.3-DEV-56b0ba3f/var">
    Options -Indexes FollowSymLinks
    Order allow,deny
    Allow from all
</Directory>

<Directory "/home/omero/OMERO.server-Beta-4.2.3-DEV-56b0ba3f/lib/python/omeroweb/media">
    Options -Indexes FollowSymLinks
    Order allow,deny
    Allow from all
</Directory>

Alias /appmedia /home/omero/OMERO.server-Beta-4.2.3-DEV-56b0ba3f/lib/python/omeroweb/media
Alias / "/home/omero/OMERO.server-Beta-4.2.3-DEV-56b0ba3f/var/omero.fcgi/"


Insert the OMERO.web Apache stanza in to /etc/apache2/sites-enabled/000-default as the "root" user:

Example complete /etc/apache2/sites-enabled/000-default file:

Code: Select all
# cat /etc/apache2/sites-enabled/000-default
<VirtualHost *:80>
   ServerAdmin webmaster@localhost

   DocumentRoot /var/www
   <Directory />
      Options FollowSymLinks
      AllowOverride None
   </Directory>
   <Directory /var/www/>
      Options Indexes FollowSymLinks MultiViews
      AllowOverride None
      Order allow,deny
      allow from all
   </Directory>

   ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
   <Directory "/usr/lib/cgi-bin">
      AllowOverride None
      Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
      Order allow,deny
      Allow from all
   </Directory>

   ErrorLog /var/log/apache2/error.log

   # Possible values include: debug, info, notice, warn, error, crit,
   # alert, emerg.
   LogLevel warn

   CustomLog /var/log/apache2/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

    ###
    ### Stanza for OMERO.web created 2011-04-25 12:02:26.635085
    ###
    FastCGIExternalServer "/home/omero/OMERO.server-Beta-4.2.3-DEV-56b0ba3f/var/omero.fcgi" -host 0.0.0.0:4080

    <Directory "/home/omero/OMERO.server-Beta-4.2.3-DEV-56b0ba3f/var">
        Options -Indexes FollowSymLinks
        Order allow,deny
        Allow from all
    </Directory>

    <Directory "/home/omero/OMERO.server-Beta-4.2.3-DEV-56b0ba3f/lib/python/omeroweb/media">
        Options -Indexes FollowSymLinks
        Order allow,deny
        Allow from all
    </Directory>

    Alias /appmedia /home/omero/OMERO.server-Beta-4.2.3-DEV-56b0ba3f/lib/python/omeroweb/media
    Alias / "/home/omero/OMERO.server-Beta-4.2.3-DEV-56b0ba3f/var/omero.fcgi/"

</VirtualHost>


Restart Apache:

Code: Select all
# /etc/init.d/apache2 restart


Perform final OMERO.web configuration as the "omero" user:

Code: Select all
# sudo -u omero -i
$ cd OMERO.server*
$ bin/omero web syncmedia
$ bin/omero web start
Starting OMERO.web... [OK]


OMERO.web will now be accessible on TCP/80.

Re: Ubuntu 10.04 LTS (Lucid)

PostPosted: Sat Jan 21, 2012 5:19 pm
by ajtravis
Hi,

I've just read your OMERO installation insttuctions for Ubuntu 10.04 LTS (Lucid). I installed the OMERO clients and server on the same machine under Bio-Linux 6 (based on 64-bit Ubuntu 10.04 LTS) following the instructions at:

http://www.openmicroscopy.org/site/support/omero4/server/debianwalkthrough

Although there isn't a well-defined policy about where to install applications under Linux, I think it might be a better idea to install OMERO in /opt instead of ~/omero or /home/omero because according to the FHS this is where 'add-on' application software packages should be installed:

http://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html#OPTADDONAPPLICATIONSOFTWAREPACKAGES

I used symbolic links to point to the specific versions installed:
Code: Select all
ajt@beluga[ajt] ls -l /opt/OMERO
total 8
lrwxrwxrwx  1 root root   29 2012-01-21 13:15 OMERO.clients -> OMERO.clients-Beta4.3.3.linux
drwxr-xr-x  5 ajt  ajt  4096 2012-01-21 15:37 OMERO.clients-Beta4.3.3.linux
lrwxrwxrwx  1 root root   23 2012-01-21 12:49 OMERO.server -> OMERO.server-Beta-4.3.3
drwxr-xr-x 10 ajt  ajt  4096 2012-01-21 12:52 OMERO.server-Beta-4.3.3

I also changed the environment variables to include OMERO_CLIENTS
Code: Select all
ajt@beluga[ajt] cat /etc/profile.d/ome.sh
# @(#)ome.sh  2012-01-21  A.J.Travis

#
# Open Microscopy Environment
#

export JAVA_HOME=/usr/lib/jvm/java-6-sun
export ICE_HOME=/usr/bin
export POSTGRES_HOME=/usr/lib/postgresql/8.4
export OMERO=/opt/OMERO
export OMERO_HOME=$OMERO/OMERO.server
export OMERO_CLIENTS=$OMERO/OMERO.clients
export PATH=$PATH:$JAVA_HOME/bin:$ICE_HOME:$POSTGRES_HOME/bin:$OMERO_HOME/bin
export PYTHONPATH=/usr/lib/pymodules/python2.6:$PYTHONPATH
export LD_LIBRARY_PATH=/usr/share/java:/usr/lib:$LD_LIBRARY_PATH

I also think that the default of /OMERO for the binary data store might be better placed in /home, which is typically a large partition, as suggested in the install guide.

I modified the client start-up scripts so that they work properly under Linux even if they are not started in the directory containing the jar's e.g. when clicked as Desktop icons or from the command-line in another directory (needs OMERO_CLIENTS to be set).
Code: Select all
--- OMEROeditor_unix.sh   2012-01-21 17:12:58.618022249 +0000
+++ old/OMEROeditor_unix.sh   2011-10-18 14:04:16.000000000 +0100
@@ -24,5 +24,4 @@
# -Xms or "max" -Xmx memory size. More information about these command line
# switches may be found by running "java -X"

-cd $OMERO_CLIENTS
-exec java -Xms128000000 -Xmx256000000 -jar omero.insight.jar containerEditor.xml
+java -Xms128000000 -Xmx256000000 -jar omero.insight.jar containerEditor.xml

--- OMEROinsight_unix.sh   2012-01-21 15:29:11.536800933 +0000
+++ old/OMEROinsight_unix.sh   2011-10-18 14:04:16.000000000 +0100
@@ -24,5 +24,4 @@
# -Xms or "max" -Xmx memory size. More information about these command line
# switches may be found by running "java -X"

-cd $OMERO_CLIENTS
-exec java -Xms128000000 -Xmx256000000 -jar omero.insight.jar
+java -Xms128000000 -Xmx256000000 -jar omero.insight.jar


What do you think about packaging OMERO for Debian-Med/Bio-Linux?

Tony.

Re: Ubuntu 10.04 LTS (Lucid)

PostPosted: Mon Jan 23, 2012 9:06 am
by jmoore
ajtravis wrote:Although there isn't a well-defined policy about where to install applications under Linux, I think it might be a better idea to install OMERO in /opt instead of ~/omero or /home/omero because according to the FHS this is where 'add-on' application software packages should be installed:
...


Hi Tony,

I've linked your suggestions under https://trac.openmicroscopy.org.uk/ome/ticket/7871 for consideration. Thanks!

What do you think about packaging OMERO for Debian-Med/Bio-Linux?


We'd certainly be in favor of having it packaged, but we'd need community support. I recently corresponded briefly with Ankur Sinha, who worked on http://fedoraproject.org/wiki/SIGs/FedoraMedical, as a part of GSoC. He unfortunately couldn't get to OMERO before his term was complete, but said that there may be some interest left in the SIG.

If there's anything we can to do make this happen, let us know.
~Josh.

Re: Ubuntu 10.04 LTS (Lucid)

PostPosted: Sun Jan 29, 2012 3:25 pm
by ajtravis
Hi, Josh.

I'm at the Debian-Med sprint in Southport just now (27-30 Jan 2012) with Andreas Tille <tille@debian.org> who asks if you can archive a source tarball from the git repository each time you make a binary release. That would make it a lot easier to automatically track changes in the Debian build system because we could watch your website for the appearance of new upstream source tarballs. We've cloned your git repository and checked out and archived v.4.3.4:
Code: Select all
git checkout v.4.3.4
git archive -o ../ome-4.3.4.tar --format=tar v.4.3.4

Would you be willing to do something similar each time you release a version and make it available on your OMERO download site?

Thanks,

Tony <ajt@minke.ukfsn.org>

Re: Ubuntu 10.04 LTS (Lucid)

PostPosted: Mon Jan 30, 2012 7:46 am
by jmoore
Hi Tony and Andreas,

Would you be willing to do something similar each time you release a version and make it available on your OMERO download site?


Sure. We have the source downloads available on the Jenkins server, for example OMERO.source-dbcbce5a-b4.zip, which we can certainly copy over. Do they need to follow a particular naming pattern for you to be able to automatically track them? Would the downloads from https://github.com/openmicroscopy/openmicroscopy/tags help in any way?

Cheers,
~Josh

Re: Ubuntu 10.04 LTS (Lucid)

PostPosted: Mon Jan 30, 2012 3:29 pm
by ajtravis
Hi, Josh.

Thanks, I've replied by email.

Tony. <ajt@minke.ukfsn.org>

Re: Ubuntu 10.04 LTS (Lucid)

PostPosted: Tue May 15, 2012 1:29 am
by dsudar
All,
For those (like me) who run into the problem that the Sun/Oracle JDK (Java package) sun-java6-jdk is no longer available on the Ubuntu partner repository, here the steps to get the correct JDK anyway.
Note that this replaces the "# apt-get install sun-java6-jdk" step in cxallan's original message in this topic.

Download the appropriate JDK version 6 from Oracle on: http://www.oracle.com/technetwork/java/ ... 94644.html - make sure to select the .bin version and download to your regular home directory

chmod u+x jdk-6u*.bin
./jdk-6u*.bin
sudo mv jdk1.6.0_* /usr/lib/jvm/
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.6.0_*/bin/java" 1
sudo update-alternatives --config java

and select the just installed jdk as the one you want to use.

Other than the above, the "recipe" by cxallan works fine on Ubuntu 10.04 LTS.

Good luck,
- Damir