Last active
August 13, 2018 08:07
-
-
Save jung-hunsoo/bb8d6b453c481075b20afb1698fdf534 to your computer and use it in GitHub Desktop.
Shell script for Erlang OTP 21 + Elixir 1.7.0 + Phoenix 1.3.3 + Nodejs 8.x + Postgresql 9.3 on Ubuntu 14.04 with locale of ko_KR.UTF-8.
This file contains 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
#!/bin/bash | |
# For Ubuntu 14.04 | |
# chmod +x install_elixir170.sh before run | |
set -e | |
echo "Install dependencies" | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
sudo apt-get install -y apt-utils gdebi-core curl wget git make sudo tar libfontconfig unzip build-essential locales | |
sudo locale-gen ko_KR.UTF-8 | |
sudo dpkg-reconfigure locales | |
sudo update-locale LC_ALL=ko_KR.UTF-8 LANG=ko_KR.UTF-8 | |
export LANG=ko_KR.UTF-8 LANGUAGE=ko_KR.UTF-8 LC_ALL=ko_KR.UTF-8 | |
echo 'export LANG=ko_KR.UTF-8' >> ~/.bashrc | |
echo 'export LANGUAGE=ko_KR.UTF-8' >> ~/.bashrc | |
echo 'export LC_ALL=ko_KR.UTF-8' >> ~/.bashrc | |
echo "Update git" | |
sudo apt-get remove -y git | |
sudo apt-get install -y software-properties-common | |
sudo add-apt-repository -y ppa:git-core/ppa | |
sudo apt-get update | |
sudo apt-get install -y git | |
echo "Install Erlang/OTP 21" | |
wget -nv https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb | |
sudo dpkg -i erlang-solutions_1.0_all.deb | |
sudo apt update | |
apt-cache madison esl-erlang | |
sudo touch /etc/init.d/couchdb | |
sudo apt install -y esl-erlang=1:21.0 | |
rm erlang-solutions_1.0_all.deb | |
echo "Install Elixir 1.7.0" | |
wget -nv https://github.com/elixir-lang/elixir/releases/download/v1.7.0/Precompiled.zip | |
sudo mkdir -p /opt/elixir-1.7.0/ | |
sudo unzip -q Precompiled.zip -d /opt/elixir-1.7.0/ | |
rm Precompiled.zip | |
sudo apt update | |
export PATH=${PATH}:/opt/elixir-1.7.0/bin | |
echo 'export PATH=$PATH:/opt/elixir-1.7.0/bin' >> ~/.bashrc | |
echo "Install Nodejs 8.x" | |
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
sudo apt-get autoremove -y | |
echo "Install Phoenix 1.3.3" | |
mix local.hex --force | |
mix local.rebar --force | |
mix archive.install --force https://github.com/phoenixframework/archives/raw/master/phx_new.ez | |
sudo apt-get install inotify-tools | |
echo "Install Postgresql" | |
sudo apt-get install -y postgresql postgresql-contrib libpq-dev | |
sudo update-rc.d postgresql enable | |
sudo service postgresql restart | |
# Show Elixir version | |
elixir -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment