-
Notifications
You must be signed in to change notification settings - Fork 1
Getting started
As with any complex piece of software, getting postlock’s dependencies working can be a daunting task for novices. If you want to try out postlock as quickly as possible, download the virtualbox image. If you want to install postlock natively, please read the corresponding section of this guide. Please contribute installation instructions for other operating systems if you can!
There is a virtualbox image with ubuntu 10.10 and postlock pre-installed. The image can be downloaded from 1fichier.com. Please check the md5 of the image against this checksum before use. The archive can be uncompressed with 7zip.
sudo apt-get install git erlang
mkdir ~/git; cd ~/git; git clone git://github.com/postlock/postlock.git
First, we need to download yaws (the version packaged with ubuntu 10.10 is obsolete).
cd ~/Downloads
wget http://yaws.hyber.org/download/yaws-1.89.tar.gz
tar -zxvf yaws-1.89.tar.gz; cd yaws-1.89
Second, we need to configure and install yaws from source
./configure --prefix=/home/postlock/opt --localstatedir=/home/postlock/opt/var --sysconfdir=/home/postlock/opt/etc --disable-pam; make; make install
There is a module for yaws called yapp, which we also need. To install yapp, run:
cd applications/yapp;make;make install
The yaws configuration lives in /home/postlock/opt/etc/yaws
or whatever you passed to the configure script as sysconfdir.
Replace yaws.conf with this.
Start yaws with
erl -sname s -pa /home/postlock/opt/lib/yaws/ebin/ -boot start_sasl -run mnesia start -run yaws -conf ~/opt/etc/yaws/yaws.conf
Then, stop mensia:
mnesia:stop().
Create the mnesia schema:
mnesia:create_schema([node()]).
Finally, close erlang by hitting Control-C twice.
Currently, postlock uses erlang's built in Emake utility.
Before you can begin building, update the Emakefiles in postlock/postlock_server/src
to
point to the yaws include dir (opt/lib/yaws/include
). Once complete, it's just a matter of
cd ~/git/postlock/postlock_server/src; erl -make
cd ~/git/postlock/applications/postlock_test/src; erl -make
Restart erlang using the command we used when setting up mnesia.
Go to http://localhost:8081/yapp/
and add the postlock_test
application (leave the path blank).
Please expand this section if you can! The steps are:
- Install erlang, yaws (version >= 1.89) and msysgit. Download and unzip unxutils. If you dont have the openssl libraries installed yet, then install them also.
- Update your PATH to include the erlang binaries in System properites - advanced - environment variables (the path is something like c:\program files\erl5.8.3\bin).
- Start git-bash as administrator (right-click on the git icon and select run as administrator) and issue the following commands:
cd "/c/Program Files/Yaws-1.89/applications/yapp/src"
"c:\Users\neu\opt\UnxUtils\usr\local\wbin\make.exe"
Correct the commands to reflect your yaws and unxutils directories respectively. The quotes are important.
4. Create a folder for postlock data (eg: c:\Users\neu\Documents\postlock-data
).
3. Update yaws.conf (you can modify the linux version).
4. Start erlang, stop mnesia, create mnesia schema (as described in the linux part of this guide).
5. Build postlock
6. Restart yaws.
Visit http://localhost:8081/postlock_test/
with any websocket-capable browser.