Going live with Erlang on Amazon can be difficult especially when you pick the wrong operating system that doesn’t come with needed packages.
In this post I am going to outline how I go about installing Erlang on a brand new server.
There is little hope for those of you looking for shared Erlang hosting. Most of those developers that I have talked to use Amazon EC2 (you can get a free Amazon EC 2 trial for one year) i.e. a VPS.
There are multiple ways to install Erlang. Attempting it with “sudo apt-get install erlang” is a bad idea since this will install a deprecated version which is fine if you’re ok with that but most projects aren’t and won’t execute properly.
Installing Erlang on Amazon with Kerl
We will build our newer up-to date Erlang version with kerl(not with sudo apt-get).
Please make sure you select Ubuntu 14 as an OS for your VPS. This will relieve you of many headaches and compatibility-issues!
These are the needed terminal commands (in right order):
sudo apt-get update
sudo apt-get install build-essential autoconf libncurses5-dev libwxgtk2.8-dev libgl1-mesa-dev libglu1-mesa-dev libpng3 libssh-dev unixodbc-dev
sudo apt-get install git
chmod a+x kerl
./kerl update releases
./kerl build 20.3 20.3
./kerl install 20.3 ~/.kerl/20.3
Most of the commands are self-explanatory, except “export KERL_BUILD_BACKEND=git” (You can read the discussion that caused this here: https://github.com/kerl/kerl/issues/274).
I hope this simple list of commands is going to take away more headache than it causes! It’s a pleasure to work with this robust programming language. It seems like I can get more done within a few weeks than I could within months in any other programming language!
If you are developing web-apps I would highly recommend checking out N2O. It’s a great No-Bullshit web framework for Erlang.