Last active
October 9, 2018 19:15
-
-
Save rodrigolck/b6c20fa131511e74a4ef329eeba1176c to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
sudo apt install -y curl | |
# Adiciona o Repo do Docker | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
# Executar para Ubuntu ou versões forkeadas de Ubuntu 16.04 | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable" | |
# Atualizando pacotes | |
sudo apt update -y | |
sudo apt install -f -y | |
# Instalando libs | |
sudo apt install -y git meld libcurl3-dev apt-transport-https ca-certificates software-properties-common nodejs build-essential libncurses5-dev openssl libssl-dev fop xsltproc unixodbc-dev | |
# Importa o GITAWARE, para tornar mais facil a visualizacao de qual branch a atual | |
cd | |
git clone git://github.com/jimeh/git-aware-prompt.git .bash/git-aware-prompt | |
echo export GITAWAREPROMPT='~/.bash/git-aware-prompt' >> ~/.bashrc | |
echo 'source "${GITAWAREPROMPT}/main.sh"' >> ~/.bashrc | |
echo 'export PS1="\${debian_chroot:+(\$debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] \[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\]\$ "' >> ~/.bashrc | |
# Plugin para ajudar a ver o diff | |
echo '#!/usr/bin/python' > ~/diff.py | |
echo -e "\nimport sys\nimport os\n\nos.system('meld \"%s\" \"%s\"' % (sys.argv[2], sys.argv[5]))" >> ~/diff.py | |
git config --global diff.external ~/diff.py | |
chmod +x ~/diff.py | |
# Instalando Docker | |
# WARNING: Se estiver no ubuntu: https://linuxconfig.org/how-to-install-docker-on-ubuntu-18-04-bionic-beaver | |
# sudo echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic nightly" > /etc/apt/sources.list.d/docker.list | |
# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
# sudo apt update | |
sudo apt-get remove docker docker-engine docker.io -y | |
sudo apt-get install docker-ce -y | |
# Adiciona o usuário corrente no grupo Docker para não precisar usar o sudo (na próxima sessão) | |
sudo groupadd docker | |
sudo usermod -aG docker $USER | |
# Habilita o Docker na inicialização do sistema | |
sudo systemctl enable docker | |
# Instalando Container Mongo | |
sudo docker run -p 27017:27017 --name mongo-3 -v ~/docker-mongo-3-data:/data/db -d mongo:3.4 | |
# Install Erlang OTP | |
cd /tmp | |
curl -L http://www.erlang.org/download/otp_src_20.3.tar.gz | tar xz | |
cd otp_src_20.3/ | |
./configure | |
make | |
sudo make install | |
# Install Elixir | |
cd /tmp | |
git clone https://github.com/elixir-lang/elixir.git | |
cd elixir | |
git checkout v1.6 | |
make clean test | |
sudo make install | |
sudo chmod 755 -R /usr/local/lib/elixir/bin/ | |
# Install Phoenix | |
mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment