Skip to content

Instantly share code, notes, and snippets.

@doabit
doabit / ElasticSearch.sh
Created October 29, 2016 08:20 — forked from ricardo-rossi/ElasticSearch.sh
Installing ElasticSearch on Ubuntu 14.04
#!/bin/bash
### USAGE
###
### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7
### ./ElasticSearch.sh will fail because no version was specified (exit code 1)
###
### CLI options Contributed by @janpieper
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch
# On Mavericks (same for 10.6+) the biggest issue is that port 5432 is already taken so
# this: --- config.vm.network "forwarded_port", guest: 5432, host: 5433' ---
# should go on 'Vagrantfile' and then you use port 5433 to connect through pgadmin3
echo >&2 "===CUSTOM-MSG=== Setup THE DATABASE"
# installs postgresql database and creates "vagrant" superuser with password "somepass".
sudo apt-get -y install postgresql postgresql-client libpq-dev
echo >&2 "===CUSTOM-MSG=== Create role and login"
module Devise
module Orm
module MongoMapper
module Hook
def devise_modules_hook!
extend Schema
include Compatibility
yield
return unless Devise.apply_schema
devise_modules.each { |m| send(m) if respond_to?(m, true) }