Skip to content

Instantly share code, notes, and snippets.

@blackjk3
Last active August 29, 2015 14:01
Show Gist options
  • Save blackjk3/ba461b3c8e1a30637ac3 to your computer and use it in GitHub Desktop.
Save blackjk3/ba461b3c8e1a30637ac3 to your computer and use it in GitHub Desktop.
Mongo Install
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update
sudo apt-get install mongodb-org
# Running Mongo
service mongod start
sudo /etc/init.d/mongod start
# Stopping Mongo
service mongod stop
sudo /etc/init.d/mongod stop
# Restarting Mongo
services mongod restart
sudo /etc/init.d/mongod restart
# Monit Setup for Mongo
check process mongodb with pidfile /var/lib/mongodb/mongod.lock
start program = "/usr/bin/env service mongod start"
stop program = "/usr/bin/env service mongod stop"
# Run Indexes on collections
bundle exec rake db:mongoid:create_indexes
# Migrate all alerts to mongo
bundle exec rake omgtransit:migrate_alerts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment