Installation
How to install Zotonic.
These instructions are for the most recently released version of zotonic: 0.7.0. For installation instructions for older versions, click here.
The following software needs to be installed:
- Erlang R14B03 or newer. use a package (see platform-specific notes below) or build it from source. Be sure to install the SSL version (configure --with-ssl).
- ImageMagick 'convert' and 'identify' tools (also install libjpeg, -tiff, -png and other required libraries). Make sure that the convert and identify tools are in your path so that Zotonic can find them. For auto-rotation to work you'll need the "exif" utility as well.
- PostgreSQL (preferably 8.4 or newer).
- The Zotonic source code, downloaded from Google code or cloned from Git.
Steps to install Zotonic
Type "make" in the root of Zotonic source folder (there where the Makefile is located). For FreeBSD, check the platform notes.
cd /path/to/zotonic make
Create an user and database in PostgreSQL:
CREATE USER zotonic WITH PASSWORD 'yourdbpassword'; CREATE DATABASE zotonic WITH OWNER = zotonic ENCODING = 'UTF8'; GRANT ALL ON DATABASE zotonic TO zotonic; \c zotonic CREATE LANGUAGE "plpgsql";
Create a new zotonic site, based on the "blog" skeleton site:
bin/zotonic addsite -s blog yoursite
This will add a site named yoursite. Its default URL will be http://yoursite:8000/ so either put 'yoursite' in your hosts file or change the {hostname} section of the config file.
Edit the generated file priv/sites/yoursite/config, to make sure your database credentials and the hostname are correct, and change the password for the admin. Also make sure that the directory "priv/sites/yoursite/files" and all its subdirectories are readable and writeable for the current user. (Which is the user Zotonic will run under.)
Now, start zotonic in debug mode:
./start.sh
You see Zotonic starting up, lots of messages pass by, and Zotonic will install the initial database. When something goes wrong here, then it is almost always a problem with the database connection. Check your database configuration in the config file.
Point your browser to http://localhost:8000/ or logon as admin (no password) at: http://localhost:8000/admin/. The username of the admin user is "admin", the default password is 'admin' (which is stated in the priv/sites/yoursite/config file).
When all done, then you can stop the erlang shell with:
q().
Operating system specific notes
Mac OS X
With MacPorts you can install Erlang and ImageMagick using the following commands:
sudo port install erlang +ssl sudo port install ImageMagick
EnterpriseDB has an excellent PostgreSQL installer available at http://www.enterprisedb.com/products/pgdownload.do#osx
For a very basic step-by-step installation on OSX, chick this http://timbenniks.nl/blog/712/step-by-step-guide-to-install-zotonic-on-osx.
FreeBSD
If you're running on FreeBSD, make sure you've got the 'GNU' 'make' (check with 'make --version', which should give you GNU, and version info) If you're not running GNU-make as a default, edit the Makefile to run with 'gmake' (make sure gmake is available first).
Ubuntu ( < 12.04)
Ubuntu before 12.04 contains an Erlang version which is too old. Erlang (at least R14B04) should be installed from a custom PPA by running:
sudo add-apt-repository ppa:scattino/ppa
sudo apt-get update
sudo apt-get install erlang-base postgresql imagemagick
Ubuntu: Zotonic PPA
Zotonic itself is packaged as a Debian package. On ubuntu it can be used by using the following commands:
sudo add-apt-repository ppa:arjan-scherpenisse/zotonic
sudo apt-get update
sudo apt-get install zotonic
Archlinux
pacman -S cloog isl
Windows
Currently, Zotonic is not officially supported on the Windows platform. However, the main dependencies Erlang, PostgreSQL and ImageMagick do work on Windows. The Zotonic distribution contains a "build.cmd" batch-file for building Zotonic on Windows, and a "start.cmd" batchfile for starting. The "zotonic" shell command is currently not supported.
This page is part of the Zotonic documentation, which is licensed under the Apache License 2.0.