Last active
December 14, 2015 03:19
-
-
Save everaldo/5019798 to your computer and use it in GitHub Desktop.
Configuração de uma VagrantBox: ruby + git + nginx + passenger + mongodb
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
##Configura repositório apt-do MongoDB | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 | |
sudo touch /etc/apt/sources.list.d/10gen.list | |
# Esse comando com echo e sudo tee funciona | |
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/10gen.list | |
## Esse comando cat com sudo não funciona. Precisa editar manualmente | |
sudo cat <<EOF > /etc/apt/sources.list.d/10gen.list | |
deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen | |
EOF | |
sudo apt-get update | |
sudo apt-get install mongodb-10gen | |
sudo apt-get -y update | |
sudo apt-get -y install build-essential zlib1g-dev openssl git-core sqlite3 libsqlite3-dev libssl-dev libreadline-dev libxslt-dev libxml2-dev | |
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile | |
echo 'eval "$(rbenv init -)"' >> ~/.profile | |
source .profile | |
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
rbenv install --list #lista versões disponíveis do ruby | |
rbenv install 1.9.3-p374 # instala a última versão estável | |
# rbenv install 2.0.0-p247 ## versão 2.0 | |
rbenv rehash # sempre que instalar algum binário do ruby (gem ou versão) tem que rodar o rehash | |
rbenv global 1.9.3-p374 | |
sudo apt-get install python-software-properties ### PARA INSTALAR add-apt-repository, se não tiver no sistema | |
sudo apt-get install software-properties-common #### A PARTIR DO UBUNTU 12.10 | |
sudo add-apt-repository ppa:brightbox/passenger-nginx ### PARA INSTALAR VERSAO RECENTE DO NGINX COM PASSENGER | |
sudo apt-get update | |
sudo apt-get install nginx-full | |
sudo cat <<EOF > /etc/nginx/conf.d/passenger.conf | |
passenger_root /usr/lib/phusion-passenger; | |
EOF | |
###Habilita o Passenger |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment