This guide is for users using Ubuntu Linux and wants to setup Phoenix Framework. If you want to know more on our setup of Ubuntu, checkout Ubuntu Setup.

Make sure you're in path ~.

Install Erlang & Elixir

  1. Adds Erlang Solutions repo:
    wget && sudo dpkg -i erlang-solutions_1.0_all.deb

  2. Update
    sudo apt update

  3. Install the Erlang/OTP platform and all of its applications:

sudo apt install esl-erlang
  1. Install Elixir
    sudo apt install elixir
  2. Install Hex (Elixir's package manager)
    mix local.hex

Install PostgreSQL

Postgresql is the default database used in Phoenix.

  1. Check if you have Postgre installed
    psql --version

  2. If not, install Postgresql from Ubuntu package
    sudo apt-get install postgresql postgresql-contrib

  3. If you want to add more Postgre features like PostGIS, you can search them:
    apt-cache search postgres

  4. If you want a handy GUI, you can install it:
    sudo apt install pgadmin3

  5. Create postgres admin user
    sudo -u postgres psql postgres

  6. Setup default password postgres for default user
    \password postgres. Just enter postgres.

  7. Create an admin user based on the the current user
    sudo -u postgres createuser --superuser $USER

Install Node

Part of the Ubuntu Setup includes the node setup using NVM.

Install Inotify

The livereloading of phoenix depends on this tool. To install this:
sudo apt install inotify-tools

Install Phoenix

Let's use Elixir utility Mix to install Phoenix:
mix archive.install

Run Phoenix

At this point, you should be able to create a phoenix app by running:
mix hello_world