You are here: Home / Download & Demo / Quick Install under Ubuntu 16.04

Quick Install under Ubuntu 16.04

  • Install Ubuntu 16.04
  • Install following packages:


apt-get install \
        libsasl2-dev python-dev libldap2-dev libssl-dev python-ldap python-pil \
        gettext git python-gobject-dev python-tz postgresql libreoffice libjpeg62 libjpeg62-dev\
        python-psycopg2 apache2 vnc4server python-pilkit python-reportlab python-matplotlib \
        gpm python3-pypdf2
  • Download WSDB-Install.tgz ..... and extract it unter /
  • Create user
adduser --home=/data/zope --no-create-home zope
  • Create database
sudo pg_dropcluster --stop 9.5 main
sudo pg_createcluster --locale de_AT.UTF-8 --start 9.5 main
su - postgres
createuser wsdb
createdb wsdb
psql wsdb <  wsdb.dump
# pg_hba.conf anpassen
cp ./templates/pg_hba.conf /etc/postgresql/9.5/main/
  • Configuring Apache
a2enmod rewrite
service apache2 restart
a2enmod proxy
service apache2 restart
a2enmod proxy_http
service apache2 restart
cp ./templates/admin.wsdb.conf /etc/apache2/sites-available/
a2ensite admin.wsdb.conf
service apache2 reload
  • Configuring Systemd 
cp ./templates/wsdb-libreoffice.service /etc/systemd/system/
cp ./templates/wsdb-zope.service /etc/systemd/system/

systemctl enable wsdb-libreoffice.service
systemctl enable wsdb-zope.service
systemctl start wsdb-zope.service
systemctl start wsdb-libreoffice.service

ln -s /data/zope/wsdb/bin/zopectl /etc/init.d/wsdb_zope
update-rc.d wsdb_zope defaults
ln -s /data/zope/wsdb/bin/libreoffice_server /etc/init.d/wsdb_libreoffice
update-rc.d wsdb_libreoffice defaults
  • Create log directories
echo "Log Verzeichnisse anlegen"
mkdir /var/log/zope2.10/
mkdir /var/log/zope2.10/wsdb
chown -R zope:zope /var/log/zope2.10/
  • Set rights
echo "Rechte setzen konfigurieren"
chown -R zope:zope /data/zope/
  • Restart Zope
echo "WSDB starten"
service wsdb-zope restart
  • Zope-Managment-Interface

In Zope you have to export the gettext utf8 by creating your own gettext python script:

        translated_str = context.gettext_catalog(str_to_translate).encode('utf-8')

        return translated_str

Attention: View Anonymous for login window!!!

Delete WSDB/db_ws and create them again with the same settings 

Then you also have to free the py_search script from utf8 encoding, otherwise there are errors with umlauts

  • XMLRPC-Script

Now we continue with the xmlrpc_server script

change first with 2to3:

2to3 -w

then change the tabs:

/data/zope/bin/python /data/src/Python-2.4.5/Tools/scripts/
remove all utf8 encoding and decoding from xmlrpc_server skript

remove import string - this is deprecated

Insert special characters directly Euro and square

in the method replace create_watermark file(...) with open(...) - not supported in Python3

Error logging inserted (see example in xmlrpc_server - class list)

Decoding must be changed on the sever side:

    def decode(self, code):
        if code == None or code == '':
            return None
        dump = binascii.a2b_base64(code)
        return pickle.loads(dump, encoding='utf-8')

if not, then TypeError: 'str' object is not callable

ToDo: Go through all functions and integrade Loggin - see as template:

    def create_adressliste_klasse(self, parameter):
            return self.create_adressliste_klasse_exc(parameter)
        except Exception as e:
            log.error("exception: %s", e)
            log.error("%s", traceback.format_exc())
            log.error("%s", sys.exc_info()[0])
            return False

Simply rename the function in ..._exc and insert a new function (see above oben)

  • Install Reportlab
 apt-get install python-reportlab

