(1) 安装依赖库
# yum install -y gcc
# yum install -y gcc-c++
# yum install -y ncurses-devel
# yum install -y java-gcj-compat java-gcj-compat-dev
# yum install -y openssl
# yum install -y openssl-devel
# yum install -y unixODBC
# yum install -y unixODBC-devel
# yum install -y expat-devel
(2) 下载安装OTP
cd /dada
wget http://www.erlang.org/download/otp_src_17.4.tar.gz
tar -xvzf otp_src_17.4.tar.gz
(3) 安装OTP
cd ./otp_src_17.4
./configure --prefix=/data/erlang --without-javac --with-ssl CFLAGS="-fno-stack-protector"
make && make install
(4) 添加链接
ln -s /data/erlang/bin/erl /usr/local/bin/erl
ln -s /data/erlang/bin/escript /usr/sbin/escript
ln -s /data/erlang/bin/erlc /usr/local/bin/erlc
(5) 检查是否安装完成
cd /data/erlang/bin
./erl
#配置环境变量
Vi /etc/profile
ERL_HOME=/data/erlang
export PATH=$PATH:$ERL_HOME/bin
# 环境变量生效
source /etc/profile
#验证
erl