Installation » History » Revision 6
Revision 5 (Greg Burri, 11/23/2008 02:01 PM) → Revision 6/9 (Greg Burri, 11/23/2008 02:01 PM)
h1. 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" # Build Euphorik ## <pre>$cd /var/euphorik/modules ; make</pre> # Install Yaws ## <pre>$apt-get $apt-get install yaws</pre> yaws # Configure Yaws (for production use) ## The virtual server looks like that in "/etc/yaws/conf.avail/euphorik.conf".<pre> 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> </pre> ## Make a symlink in "conf.d" with <pre>$cd /etc/yaws/conf.d/ ; ln -s "/etc/yaws/conf.avail/euphorik.conf"</pre> ## 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> # Initialize the database ## The directory "/var/euphorik/BD" must be writable for the yaws user ## Stop Yaws (in root) ### <pre>$/etc/init.d/yaws stop</pre> ## Launch an Erlang Node ### <pre>$cd /var/euphorik/module/ebin</pre> ### <pre>$erl $erl -sname yaws -mnesia dir /euphorik/var/BD</pre> /euphorik/var/BD ## Load the module : <pre>>l(euphorik_bd_admin).</pre> ## Make the DB :<pre>>euphorik_bd_admin:create().</pre> ## Start Yaws : <pre>$/etc/init.d/yaws start</pre>