Last active
December 15, 2015 07:49
-
-
Save dhq314/5226368 to your computer and use it in GitHub Desktop.
a shell script under the CentOS install Erlang development environment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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