1、安装 OpenSSL
YAWS是在“Linux”下安装的,运行也必须同样。
> cd d:/erl5.6.6/yaws/bin
> ./yaws -i
屏幕信息表示,Erlang 启动了,但很快失败,原因是没有发现加密(crypto)模块。
下载安装 http://www.wotnet.com/openssl/vcredist_x86.exe
这是安装运行 OpenSSL 所需要的。
下载安装 http://www.wotnet.com/openssl/Win32OpenSSL_Light-0_9_8i.exe
验证是否安装成功:
启动Erlang后,1> crypto:start(). 显示:{ok},安装成功。
2、启动YAWS
> cd d:/erl5.6.6/yaws/bin
> ./yaws -i
屏显:
Eshell V5.6.5 (abort with ^G)
1>
=INFO REPORT==== 20-Jan-2009::04:27:44 ===
Yaws: Using config file d:/cygwin/home/lawme/yaws.conf
1> yaws:mnesia not in yaws.conf
1> yaws:Add path "d:/erl5.6.5/yaws/var/yaws/ebin"
1> yaws:Add path "d:/erlang/yaws/yaws-1.77/examples/ebin"
1> yaws:Add path "d:/erl5.6.5/yaws/lib/yaws/examples/ebin"
1> yaws:Running with id=default (localinstall=false)
Running with debug checks turned on (slower server)
Logging to directory "d:/cygwin/home/lawme/yaws_logs"
1>
=INFO REPORT==== 20-Jan-2009::04:27:44 ===
Ctlfile : c:/DOCUME~1/lawme/LOCALS~1/Temp/yaws/default/CTL
1>
=INFO REPORT==== 20-Jan-2009::04:27:44 ===
Yaws: Listening to 0.0.0.0:8000 for servers
- http://lawme-20194310169:8000 under d:/erlang/yaws/yaws-1.77/www
- http://localhost:8000 under d:/tmp
1>
3、验证YAWS运行状况
打开浏览器,地址栏:http://lawme-20194310169:8000
YAWS 网页显现。是个不错的开端。