3 ##############################################################################
4 # Copyright (c) 2015 Huawei
5 # hongbo.tianhongbo@huawei.com
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Apache License, Version 2.0
8 # which accompanies this distribution, and is available at
9 # http://www.apache.org/licenses/LICENSE-2.0
10 ##############################################################################
12 #import the public ke used by the package managment system
13 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
15 #create a list for MangoDB
17 #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
20 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
22 #Reload local pachage database
25 #install the MongoDB for the latest stable version
26 sudo apt-get install -y mongodb-org
29 sudo service mongod start