Hello Johann,

----- "Johann Höchtl" <johann.hoec...@gmail.com> wrote:

> Sorry, the last message was not specifiy enough, and I cant't reply to
> 
> myself, so....
> 
> Hello,
> 
> I am completely new to Erlang and -web.
> 
> I would like to use the pre-installed yaws web server on ubuntu 9.10
> (V.
> 1.82) but the install script commes with it's on version.
> 
> In order to keep a 'clean' system, I used to version of yaws from
> ubuntu 
> 8apt-get install yaws).
> 
> The yaws configuration is in /etc/yaws, docroot is /usr/share/yaws and
> 
> yaws itself is in /usr/lib/erlang/lib/yaws-1.82, with /usr/lib/yaws 
> exists but is empty.
> 
> Given this setup, wht makes a sensible setup for a 'systemwide' 
> isntallation of Erlang web, including using a pre-installed version of
> yaws?
> 
> I read 
> http://sourceforge.net/mailarchive/message.php?msg_id=5EDE8C61-35F2-47A5-AEB8-3C191C84EAD5%40kuty.be
> but unfortunaltey that didn't help me.
> 
> Is there a configuration switch which enables the install to re-use
> an
> existing yaws instead the included?
> 
> If not, what should I do to manually set it up?

Basically there are two ways of running Erlang Web: using interactive and
embedded mode. In interactive mode every module is loaded into the VM only
on demand (that is when you call any function from that module or trigger 
the load by invoking code:load(Mod)). In latter - embedded mode - all the
code needed by your release is loaded during the Erlang system start. A list
of modules to load is taken from .app files of the applications you want to
use in your release (and that applications are specified in your .rel file).

If you want to reuse the global yaws installation you should do the following 
things (I'm guessing - I've never done it before):
a) for interactive mode you should modify the bin/start_interactive script's 
last
line and add '-pa PATH_TO_YOUR_YAWS_EBIN_DIR' before '-pa lib/*/ebin'. This will
cause loading Yaws 1.82 code instead of the Erlang Web's bundled one
b) for embedded mode change bin/compile.erl escript and change the make_basic/0 
function to call 'code:add_path(PATH_TO_YOUR_YAWS_EBIN_DIR)' before loading the
other paths

Other way to do this is simply remove the bundled yaws version and link your 
yaws directory into lib folder of Erlang Web. Then change only the top Emakefile
and modify the paths to the linked yaws folder (e.g. by calling something like
"sed -i -e 's/1.85/1.82/g' Emakefile").

Then recompile the code (recreate the release by calling ./bin/compile.erl 
release 
yaws NEW_VSN).

If any more help is needed, do not hesitate to ask.

> 
> Thank you,
> 
>     Johann
> 
> ------------------------------------------------------------------------------
> Join us December 9, 2009 for the Red Hat Virtual Experience,
> a free event focused on virtualization and cloud computing. 
> Attend in-depth sessions from your desk. Your couch. Anywhere.
> http://p.sf.net/sfu/redhat-sfdev2dev
> _______________________________________________
> Erlangweb-users mailing list
> Erlangweb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/erlangweb-users
> http://www.erlang-web.org/

Best regards,
-- 
Michal Ptaszek
www.erlang-consulting.com

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Erlangweb-users mailing list
Erlangweb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlangweb-users
http://www.erlang-web.org/

Reply via email to