Difference between revisions of "Installing yaws by source"
m |
m |
||
Line 1: | Line 1: | ||
[[Main_Page|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. | 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: | ||
[[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:
- yum -y install pam-devel
- Download latest source code
- Extract source file using something similar to 'tar xzf yaws-<version>.tar.gz'.
- ./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