2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【2025年版】Ubuntu 24.04 Elixir/Phoenix最短インストール手順(ベアメタル or mise)

Last updated at Posted at 2025-11-26

piacere です、ご覧いただいてありがとございます :bow:

Ubuntu 24.04(実機、Windows WSL2 Ubuntu)にElixir/Phoenixを導入する最短手順をメモします

※(Windowsのみ)WSL2 Ubuntu 24.04導入

wsl --install -d Ubuntu-24.04
(略)
Create a default Unix user account: 【Ubuntuユーザー名を入力】
New password:【パスワードを入力】
Retype new password:【パスワードを入力】

少し前のWindowsでは、dism.exewsl_update_x64.msi が事前に必要でしたが、2020年5月27日にリリースされたWindows 10バージョン2004(May 2020 Update)以降は、WSL2が標準装備となったため、Ubuntu 24.04のみインストールすればOKとなり、だいぶ楽チンになりました

ベアメタル or miseを選んでください

Elixir/Phoenixの利用目的に応じて、ベアメタル(ホストに直接)へのインストールか、miseを使ったインストールかを選んでください

①ベアメタルへのインストール

ElixirとPhoenixのインストール

sudo add-apt-repository ppa:rabbitmq/rabbitmq-erlang
sudo apt update -y
sudo apt install git elixir erlang -y
mix archive.install hex phx_new

下記でElixirとPhoenixが入ったことを確認してください

$ elixir --version
Erlang/OTP 27 [erts-15.2.7.4] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit:ns]

Elixir 1.17.3 (compiled with Erlang/OTP 26)
$ mix archive
* hex-2.3.1
* phx_new-1.8.1
Archives installed at: /home/piacere/.mix/archives

②miseを使ったインストール

miseのインストール

sudo install -dm 755 /etc/apt/keyrings
wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | sudo tee /etc/apt/keyrings/mise-archive-keyring.gpg 1> /dev/null
echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.gpg arch=amd64] https://mise.jdx.dev/deb stable main" | sudo tee /etc/apt/sources.list.d/mise.list
sudo apt update
sudo apt install mise -y
echo eval "$(mise activate bash)" >> ~/.bashrc
source ~/.bashrc

ElixirとPhoenixのインストール

mise use -g erlang@latest
mise use -g elixir@latest

下記でElixirとPhoenixが入ったことを確認してください

$ elixir --version
Erlang/OTP 28 [erts-16.1.2] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit:ns]

Elixir 1.19.3 (compiled with Erlang/OTP 28)
$ mix archive
* hex-2.3.1
* phx_new-1.8.1
Archives installed at: /home/piacere/.mix/archives

終わりに

ベアメタルへのインストールは、少し前と比べると随分ラクになっており、miseもasdfと比べるとインストール/設定がカンタンで良いですね

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?