Step 1 – Prerequsiteis

Before starting the installation process make sure you have root or sudo privileged user access to your Debian system. Now login to your system: Upgrade the current packages to the latest version.

Step 2 – Enable Erlang Repository

Use the following commands to add Erlang apt repository on your system, Which is required to install Erlang on a Debian VPS. Simply download erlang repository package from its official website and install on your system.

Step 3 – Install Erlang on Debian

Now, you can install erlang package on your system using the following command. This will install all of its dependencies as well.

Step 4 – Hello World Example

This is a simple hello world program written in Erlang. Create a file helloworld.erl with following content. add the following contnet. Now compile the hello world program using below command. The above command will create a file helloworld.beam in the current directory. You can run your program now. Reference: