Popular just now


Installing Zotonic on Windows

Installing Zotonic CMS on Windows seems relatively easy.

Erlang : This is straight forward using the Erlang windows installer available from erlang.org

Postgresql : postgresql has had an excellent windows installer for quite a long time.

Zotonic : The bash scripts that do the installation on Linux need to be translated into windows bat files or WSH scripts.

@echo off
set erl="C:\Program Files\erl5.7.4\bin\erl.exe"
set erlc="C:\Program Files\erl5.7.4\bin\erlc.exe"
set ebin=ebin deps\mochiweb\ebin deps\erlang-oauth\ebin deps\webmachine\ebin

%erl% +P 10000000 -pa %ebin% -boot start_sasl -s zotonic

Update: Choosing to go with MinGW and using bash for windows instead of re-writing the shell scripts used to install Zotonic on windows. Since the MinGW/MSYS is an open source ongoing and updated project it should be part of a windows install until such time as a one-click installer is created. Install MinGW without choosing a compiler. Install MSYS and it will choose a compiler for you.

cd zotonic
Create a user according to the installation instructions. I recommend just using the PostgresqlAdmin GUI. It easier and you avoid some syntax errors if you are not familiar with Postgresql.
CREATE USER zotonic WITH PASSWORD 'yourdbpassword';
GRANT ALL ON DATABASE zotonic TO zotonic;
Make some changes to the start script path:
cd `dirname $0`
exec erl +P 10000000 +K true -pa $PWD/ebin $PWD/deps/*/ebin -boot start_sasl -s zotonic
Then use command:

c:\zotonic>sh start.sh

Some of the other reasons that I want to do this besides a growing interest in learning the Erlang programming language are:

Zotonic is built on an Erlang framework called web machine and the web server framework Mochiweb. While this is nice it would have been even better if it were built from scratch using Yaws and plain Erlang.

No comments:

Post a Comment