Created
January 23, 2020 14:51
-
-
Save sarjarapu/f3b4e3a4bb97db02d96bde372673408c to your computer and use it in GitHub Desktop.
A bash script to download and install MongoDB v4.2.2 enterprise on my Mac
This file contains 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
# TODO: Update the BASE_DIR to your favorite directory | |
BASE_DIR=/Users/shyam/code/personal/mdb/fle/build | |
VERSION="4.2.2" | |
# TODO: Change the binaries to your OS flavor | |
# Download and extract the v4.2 enterprise binaries | |
cd ${BASE_DIR} | |
curl -OL "https://downloads.mongodb.com/osx/mongodb-macos-x86_64-enterprise-${VERSION}.tgz" | |
tar -xzf mongodb-macos-x86_64-enterprise-${VERSION}.tgz | |
rm -f mongodb-macos-x86_64-enterprise-${VERSION}.tgz | |
mv mongodb-macos-x86_64-enterprise-${VERSION} "v${VERSION}-ent" | |
MONGO_BIN=${BASE_DIR}/v${VERSION}-ent/bin | |
DB_PATH=${BASE_DIR}/data | |
LOG_PATH=${BASE_DIR}/data/mongod.log | |
# Start the v4.2 server | |
mkdir -p ${DB_PATH} | |
${MONGO_BIN}/mongod --port 28000 --dbpath ${DB_PATH} --logpath ${LOG_PATH} --fork |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment