Merge "Change PTL informatin in INFO"
[bottlenecks.git] / utils / mongodb / Mongodb_Ubuntu_install.sh
1 #!/bin/bash
2
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 ##############################################################################
11
12 #import the public ke used by the package managment system
13 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
14
15 #create a list for MangoDB
16 #for Ubuntu 12.04
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
18
19 #for Ubuntu14.04
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
21
22 #Reload local pachage database
23 sudo apt-get update
24
25 #install the MongoDB for the latest stable version
26 sudo apt-get install -y mongodb-org
27
28 #start MongoDB
29 sudo service mongod start
30
31 #try test
32 # mongo