Erlang is now part of the Fedora and Debian/ubuntu software warehouses.
Erlang is currently the latest version of OTP 17.0. Erlang is a programming language for building large, highly scalable, high-availability programming languages for soft real-time systems. It has been used in telecommunications, finance, E-commerce, Internet telephony and instant messaging. Erlang's run-time system has built-in support for concurrency, distribution, and fault tolerance.
OTP is a collection of Erlang libraries and design principles, providing middleware for developing various systems. It includes its own distributed database, interfaces to other programming languages, debugging and publishing processing tools, and so on.
Beam is the virtual machine required for Erlang code execution. The Erlang code is compiled with the extension. Beam. ERTs is the run-time system of Erlang, which includes components such as beam, kernels, and standard libraries.
The official recommendation is to install Erlang from the source code, so start installing OTP 17.0 from the source code below.
Download OTP 17.0 source code: http://www.erlang.org/download/otp_src_17.0.tar.gz
Copy Code code as follows:
# tar zvxf otp_src_17.0.tar.gz
# MV OTP_SRC_17.0/OTP
# CD OTP
#./configure--prefix=/home/erlang--without-javac
Error:
Copy Code code as follows:
Configure:error:No Curses library functions found
Configure:error:/bin/sh '/root/otp/erts/configure ' failed for ERTs
# yum-y Install Ncurses-devel
#./configure--prefix=/home/erlang--without-javac
Error
Copy Code code as follows:
*********************************************************************
Applications DISABLED **********************
*********************************************************************
Crypto:no usable OpenSSL found
Jinterface:java compiler disabled by user
ODBC:ODBC Library-link check failed
Orber:no C + + compiler found
Ssh:no usable OpenSSL found
Ssl:no usable OpenSSL found
*********************************************************************
# Yum List | grep SSL
# yum Install Openssl-devel
#./configure--prefix=/home/erlang--without-javac
Error
Copy Code code as follows:
*********************************************************************
Applications DISABLED **********************
*********************************************************************
Jinterface:java compiler disabled by user
ODBC:ODBC Library-link check failed
Orber:no C + + compiler found
*********************************************************************
# Yum List | grep ODBC
# yum Install Unixodbc-devel
#./configure--prefix=/home/erlang--without-javac
Error
Copy Code code as follows:
*********************************************************************
Applications DISABLED **********************
*********************************************************************
Jinterface:java compiler disabled by user
Orber:no C + + compiler found
*********************************************************************
# yum Install gcc-c++
#./configure--prefix=/home/erlang--without-javac
# make
# make Install
Installation Complete!
Test whether Erlang is properly installed
Copy Code code as follows:
#/home/erlang/bin/erl
ERLANG/OTP [erts-6.0] [source] [64-bit] [async-threads:10] [hipe] [Kernel-poll:false]
Eshell V6.0 (abort with ^g)
1> Evenn = Lists:filter (Fun (n)-> n rem 2 = = 0 end, Lists:seq (1,100)).
[2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,
44,46,48,50,52,54,56,58| ...]
2> Halt ().
Add Erlang's Bin path to the PATH environment variable for execution.
"Installation Summary"
To install Erlang from source code, there are two libraries or tools that are required:
One is the complete GCC compiler environment
Second, ncurses Development library
There are also libraries or tools that, if they are not present, will have warning messages when compiling the configuration and may not be configured. These libraries are:
1) OpenSSL Development Library
2 ODBC Development Library
3) Java compiler