LoginSignup
18
13

More than 5 years have passed since last update.

Amazon LinuxへのErlang/Elixir/Phoenixのインストール手順

Last updated at Posted at 2016-02-22

Amazon LinuxへErlang/Elixirをインストールした際の手順メモです。

手順

# ホームディレクトリに移動
cd

# gitをインストール
sudo yum install git

# nvmをgitリポジトリからclone
git clone git://github.com/creationix/nvm.git .nvm

# .bash_profileを変更
vi ~/.bash_profile

  # 以下の設定を追加
  source ~/.nvm/nvm.sh

# 一旦ログアウトして再ログイン

# インストール可能なnode.jsのバージョンの一覧を確認
nvm ls-remote

# node.jsをインストール(LTSであるv4の最新版をインストールしておく)
nvm install v4.3.1

# バージョンを確認
node -v

# nvmのデフォルトバージョンを定義
nvm alias default v4.3.1

# erlangの依存パッケージをインストール
sudo yum install ncurses ncurses-devel openssl openssl-devel gcc-c++ unixODBC unixODBC-devel fop *openjdk-devel inotify-tools
sudo yum --enablerepo=epel install inotify-tools

# 作業ディレクトリを作成して移動
mkdir ~/work && cd ~/work

# erlangの最新バージョン(記事執筆時点では18.2.1)をソースからインストール
wget http://erlang.org/download/otp_src_18.2.1.tar.gz
tar zxvf otp_src_18.2.1.tar.gz
cd otp_src_18.2.1
./configure

  # wxWidgets not found, wx will NOT be usable
  # というメッセージが表示されますが、GUIを使わないなら無視して良いと思われます。

make
sudo make install

# 動作確認
erl -version

# elixirの最新版(記事執筆時点では1.2.3)をインストール
wget https://github.com/elixir-lang/elixir/releases/download/v1.2.3/Precompiled.zip
sudo unzip Precompiled.zip -d /opt/elixir

# パスを通す
vi ~/.bash_profile

  # export PATHの部分を下記のように変更
  export PATH=/opt/elixir/bin:$PATH

# 一旦ログアウトして再ログイン

# 動作確認
iex

# hexのインストール
mix local.hex

# phoenixのインストール
mix archive.install https://github.com/phoenixframework/archives/raw/master/phoenix_new.ez

参考情報

AmazonLinuxにErlang+Elixir+Phoenixをインストールしてみた
CentOSにElixirをインストールしてみる
CentOS6 に Erlang / Elixir のインストール
Node v5.0.0 (stable)

18
13
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
18
13