centos 6.2下安装Erlang
安装erlang依赖的基本环境
#操作系统:CentOS release 6.2 yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel java-devel unixODBC-devel;
Erlang安装方式一:源码编译
访问官网下载页
wget http://www.erlang.org/download/otp_src_R16B03.tar.gz; tar -zxvf otp_src_R16B03.tar.gz; cd otp_src_R16B03; ./configure --prefix=/usr/local/erlang --with-ssl -enable-threads -enable-smmp-support -enable-kernel-poll --enable-hipe --without-javac;#不用java编译,故去掉java避免错误 make && make install;
配置erlang环境
#vi /etc/profile 在文件最后加入: PATH=$PATH:/usr/local/erlang/bin export PATH #source /etc/profile
Erlang安装方式二:YUM安装
安装erlang的YUM源
#自动安装erlang的YUM源 wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm rpm -Uvh erlang-solutions-1.0-1.noarch.rpm #或手动安装YUM源 rpm --import http://packages.erlang-solutions.com/rpm/erlang_solutions.asc Add the following lines to some file in /etc/yum.repos.d/: [erlang-solutions] name=Centos $releasever - $basearch - Erlang Solutions baseurl=http://packages.erlang-solutions.com/rpm/centos/$releasever/$basearch gpgcheck=1 gpgkey=http://packages.erlang-solutions.com/rpm/erlang_solutions.asc enabled=1
yum erlang
yum -y install erlang;
安装成功检测
安装完后输入“erl”以下提示即为安装成功:
[root@localhost ~]# erl Erlang/OTP 18 [erts-7.2] [source-e6dd627] [64-bit] [async-threads:10] [hipe] [kernel-poll:false] Eshell V7.2 (abort with ^G)