Project

General

Profile

Installation » History » Version 5

Greg Burri, 11/23/2008 02:01 PM

1 1 Greg Burri
h1. Installation
2
3
* This guide is based on a Debian distribution.
4
* The euphorik root directory is "/var/euphorik" (for example)
5
* All line beginning with a '$' is a command line in the *System shell*
6
* All line beginning with a '>' is a command line in the *Erlang shell*
7
* You can start euphorik in development mode with "$cd /var/euphorik/tools ; ./start_yaws.sh"
8
9
# Build Euphorik
10 3 Greg Burri
## <pre>$cd /var/euphorik/modules ; make</pre>
11 1 Greg Burri
# Install Yaws
12
## $apt-get install yaws
13
# Configure Yaws (for production use)
14
## The virtual server looks like that in "/etc/yaws/conf.avail/euphorik.conf".<pre>
15
   ebin_dir = /var/euphorik/modules/ebin
16
   include_dir = /var/euphorik/modules/include
17
   <server localhost>
18
      port = 8081
19
      listen = 0.0.0.0
20
      docroot = /var/euphorik
21
      allowed_scripts = [yaws]
22
      appmods = <request, euphorik_requests>
23
      start_mod = euphorik_daemon
24
   </server>
25
</pre>
26 4 Greg Burri
## Make a symlink in "conf.d" with <pre>$cd /etc/yaws/conf.d/ ; ln -s "/etc/yaws/conf.avail/euphorik.conf"</pre>
27
## Edit the file '/etc/init.d/yaws' and substitue the following line <pre>script="$DAEMON -I $YAWS_ID $@"</pre> by this one <pre>$DAEMON --sname yaws --mnesiadir \"/var/euphorik/BD\" -I $YAWS_ID $@</pre>
28 2 Greg Burri
# Initialize the database
29 1 Greg Burri
## The directory "/var/euphorik/BD" must be writable for the yaws user
30
## Stop Yaws (in root)
31 5 Greg Burri
### <pre>$/etc/init.d/yaws stop</pre>
32 1 Greg Burri
## Launch an Erlang Node
33 5 Greg Burri
### <pre>$cd /var/euphorik/module/ebin</pre>
34 1 Greg Burri
### $erl -sname yaws -mnesia dir /euphorik/var/BD
35 5 Greg Burri
## Load the module : <pre>>l(euphorik_bd_admin).</pre>
36
## Make the DB :<pre>>euphorik_bd_admin:create().</pre>
37
## Start Yaws : <pre>$/etc/init.d/yaws start</pre>