Skip to content

Instantly share code, notes, and snippets.

@valerykalashnikov
Last active August 29, 2015 14:14
Show Gist options
  • Save valerykalashnikov/658894bb8f51e5b5e5ee to your computer and use it in GitHub Desktop.
Save valerykalashnikov/658894bb8f51e5b5e5ee to your computer and use it in GitHub Desktop.
Typical rails project installation
#!/bin/bash
# The output of all these installation steps is noisy. With this utility
# the progress report is nice and concise.
function install {
echo installing $1
shift
apt-get -y install "$@" >/dev/null 2>&1
}
#image magick
install imagemagick libmagickwand-dev
#postgres
install PostgreSQL postgresql postgresql-contrib libpq-dev
sudo -u postgres createuser --superuser vagrant
# rvm
\curl -sSL https://get.rvm.io | bash -s stable --ruby=2.1.1
install Git git
install Redis redis-server
# elasticsearch
echo "install elasticsearch"
sudo add-apt-repository ppa:webupd8team/java
apt-get update
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections
apt-get install oracle-java7-installer -y
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.2.deb
dpkg -i elasticsearch-1.3.2.deb
# start elasticsearch
/etc/init.d/elasticsearch start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment