9
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AWS EC2にElixir/Phoenixをインストール

Last updated at Posted at 2017-02-09

Erlang

$ id
uid=0(root) gid=0(root) groups=0(root)
$ yum -y install git openssl openssl-devel gcc-c++ ncurses ncurses-devel
$ cd /usr/local/src
$ wget http://www.erlang.org/download/otp_src_19.2.tar.gz
$ tar -zxvf otp_src_19.2.tar.gz
$ rm otp_src_19.2.tar.gz
$ cd otp_src_19.2
$ ./configure
$ make
$ make install

Elixir

$ cd /usr/local/src
$ git clone https://github.com/elixir-lang/elixir.git
$ cd elixir
$ git checkout -b v1.4.1 refs/tags/v1.4.1
$ make clean test
$ mv ../elixir /usr/local/
$ chown -R ec2-user /usr/local/elixir

$ id
uid=500(ec2-user) gid=500(ec2-user) groups=500(ec2-user),10(wheel)

# add ~/.bashrc
PATH="/usr/local/elixir/bin:${PATH}"

Phoenix

$ id;pwd
uid=500(ec2-user) gid=500(ec2-user) groups=500(ec2-user),10(wheel)
/home/ec2-user
$ git clone https://github.com/creationix/nvm.git ~/.nvm
#  add ~/.bashrc
  source ~/.nvm/nvm.sh
$ nvm install v7.5.0
$ npm install

$ mix local.hex
$ mix archive.install https://github.com/phoenixframework/archives/raw/master/phoenix_new.ez
$ mix phoenix.new sample
$ cd sample
$ mix phoenix.server


# browser
http://[Your public IP]:4000/
 # Welcome to Phoenix!
9
6
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
9
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?