Complete setup guide, step-by-step

Updated 8/28/21 for Senaite 2.0

This is the fastest, simplest way to install Senaite LIMS on Ubuntu 18.04 server for development and testing.

We will install Plone 5 and Senaite 2 in the home folder under the local user name. Start here for testing and development.

Get all dependencies and packages needed

$sudo apt-get install virtualenv
$sudo apt-get install python2.7
$sudo apt-get install build-essential gcc python-dev git-core libffi-dev
$sudo apt-get install libpcre3 libpcre3-dev autoconf libtool pkg-config
$sudo apt-get install zlib1g-dev libssl-dev libexpat1-dev libxslt1.1
$sudo apt-get install gnuplot libcairo2 libpango1.0-0 libgdk-pixbuf2.0-0
$sudo apt-get install libxslt-dev python-pil libjpeg-turbo8-dev
$sudo apt-get install git

You may need more packages depending on what is previously installed on your server.

Make a folder for LIMS in your home directory:
$mkdir ~/LIMS

Create a python 2.7 virtual environment then activate it
$virtualenv --python=/usr/bin/python2.7 --no-site-packages ~/LIMS
$cd ~/LIMS
$source bin/activate

Clone Senaite LIMS verson 2.0 from GitHub:

$git clone https://github.com/senaite/senaite.lims.git
$cd senaite.lims

Make sure you have PIP and wheel installed. zc.buildout and setuptools
$pip install wheel
$pip install zc.buildout==2.13.4
$pip install setuptools==44.1.1

Download bootstrap.py to your senaite.lims directory, then bootstrap for zc.buildout:

$wget https://github.com/senaite/senaite.lims/blob/1.x/bootstrap.py

$python bootstrap.py

Open buildout.cfg with your favorite text editor and change the pinned version of zc.buildout to the version you have in this virtual environment (zc.buildout = 2.13.4). That’s at the bottom in [versions] section. You may also choose to change the default admin password now. Find the section
plone-user = admin:admin
And change to
admin:YourAdministratorPassword

Save any changes to buildout.cfg.

OK, Here is the big moment. Time for buildout.
From your senaite.lims directory

$bin/buildout

This will take a while. There will be some warnings and plenty of messages for the buildout log. Hopefully no errors. If you get errors then post them here and the community will help diagnose problem.

If this completes without error then your ready to start working on Senaite LIMS.

Start the instance in foreground
$bin/instance fg

Wait for Zope/Plone/Senaite to start up and listen on port 8080 (or other port you set in buildout.cfg). Initialization will take a couple of minutes. Watch for error messages. Watch for listening and ready to take requests.

If all goes well, open a web browser on same machine and go to URL localhost:8080

Follow Senaite LIMS instructions for configuration.

3 Likes

For components like senaite.health and senaite.instruments, add them to your buildout.cfg file in the eggs section. There’s an example senaite.health buildout file here:

Please help! The following error occurred during setup.
$ python bootstrap.py
File “bootstrap.py”, line 7

^
SyntaxError: invalid syntax

Which boostrap.py are you using?
https://github.com/senaite/senaite.lims/blob/1.x/bootstrap.py

Line 7 of this bootstrap.py is a comment line.
Also, confirm you have zc.buildout installed before running bootstrap.py

I’m sure it works as you say, but it still prompts the same error. Also found that I ignore this step to operate senaite LIMS seems to be able to run

I’m sure it works as you say but it still prompts the same error.Can you provide your bootstrap.py?

I’ve had the same issue as @wits.


The resolution of this is below

It appears as if the wget command has downloaded an HTML file in stead of the actual bootstrap.py file. If I enter the url (https://github.com/senaite/senaite.lims/blob/1.x/bootstrap.py) into a browser I can get to the file, but I think we need to specify the raw url. Will try that now.

I got it working removing the created html (or html-like) file:
$rm bootstrap.py
(Obviously not necessary if you haven’t run the wget command yet).
Downloaded the raw bootstrap.py file from github:

$wget https://raw.githubusercontent.com/senaite/senaite.lims/1.x/bootstrap.py

Then run your command:
$python bootstrap.py

2 Likes

@dietervdwes I tried to pass. Thanks for sharing!

Thanks for sharing that great guide, which I followed for a successful installation of senaite 2.

I would ask about senaite.health current state. Is it already supported by senaite 2 or still in development state ?

If it is supported, any guide for adding this addon will be helpful. The current GitHub instructions are for senaite 1.x

Hi @m3mo3_83, I do not think SENAITE Health is going to be implemented in 2.x, there are some addons for 2.x that already complement the health entities such as patients, etc

Hi @Jeff-DFWEnv I’m having trouble trying to run $python bootstrap.py, the error that it’s regarding zc.buildout:


What could be the problem ?

Some problem with the bootstrap.py file.
The previous release of Senaite 1.3 included a bootstrap.py but this version 2 does not. I borrowed the bootstrap.py file from version 1.3. I may have made a modification in mine, I can’t remember. Let me take a look and also ask the folks in lobby if they can include a bootstrap.py with version 2.0.

I got it working removing the created html (or html-like) file:
$rm bootstrap.py
(Obviously not necessary if you haven’t run the wget command yet).
Downloaded the raw bootstrap.py file from github:

$wget https://raw.githubusercontent.com/senaite/senaite.lims/1.x/bootstrap.py

Then run your command:
$python bootstrap.py

Hello!
I use your instruction for installation Senaite LIMS, and when i go to step “Start the instance in foreground bin/instance fg”, i have a error:


How to fix it?
Linux Ubuntu 18.04.6
Python 2.7
Senaite LIMS 2
Same problem: Installing senaite lims 2.0

@viktor77796, That is a weird error, sorry I don’t really know how to help.
Are you using Linux Ubuntu server, or the gui version?
I managed to install it successfully earlier this year (2022) with this same guide, but used Linux 18 LTS server, without the GUI, not sure if it makes a difference. I’m assuming it shouldn’t but I read somewhere that it may work better, hence tried it and it worked fairly easily. I also failed on the GUI Ubuntu version though. Let us know if you succeed.

Good day!
I used Linux Ubuntu Server 18.04.6 LTS (without GUI) and installed according to the instructions above. Now everything is working. Thanks a lot!

1 Like

Hello,
Someone can help me please?
I can’t understand why I’m stuck, I’m using Ubuntu 18.04.6 LTS
Thank’s

Can you see buildout command in your bin directory?

Unfortunately there isn’t