Project

General

Profile

Installation » History » Version 8

Greg Burri, 11/15/2013 10:43 AM

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 7 Greg Burri
See [[node management]] for more informations about executing commands in a remote shell.
10
11 1 Greg Burri
# Install Yaws
12
## <pre>$apt-get install yaws</pre>
13 8 Greg Burri
# Build Euphorik
14
## <pre>$cd /var/euphorik/modules ; make</pre>
15 1 Greg Burri
# Configure Yaws (for production use)
16
## The virtual server looks like that in "/etc/yaws/conf.avail/euphorik.conf".<pre>
17
   ebin_dir = /var/euphorik/modules/ebin
18
   include_dir = /var/euphorik/modules/include
19
   <server localhost>
20
      port = 8081
21
      listen = 0.0.0.0
22
      docroot = /var/euphorik
23
      allowed_scripts = [yaws]
24
      appmods = <request, euphorik_requests>
25
      start_mod = euphorik_daemon
26
   </server>
27
</pre>
28 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>
29
## 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>
30 2 Greg Burri
# Initialize the database
31 1 Greg Burri
## The directory "/var/euphorik/BD" must be writable for the yaws user
32
## Stop Yaws (in root)
33 5 Greg Burri
### <pre>$/etc/init.d/yaws stop</pre>
34 1 Greg Burri
## Launch an Erlang Node
35 5 Greg Burri
### <pre>$cd /var/euphorik/module/ebin</pre>
36 6 Greg Burri
### <pre>$erl -sname yaws -mnesia dir /euphorik/var/BD</pre>
37 5 Greg Burri
## Load the module : <pre>>l(euphorik_bd_admin).</pre>
38
## Make the DB :<pre>>euphorik_bd_admin:create().</pre>
39
## Start Yaws : <pre>$/etc/init.d/yaws start</pre>