This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo mkdir /opt/erlang | |
sudo chown sam:sam -R /opt/erlang |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo mkdir -p /opt/erlang | |
$ sudo chown sam:sam -R /opt/erlang |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cd /opt/erlang | |
$ wget http://www.erlang.org/download/otp_src_R14B02.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ tar -xzvf otp_src_R14B02.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mkdir R14B02 | |
$ cd otp_src_R14B02 | |
$ ./configure --prefix=/opt/erlang/R14B02 | |
$ make ; make instal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cd /opt/erlang | |
$ ln -s /opt/erlang/R14B02 current |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ export ERL_HOME=/opt/erlang/current | |
$ export PATH=$ERL_HOME/bin:$PATH | |
$ export LD_LIBRARY_PATH=$ERL_HOME/lib:$LD_LIBRARY_PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export ERL_HOME=/opt/erlang/current | |
export PATH=$ERL_HOME/bin:$PATH | |
export LD_LIBRARY_PATH=$ERL_HOME/lib:$LD_LIBRARY_PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(fact). % This is the file 'fact.erl', the module and the filename MUST match | |
-export([fac/1]). % This exports the function 'fac' of arity 1 (1 parameter, no type, no name) | |
fac(0) -> 1; % If 0, then return 1, otherwise (note the semicolon ; meaning 'else') | |
fac(N) when N > 0, is_integer(N) -> N * fac(N-1). | |
% Recursively determine, then return the result | |
% (note the period . meaning 'endif' or 'function end') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
daemonize yes | |
pidfile /var/run/redis/redis-server.pid | |
port 6379 | |
bind 0.0.0.0 | |
timeout 0 | |
loglevel notice | |
logfile /var/log/redis/redis-server.log | |
databases 16 | |
save 900 1 | |
save 300 10 |
OlderNewer