Installing ZendTo on Ubuntu

The aim of this document is to provide brief notes so that an experienced system administrator can install ZendTo on an existing Ubuntu server. These are notes and not a full HOWTO document.

Install Packages

apt-get install debhelper bison chrpath freetds-dev libcurl4-openssl-dev libedit-dev libgd2-xpm-dev libgmp3-dev libmhash-dev libpam0g-dev libpspell-dev librecode-dev libsasl2-dev libsnmp-dev libsqlite0-dev libt1-dev libtidy-dev re2c unixodbc-dev
apt-get -y install apache2-prefork-dev autoconf automake flex hardening-wrapper libapr1-dev libbz2-dev libdb-dev libenchant-dev libgcrypt11-dev libglib2.0-dev libicu-dev libmysqlclient-dev libpcre3-dev libpq-dev libsqlite3-dev libxmltok1-dev libxml2-dev libxslt1-dev quilt
apt-get -y install clamav clamav-daemon
apt-get -y install php5 php5-cli php5-sqlite php5-ldap php5-imap php-apc
apt-get -y install rrdtool

Build PHP

This only applies to x86_64 (or x64 64-bit) systems, don't do this step on 32-bit x86 systems as you will achieve nothing. PHP as shipped has a limit of 2 Gbytes on the size of any upload, and we need to work round that.

This is already documented here.

Install the .deb Package

Assuming you have downloaded the latest .deb file from the downloads page, install it with

sudo dpkg --install zendto_*.deb

Apache Virtual Host

Setup the secure SSL website if you need it. This is already documented here. Make sure the files ssl.conf, ssl.load and rewrite.load are linked from /etc/apache2/mods-available to /etc/apache2/mods-enabled.

Setup Mail

You need to put your own settings into /etc/postfix/main.cf. The ones you need to change are:

  • myhostname — Your fully qualified hostname
  • mydestination — Put your fully qualified hostname first in the comma-separated list
  • relayhost — Your SMTP server or "smarthost". This must be configured to accept and deliver any mail from your ZendTo server, even if its "From" address is not in your domain

And put only your internet domain name into /etc/mailname. This file must only be 1 line.

Setup Database

ZendTo requires a small back-end database to store all its information. On Ubuntu I strongly recommend you use SQLite as it is a lot simpler to use and requires no configuration at all.

Reboot

And then try starting a web browser and going to http://your.site.here/about.php. That will trigger the creation of all the necessary database tables. Then try the website's home page at http://your.site.here.

If it doesn't work, check your Apache logs in /var/log/apache2.

Add a User

If you have got this far, well done!

Use the scripts in /opt/zendto/bin to add a new local user and list the users. All the scripts in there will show you their command-line syntax if you run them with no command-line parameters.

If you can now log in, you need to go and configure /opt/zendto/config/preferences.php and then /opt/zendto/config/zendto.conf. Those 2 files are pretty well commented and there is more help available.