Problem scenario
You are using a Red Hat derivative of Linux. You want to install Erlang (e.g., for development, or to use RabbitMQ or Chef Server). What do you do?
Solution
Run this script with the "sudo" command (e.g., sudo bash /tmp/erlang.sh
)
# Written by www.continualintegration.com
#/bin/bash
# We suggest calling this script erlang.sh and placing this file in /tmp/
yum -y install ncurses-devel gtk2-devel
curl -Ls https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.4/wxWidgets-3.0.4.tar.bz2 > /tmp/wxWidgets-3.0.4.tar.bz2
cp /tmp/wxWidgets-3.0.4.tar.bz2 /bin/
cd /bin/
bzip2 /tmp/wxWidgets-3.0.4.tar.bz2
tar -xf wxWidgets-3.0.4.tar
cd wxWidgets-3.0.4
./configure
cd /bin/
git clone https://github.com/erlang/otp.git
cd otp
./otp_build autoconf
./configure
echo "This next portion may take 15 minutes"
date > /tmp/datetime.txt
yum -y groupinstall "Development Tools"
make
make install
ln -s /usr/local/lib/erlang/bin/erl /usr/bin/erl
ln -s /usr/local/bin/erlc /usr/bin/erlc
yum -y install python3*
ln -s /etc/alternatives/python3 /usr/bin/python
echo "Script run completed."
echo " "
echo "Many errors above may be ignorable"
echo "try the 'erl' command with no quotes to see if Erlang was installed"
echo 'If you get to a carrot prompt, use Ctrl-c, then type the "a" key and then press Enter.'