-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild_erlang.sh
49 lines (40 loc) · 1.13 KB
/
build_erlang.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh
########################################################################################
#
# Install JDK Script
#
# Shawn Ma
#
########################################################################################
# Define
TARGET=OTP_R16B.tar.gz
SOURCE=https://nodeload.github.com/erlang/otp/tar.gz/OTP_R16B
# Create a build directory
mkdir -p /opt/install/erlang && cd /opt/install/erlang
# Prepare for compilation source
curl -o $TARGET $SOURCE
mkdir -p tmp && tar -zxvf $TARGET -C tmp
# Install build dependencies
yum install -y gcc gcc-c++ make cmake autoconf automake
yum install -y ncurses-devel openssl-devel
# Create a User Group
# Compile and deploy
mv tmp/* source && cd source
./otp_build autoconf
./configure \
--prefix=/opt/environment/erlang/R16B \
--enable-threads \
--enable-smp-support \
--enable-kernel-poll \
--enable-hipe \
--without-termcap \
--without-javac \
--with-ssl
make
make install
# Postinstallation setup
export PATH=$PATH:/opt/environment/erlang/R16B/bin
# Configuration
# Additional
# export PATH USER
#sed -i '/export PATH=/a\export PATH=$PATH:\/opt\/environment\/erlang\/R16B\/bin' /etc/profile