Installation » History » Version 3
Greg Burri, 11/23/2008 01:59 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 | ## Make a symlink in "conf.d" with "$cd /etc/yaws/conf.d/ ; ln -s "/etc/yaws/conf.avail/euphorik.conf" |
||
| 27 | ## 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 $@' |
||
| 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 | ### $/etc/init.d/yaws stop |
||
| 32 | ## Launch an Erlang Node |
||
| 33 | ### $cd /var/euphorik/module/ebin |
||
| 34 | ### $erl -sname yaws -mnesia dir /euphorik/var/BD |
||
| 35 | ## Load the module |
||
| 36 | ### >l(euphorik_bd_admin). |
||
| 37 | ## Make the DB |
||
| 38 | ### >euphorik_bd_admin:create(). |
||
| 39 | ## Start Yaws : $/etc/init.d/yaws start |