summaryrefslogtreecommitdiffstats
path: root/utils/mongodb
diff options
context:
space:
mode:
authorhongbotian <hongbo.tianhongbo@huawei.com>2015-10-13 05:08:32 -0400
committerhongbotian <hongbo.tianhongbo@huawei.com>2015-10-13 06:13:57 -0400
commitdc6e36c404cf987a877c26b40ade6492798fab90 (patch)
treeabf397e9247d39d5a5070164da63e481e1ba76bd /utils/mongodb
parentafe342c84b702c7229e17f27e5c592372fc69491 (diff)
MongoDB installation
JIRA: BOTTLENECK-10 Change-Id: I461267314c1e6cb7ca19fe82231b620ad2a61c21 Signed-off-by: hongbotian <hongbo.tianhongbo@huawei.com>
Diffstat (limited to 'utils/mongodb')
-rw-r--r--utils/mongodb/Mongodb_Ubuntu_install.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/utils/mongodb/Mongodb_Ubuntu_install.sh b/utils/mongodb/Mongodb_Ubuntu_install.sh
new file mode 100644
index 00000000..c11921cd
--- /dev/null
+++ b/utils/mongodb/Mongodb_Ubuntu_install.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+##############################################################################
+# Copyright (c) 2015 Huawei
+# hongbo.tianhongbo@huawei.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+#import the public ke used by the package managment system
+sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
+
+#create a list for MangoDB
+#for Ubuntu 12.04
+#echo "deb http://repo.mongodb.org/apt/ubuntu precise/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
+
+#for Ubuntu14.04
+echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
+
+#Reload local pachage database
+sudo apt-get update
+
+#install the MongoDB for the latest stable version
+sudo apt-get install -y mongodb-org
+
+#start MongoDB
+sudo service mongod start
+
+#try test
+# mongo