From Davical
Jump to: navigation, search

-- this is a work in progress

See also Synology_DS211

Installing DAViCal on a Synology NAS

DAViCal runs perfectly on the Synology NAS range using the system's Apache and pgsql services.

There are a number of install issues that need to be worked round:

  • The built in postgres binary tree is missing the language library 'plpgsql'
  • The built in postgres binary tree is missing the binary 'createlang'
  • DAViCal's db creation and scripts needs perl and some perl modules

In order to address the above issues it will be necessary to install a command line, the optware package manager 'ipkg' and the tool chain.

  • Install the tool chain
 ROOT# ipkg install optware-devel 

This command may not complete correctly and end in an error about package wget-ssl clashes with wget. If so, finish the job by:

ROOT# ipkg remove wget
ROOT# cp /usr/syno/bin/wget /opt/bin
ROOT# ipkg install wget-ssl
ROOT# ipkg update
ROOT# ipkg upgrade
ROOT# ipkg install optware-devel

Now you have usable system why not install your favourite editor ( ipkg install emacs :) ) and add a new user and give them sudo ( ipkg install sudo ) powers to avoid nasty accidents.

  • Get plpgsql and createlang
sudo ipkg install postgresql

The optware install is not going to be run we just need those binaries.

mkdir /opt/usr/bin
mkdir /opt/usr/lib
cp /opt/lib/postgresql/ /opt/usr/lib/plpgsql
cp /opt/bin/createlang /opt/usr/bin
ipkg remove postgresql
  • Now tell Postgres where to find plpgsql
su -c "/usr/syno/pgsql/bin/createdb mytemp" admin
su -c "/usr/syno/pgsql/bin/psql" admin
mytemp=# UPDATE  pg_pltemplate SET tmpllibrary = '/opt/usr/lib/plpgsql' WHERE   tmplname = 'plpgsql';
su -c "/usr/syno/pgsql/bin/dropdb mytemp" admin
  • Now install perl and some perl modules
  • Good, now we can follow the standard DAViCal install procedure
su -c "PATH=/opt/usr/bin:/usr/syno/pgsql/bin:$PATH sh ./" admin