2011年1月30日 星期日

寫 Erlang, 用 couchDB 與 RabbitMQ, 不怕CPUs不夠用, 只怕上線人太少

(1)透過網頁學 Erlang
http://onlamp.com/pub/a/onlamp/2007/09/13/introduction-to-erlang.html?page=1
(2)買書學 Erlang
"Programming Erlang" (影印版) NTD 320- 出版社: O'Reilly 作者: Francesco Cesarini & Simon Thompson.

(3)安裝 Erlang on your Ubuntu. 10.x
3.1 get source (otp_src_R13B04.tar.gz) from http://www.erlang.org/download.html
3.2 解壓縮至otp_src_R13B04/
3.3 cd otp_src_R13B04
3.4
./configure --enable-bootstrap-only
make
make install

(4) test it. (vi hello)
$ cat hello
#!/usr/bin/env escript

main(_) ->
io:format("Hello World\n").

$ chmod +x hello
$ ./hello
Hello World

(5) Done

1 則留言: