Skip to content

Instantly share code, notes, and snippets.

@dhq314
Last active December 15, 2015 07:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dhq314/5226368 to your computer and use it in GitHub Desktop.
Save dhq314/5226368 to your computer and use it in GitHub Desktop.
a shell script under the CentOS install Erlang development environment
#!/bin/sh
erl_url="http://www.erlang.org/download/otp_src_R16B.tar.gz"
prefix="/usr/local/erlang"
yum update -y
yum upgrade -y
#yum groupinstall -y "Development Tools" "Perl Support"
yum groupinstall -y "Development Tools"
yum install -y kernel-devel m4 fop ncurses-devel openssl-devel tk unixODBC unixODBC-devel
if [ ! -s "./erlang_otp.tar.gz" ]; then
wget -c -O erlang_otp.tar.gz $erl_url
fi
tar zxvf erlang_otp.tar.gz
cd ./otp_src*/
./configure --prefix=$prefix --without-javac \
--enable-kernel-poll \
--enable-threads \
--enable-dynamic-ssl-lib \
--enable-shared-zlib \
--enable-smp-support \
--enable-hipe
make && make install
#if [ ! -s "~/.bashrc" ]; then
# touch ~/.bashrc
#fi
#echo 'export PATH="/usr/local/erlang/bin:$PATH"' >> ~/.bashrc
#source ~/.bashrc
ln -sfv $prefix/bin/* /usr/local/bin/
yum clean all
erl -noshell -eval "erlang:display('Erlang Success Install')" -s init stop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment