Back

elixir - phoenix 1. 安装

发布时间: 2019-03-07 02:44:00

elixir 版的Rails 上手简直不要太容易

参考:https://phoenixframework.org/

安装 esl-erlang

(参考:https://github.com/phoenixframework/phoenix/issues/1418)

wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && sudo dpkg -i erlang-solutions_1.0_all.deb
wget http://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc
sudo apt-key add erlang_solutions.asc
sudo apt-get update
sudo apt-get install esl-erlang

安装完Elixir 之后, 

1. 安装Hex

$ mix local.hex

Are you sure you want to install "https://repo.hex.pm/installs/1.8.0/hex-0.19.0.ez"? [Yn]
* creating /home/siwei/.mix/archives/hex-0.19.0

2. 安装Pheonix

$ mix archive.install hex phx_new 1.4.1

Resolving Hex dependencies...
Dependency resolution completed:
New:
  phx_new 1.4.1
* Getting phx_new (Hex package)
All dependencies are up to date
Compiling 10 files (.ex)
Generated phx_new app
Generated archive "phx_new-1.4.1.ez" with MIX_ENV=prod
Are you sure you want to install "phx_new-1.4.1.ez"? [Yn] 
* creating /home/siwei/.mix/archives/phx_new-1.4.1

3. 安装 inotify (Linux only)

apt-get install inotify-tools

4. 安装postgresql (也可以使用 mysql) 

参考 https://www.postgresql.org/download/linux/ubuntu/ (可以安装最新版10 )

或者我自己写的:http://siwei.me/blog/posts/postgres-postgres (安装默认的)

Back