Skip to content

Instantly share code, notes, and snippets.

@terakilobyte
Created July 11, 2017 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save terakilobyte/39e90e37ed977375d3b71e588b59055a to your computer and use it in GitHub Desktop.
Save terakilobyte/39e90e37ed977375d3b71e588b59055a to your computer and use it in GitHub Desktop.
Install MongoDB on OSX/Linux
# Just copy and paste all of the below. This assumes you've downloaded MongoDB to your ~/Downloads directory!
mkdir ~/MongoDB && find ~/Downloads -name "mongodb-*.tgz" | \
xargs -I@ tar -C ~/MongoDB -xzvf @ --strip-components 1 && \
printf '\n# MongoDB Setup Begin\nMONGODB="$HOME/MongoDB/bin"\nPATH="$PATH:$MONGODB"\n# MongoDB Setup End\n' \
>> `(find $HOME -maxdepth 1 -type f -name "*.zshrc" -o -name "*.bashrc")` \
&& source `(find $HOME -maxdepth 1 -type f -name "*.zshrc" -o -name "*.bashrc")`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment