Skip to content

Instantly share code, notes, and snippets.

@mansurali901
Last active January 3, 2018 07:12
Show Gist options
  • Save mansurali901/e2c6ecfd19c09ed8bbfec2b5c13f482b to your computer and use it in GitHub Desktop.
Save mansurali901/e2c6ecfd19c09ed8bbfec2b5c13f482b to your computer and use it in GitHub Desktop.
Setting up Mongo 3.4 precompiled binaries
#!/bin/bash
# This script install Redis 4 in RHEL7 / Ubuntu
# This installation is done from source code.
# Author : Mansur Ul Hasan
# Email : [email protected]
#
apt-get update -y
apt-get install libssl1.0.0 libssl-dev -y
mkdir -p /usr/local/mongo/
cd /usr/local/mongo/
wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-amazon-3.4.10.tgz
tar -xvf mongodb-linux-x86_64-rhel70-3.4.10.tgz
cd mongodb-linux-x86_64-rhel70-3.4.10
ln -s `pwd`/bsondump /usr/bin/bsondump
ln -s `pwd`/mongodump /usr/bin/mongodump
ln -s `pwd`/mogoexport /usr/bin/mongoexport
ln -s `pwd`/mongofiles /usr/bin/mongofiles
ln -s `pwd`/mongoimport /usr/bin/mongoimport
ln -s `pwd`/mongooplog /usr/bin/mongooplog
ln -s `pwd`/mongooperf /usr/bin/mongooperf
ln -s `pwd`/mongoreplay /usr/bin/mongoreplay
ln -s `pwd`/mongorstore /usr/bin/mongorestore
ln -s `pwd`/mongos /usr/bin/mongos
ln -s `pwd`/mongostat /usr/bin/mongostat
ln -s `pwd`/mongotop /usr/bin/mongotop
ln -s `pwd`/mongod /usr/bin/mongod
mkdir -p /data/db
mongod --fork --dbpath /data/db --logpath /var/log/mongo/mongod.log --logappend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment