Appendix A. Installing Elixir and Phoenix

 

Before you get started, you need to have Elixir and Phoenix installed in your local environment. There are many precompiled distributions available for many platforms including macOS, Unix and Linux variants, Windows, Docker, and even Raspberry Pi. Furthermore, because Elixir is open source, you can download the source code and compile it yourself if you feel so inclined.

The first thing to do is install Elixir.

A.1. Installing Elixir

There’s only one prerequisite for Elixir itself: Erlang. But most of the install procedures that follow will also ensure that Erlang is installed.

You can either install Elixir with your OS’s package manager or build it yourself from source.

A.1.1. macOS and Unix/Linux variants

Simply use your package manager to install Elixir—almost all the standard repositories have Elixir in them. For example, if you’re running Homebrew on macOS, run brew update && brew install elixir. pacman, yum, pkg, apt-get, and others have their own install commands.

If your package manager doesn’t install Elixir in the traditional manner, visit http://elixir-lang.org/install.html for more detailed instructions.

A.1.2. Windows

Elixir provides an installer you can use to install Elixir and its prerequisites. Just run the installer and it will put everything where it needs to be. The installer can be downloaded from https://repo.hex.pm/elixir-websetup.exe.

A.1.3. From source

A.2. Installing Phoenix