Browse files

Add mongodb user to start mongodb daemon.

  • Loading branch information...
1 parent 460442c commit 6869cc0390ba5fbb097f4a91919f76a2ba1ed3a9 @huacnlee committed Jul 23, 2012
Showing with 7 additions and 5 deletions.
  1. +7 −5 install_mongodb
@@ -1,14 +1,16 @@
curl -O
tar zxvf mongodb-linux-x86_64-2.0.3.tgz
-mkdir /usr/local/mongodb
-mv mongodb-linux-x86_64-2.0.3/bin /usr/local/mongodb/
+sudo mkdir /usr/local/mongodb
+sudo mv mongodb-linux-x86_64-2.0.3/bin /usr/local/mongodb/
+sudo ln -s /usr/local/mongodb/bin/mongo* /usr/local/bin/
rm -R mongodb-linux-x86_64-2.0.3
+sudo useradd mongodb
sudo cp mongodb /etc/init.d/
sudo mkdir /var/lib/mongodb
+sudo chown -R mongodb /var/lib/mongodb
sudo mkdir /var/log/mongodb
-sudo mkdir /data
-sudo mkdir /data/db
+sudo chown -R mongodb /var/log/mongodb
sudo update-rc.d mongodb defaults
echo "Mongodb 2.0.3 install successed."
-echo "-------------------------------------------------------------------"
+echo "-------------------------------------------------------------------"

0 comments on commit 6869cc0

Please sign in to comment.