在CentOS下,源码安装Erlang:
下载Erlang源码
安装:官网地址,http://www.erlang.org
- # cd /opt/
- # wget http://www.erlang.org/download/otp_src_R15B01.tar.gz
解压:
- # tar -zxvf otp_src_R15B01.tar.gz
- # cd otp_src_R15B01
安装依赖:
- # yum install build-essential m4
- # yum install openssl
- # yum install openssl-devel
- # yum install unixODBC
- # yum install unixODBC-devel
- # yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel
配置configure
- # ./configure --prefix=/usr/local/erlang --enable-hipe --enable-threads --enable-smp-support --enable-kernel-poll
- make
- make install
完成之后,设置环境变量
- vim /etc/profile
- ERL_HOME=/usr/local/erlang
- PATH=$ERL_HOME/bin:$PATH
- export ERL_HOME PATH
完成后保存
- source /etc/profile
让环境变量立即生效
然后输入erl,出现erlang shell,如下:
- Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false]
- Eshell V5.9.1 (abort with ^G)
- 1>
hipe:支持Erlang编译成本地代码。好处:提高Erlang虚拟机执行代码性能。
转载自:http://amornio.iteye.com/blog/1551502