and copy over all other required site packages (e.g. ldap)

  • Install Numpy 1.0.4 (must be recomplied) / Matplotlib???
 /data/zope# mkdir .matplotlib
/data/zope# chown -R zope:zope .matplotlib/

apt-get install python-matplotlib

so that all dependencies are installed. For Bananapi you have to compile /data/src/matplotlib-0.9.2 compillieren (changes are already commented out) - just run build and install.

  • Next Step: Installation on BananaPI with exact Doku???

- Compiling things (python and Extensions)
- Installing packages
- Play an entire Tar over it

  • Start/Stop Script with systemd
 Script aus templates nach /etc/systemd/system kopieren

systemctl daemon-reload
systemctl start
systemctl status plone.service
 systemctl enable

  • DNS entries and prepare Gateway for access from outsite
  • Set up CUPS

Backup the printer drivers from the old system:


Copy all files to local computer
Open Cups on the old system

 ssh root@x-wsdb -L 9999:localhost:631

Under "Printers" you can see all printers that have been set up

On the new system:
Install CUPS

 apt install cups
apt-get install cups-bsd
ssh root@fwl-wsdb01 -L 8888:localhost:631


Now for every printer needed on the new system (https://localhost:8888):
Administration -> Add printer
Printers will probably already be displayed then.
Select printer, set the name as in the old system.
In the next step where the manufacturer and model are to be selected and select the item "Provide a PPD file" and use "Browse" to select the respective PPD file form the old system.
Add printer.
Compare printer settings with the old system, but they should all have been automatically adopted by the PPD.

  • Store all used fonts under /usr/share/fonts
  • in the postgresql.conf increase the following values
    shared_buffers = 256MB
    max_locks_per_transaction = 128
    max_pred_locks_per_transaction = 128

    and also autovacuum = on
  • Crontab entries for DB-Dump:
vi /etc/crontab:

15 19 * * *     root    vacuumdb -zq -U postgres wsdb
00 * * * *      root    pg_dumpall -U postgres >/data/backup/dbdump.`date +\%H`.sql
00 03 * * *     root    rm /data/zope/wsdb/zeugnismuster/* > /dev/null 2>&1
00 03 * * *     root    rm /data/zope/wsdb/stundenplaene_pdf/* > /dev/null 2>&1
00 03 * * *     root    rm /data/zope/wsdb/files/adresslisten/* > /dev/null 2>&1
00 03 * * *     root    rm /data/zope/wsdb/files/statistik/* > /dev/null 2>&1
  • Class book using the example of kss
  • kss-apache01:
    Basic directory class book: /opt/usr/WSDB_classbook/

    config.constant('API_URL', 'http://klassenbuch.kssw.local');

        'default': {
            'ENGINE': 'django.db.backends.postgresql_psycopg2',
            'NAME': 'wsdb',
            'USER': 'postgres',
            'PASSWORD': '',
            'HOST': 'kss-wsdb02'
    AUTHENTICATION_URL = ("http://admin.kssw.local/WSDB/klassenbuch_login")

    NFS Mount for pictures:
    kss-wsdb02:/data/zope/wsdb/foto/ /mnt/wsdb_foto/ nfs rw,nolock,noatime,addr= 0 0
    the IP address is the own IP, so from kss-wsdb02

    If not yet configured on the wsdb02 (Attention: Run on the ...-wsdb02!):
    apt-get install nfs-kernel-server

    the IP address is the IP of kss-apache01

    service nfs-kernel-server restart

    Possibly adjust pg_hba.conf for connection to wsdb02 (Class book, Sympa):
    Query the IP address of kss-apache01 with ifconfig (e.g. and enter the range as trust:
    host    all             all              trust

    Then on kss-apache01:
    mount -a
    now on mount a line kss-wsdb02:/data/zope/wsdb/foto/ on /mnt/wsdb_foto ... should be present

    Then still for the changes in the class book:
    service apache2 reload