Forked from johanneswuerbach/rails-vagrant-provision.sh
Last active
August 29, 2015 14:21
-
-
Save pietromenna/47c57987acf3f82e419a 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
#!/usr/bin/env bash | |
sudo locale-gen en_US.UTF-8 | |
sudo update-locale LANG=en_US.UTF-8 | |
sudo update-locale LC_ALL=en_US.UTF-8 | |
sudo apt-get update | |
sudo apt-get install -y build-essential git curl libxslt1-dev libxml2-dev libssl-dev | |
# postgres | |
echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main " | sudo tee -a /etc/apt/sources.list.d/pgdg.list | |
sudo wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get install -y postgresql-9.3 libpq-dev | |
echo '# "local" is for Unix domain socket connections only | |
local all all trust | |
# IPv4 local connections: | |
host all all 0.0.0.0/0 trust | |
# IPv6 local connections: | |
host all all ::/0 trust' | sudo tee /etc/postgresql/9.3/main/pg_hba.conf | |
sudo sed -i "s/#listen_addresses = 'localhost'/listen_addresses = '*'/g" /etc/postgresql/9.3/main/postgresql.conf | |
sudo /etc/init.d/postgresql restart | |
sudo su - postgres -c 'createuser -s vagrant' | |
# redis | |
sudo apt-get install -y python-software-properties | |
sudo add-apt-repository -y ppa:rwky/redis | |
sudo apt-get update | |
sudo apt-get install -y redis-server | |
# rvm and ruby | |
su - vagrant -c 'curl -sSL https://get.rvm.io | bash -s stable --ruby' | |
su - vagrant -c 'rvm rvmrc warning ignore allGemfiles' | |
# node | |
su - vagrant -c 'curl https://raw.githubusercontent.com/creationix/nvm/v0.14.0/install.sh | sh' | |
su - vagrant -c 'nvm install 0.10' | |
su - vagrant -c 'nvm alias default 0.10' | |
echo "All done installing! | |
Next steps: type 'vagrant ssh' to log into the machine." | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment