Difference between revisions of "Installing yaws by source"

From Notes_Wiki
m
m
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<yambe:breadcrumb>Erlang installation</yambe:breadcrumb>
[[Main_Page|Home]] > [[Erlang]] > [[Erlang installation]] > [[Installing yaws by source]]
=Installing yaws by source=


We can install latest version of yaws using source downloaded from http://yaws.hyber.org/  When installing yaws using source, it is possible that latest version of yaws depends upon library functions available only in latest versions of erlang. Hence before yaws is installed from source it is recommended that first latest erlang from source and then install yaws.
We can install latest version of yaws using source downloaded from http://yaws.hyber.org/  When installing yaws using source, it is possible that latest version of yaws depends upon library functions available only in latest versions of erlang. Hence before yaws is installed from source it is recommended that first latest erlang from source and then install yaws.
Line 43: Line 42:




<yambe:breadcrumb>Erlang installation</yambe:breadcrumb>
 
[[Main_Page|Home]] > [[Erlang]] > [[Erlang installation]] > [[Installing yaws by source]]

Latest revision as of 13:47, 7 April 2022

Home > Erlang > Erlang installation > Installing yaws by source

We can install latest version of yaws using source downloaded from http://yaws.hyber.org/ When installing yaws using source, it is possible that latest version of yaws depends upon library functions available only in latest versions of erlang. Hence before yaws is installed from source it is recommended that first latest erlang from source and then install yaws.

Installation of yaws can be done using:

  1. yum -y install pam-devel
  2. Download latest source code
  3. Extract source file using something similar to 'tar xzf yaws-<version>.tar.gz'.
  4. ./configure; make; sudo make install


Testing yaws

Create a yaws.conf file with following lines:

logdir = <path_for_log_folder>
ebin_dir = /usr/local/lib/yaws/ebin
include_dir = /usr/local/lib/yaws/include
# and then a set of servers
<server localhost>
        port = 8888
        listen = 127.0.0.1
        docroot = <path_for_doc_root>
</server>

and start yaws with 'yaws -i' command from folder where yaws.conf file is present.

Sample dynamic page

Following sample dynamic page can be used to test whether yaws is able to serve dymaic pages properly or not:

<html>
<p> First paragraph
<erl>
out(Arg) ->
{html, "<p>This string gets inserted into HTML document dynamically"}.
</erl>
<p> And here is some more HTML code
</html>



Home > Erlang > Erlang installation > Installing yaws by source