Erlang环境安装
系统版本:CentOS Linux release 8.3.2011
Erlang版本:12.1
- 方法一:
-
安装epel源
# 下载新epel dnf install -y https://mirrors.aliyun.com/epel/epel-release-latest-8.noarch.rpm # 替换地址 sed -i 's|^#baseurl=https://download.example/pub|baseurl=https://mirrors.aliyun.com|' /etc/yum.repos.d/epel* sed -i 's|^metalink|#metalink|' /etc/yum.repos.d/epel*
-
下载安装包
wget --no-check-certificate https://github.com/rabbitmq/erlang-rpm/releases/download/v24.1.2/erlang-24.1.2-1.el8.x86_64.rpm
-
安装
dnf install erlang-24.1.2-1.el8.x86_64.rpm
-
验证
[root@i-h0xe1oiq tools]# erl -version Erlang (SMP,ASYNC_THREADS) (BEAM) emulator version 12.1.2
- 方法二:
-
安装epel源
# 下载新epel dnf install -y https://mirrors.aliyun.com/epel/epel-release-latest-8.noarch.rpm # 替换地址 sed -i 's|^#baseurl=https://download.example/pub|baseurl=https://mirrors.aliyun.com|' /etc/yum.repos.d/epel* sed -i 's|^metalink|#metalink|' /etc/yum.repos.d/epel*
-
下载安装包
wget --no-check-certificate https://erlang.org/download/otp_src_24.1.tar.gz
-
安装依赖
dnf install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel
-
解压
tar xf otp_src_24.1.tar.gz -C /application/
-
进入目录
cd /application/otp_src_24.1/
-
编译安装
./configure --prefix=/usr/local/erlang --with-ssl --enable-threads --enable-smp-support --enable-kernel-poll --enable-hipe --without-javac make && make install
-
配置环境变量
[root@i-h0xe1oiq otp_src_24.1]# vim /etc/profile #set erlang environment ERL_PATH=/usr/local/erlang/bin PATH=$ERL_PATH:$PATH [root@i-h0xe1oiq otp_src_24.1]# source /etc/profile
-
验证
[root@i-h0xe1oiq ~]# erl -version Erlang (SMP,ASYNC_THREADS) (BEAM) emulator version 12.1