Project

General

Profile

Actions

Installation » History » Revision 8

« Previous | Revision 8/9 (diff) | Next »
Greg Burri, 11/15/2013 10:43 AM


Installation

  • This guide is based on a Debian distribution.
  • The euphorik root directory is "/var/euphorik" (for example)
  • All line beginning with a '$' is a command line in the System shell
  • All line beginning with a '>' is a command line in the Erlang shell
  • You can start euphorik in development mode with "$cd /var/euphorik/tools ; ./start_yaws.sh"

See node management for more informations about executing commands in a remote shell.

  1. Install Yaws
    1. $apt-get install yaws
  2. Build Euphorik
    1. $cd /var/euphorik/modules ; make
  3. Configure Yaws (for production use)
    1. The virtual server looks like that in "/etc/yaws/conf.avail/euphorik.conf".
         ebin_dir = /var/euphorik/modules/ebin
         include_dir = /var/euphorik/modules/include
         <server localhost>
            port = 8081
            listen = 0.0.0.0
            docroot = /var/euphorik
            allowed_scripts = [yaws]
            appmods = <request, euphorik_requests>
            start_mod = euphorik_daemon
         </server>
      
    2. Make a symlink in "conf.d" with
      $cd /etc/yaws/conf.d/ ; ln -s "/etc/yaws/conf.avail/euphorik.conf"
    3. Edit the file '/etc/init.d/yaws' and substitue the following line
      script="$DAEMON -I $YAWS_ID $@"
      by this one
      $DAEMON --sname yaws --mnesiadir \"/var/euphorik/BD\" -I $YAWS_ID $@
  4. Initialize the database
    1. The directory "/var/euphorik/BD" must be writable for the yaws user
    2. Stop Yaws (in root)
      1. $/etc/init.d/yaws stop
    3. Launch an Erlang Node
      1. $cd /var/euphorik/module/ebin
      2. $erl -sname yaws -mnesia dir /euphorik/var/BD
    4. Load the module :
      >l(euphorik_bd_admin).
    5. Make the DB :
      >euphorik_bd_admin:create().
    6. Start Yaws :
      $/etc/init.d/yaws start

Updated by Greg Burri about 11 years ago · 8 revisions