Forked from eikes/run phoenix on amazon linux.sh
Last active
August 27, 2021 12:17
-
-
Save mike-north/cbaf06acb75e7a605f757df1036feff7 to your computer and use it in GitHub Desktop.
run phoenix on amazon linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app deps | |
sudo yum install git | |
# erlang deps | |
sudo yum groupinstall "Development Tools" | |
sudo yum install ncurses-devel openssl-devel | |
# erlang | |
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 | |
sudo make install | |
cd .. | |
# elixir | |
wget https://github.com/elixir-lang/elixir/archive/v1.4.2.zip | |
unzip v1.4.2.zip | |
cd elixir-1.4.2/ | |
make | |
sudo make install | |
echo "PATH=\$PATH:/home/ec2-user/elixir-1.4.2/bin" >> ~/.bashrc | |
cd .. | |
# phoenix deps | |
sudo yum install postgresql | |
mix local.hex | |
sudo yum install nodejs npm --enablerepo=epel | |
sudo npm -g install brunch | |
# listen on port 80 as well | |
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 4001 | |
git clone git://github.com/user_name/my-phonix-app | |
cd my-phoenix-app | |
npm install | |
mix deps.get | |
MIX_ENV=prod mix ecto.create | |
MIX_ENV=prod mix ecto.migrate | |
brunch build --production | |
MIX_ENV=prod mix phoenix.digest | |
MIX_ENV=prod PORT=4001 elixir --detached -S mix do compile, phoenix.server | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i am getting error like when i trying sudo make intsall on elixir