Help us understand the problem. What is going on with this article?

CentOS7にphoenix環境を入れる

More than 3 years have passed since last update.

参考:http://qiita.com/yokaigundan/items/0e8da4938bd91fab400b

この記事の目標

  • erlangのインストールから始めて、phoenixで何か動かすところまで。
  • yumだとElixirが上手く入らないのでyum以外で。
  • Erlangはver.18を使う

Erlang(evm)インストール

参考にした記事 + ncurses-devel で十分のよう。

sudo yum install -y lynx wget curl git nodejs npm redhat-lsb inotify-tools ncurses-devel
git clone https://github.com/robisonsantos/evm.git
cd evm
./install

echo 'source /home/$USER/.evm/scripts/evm' >> ~/.bashrc
source ~/.bashrc

evm list
evm install OTP_18.3
# この記事の時点での最新版
evm default OTP_18.3

cd ../

erl

Elixir(kiex)

IEx (Interactive Elixir)

\curl -sSL https://raw.githubusercontent.com/taylor/kiex/master/install | bash -s
echo 'test -s "$HOME/.kiex/scripts/kiex" && source "$HOME/.kiex/scripts/kiex"' >> ~/.bashrc
source ~/.bashrc
kiex list known
kiex install 1.2.5
kiex use 1.2.5

iex

rebar

makeみたいなツール。

git clone git://github.com/rebar/rebar.git
cd rebar
./bootstrap
sudo mv rebar /usr/local/bin/
rebar -V

cd ../

phoenix

mix local.hex
mix archive.install https://github.com/phoenixframework/archives/raw/master/phoenix_new.ez

phoenixで何か作ってみる

mix phoenix.new hello_phoenix

npmを更新しておく

sudo npm install -g npm
mix deps.get
npm install

nodeのバージョン更新しておく

参考:http://parashuto.com/rriver/tools/updating-node-js-and-npm

sudo npm install -g n
sudo n --stable
sudo n latest

走らせてみる

cd hello_phoenix
mix phoenix.server

アクセスしてみる

別ターミナルでcurl

curl localhost:4000
it__ssei
自動テストと定時退社が好き。専門は物理学(大気力学、力学系)
https://twitter.com/it__ssei
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした