File tree 1 file changed +2
-16
lines changed
1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
#
3
- # Installs MongoDB from 10gen.com repository .
3
+ # Installs MongoDB.
4
4
#
5
5
# Copyright (c) 2010 Filip Wasilewski <[email protected] >.
6
6
#
7
7
# My ref: http://www.linode.com/?r=aadfce9845055011e00f0c6c9a5c01158c452deb
8
8
9
- function system_configure_mongodb_repository {
10
- RELEASE=` lsb_release -sr | sed ' s/\.0/\./' `
11
- echo -e " \n##MongoDB repository by 10gen\ndeb http://downloads.mongodb.org/distros/ubuntu $RELEASE 10gen\n" >> /etc/apt/sources.list
12
- apt-key adv --keyserver pgp.mit.edu --recv 7F0CEB10 || apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
13
- aptitude update
14
- }
15
9
16
10
function mongodb_install {
17
- BASE_DIRECTORY=$1 # /var/lib or /srv
18
- aptitude -y install mongodb-stable
19
- if [ -n " $BASE_DIRECTORY " ]; then
20
- DATA_DIRECTORY=" $BASE_DIRECTORY /mongodb"
21
- mkdir -p " $DATA_DIRECTORY "
22
- chown mongodb:mongodb " $DATA_DIRECTORY "
23
- sed -i " s:dbpath=.*:dbpath=$DATA_DIRECTORY :" /etc/mongodb.conf
24
- fi ;
25
- touch /tmp/restart-mongodb
11
+ aptitude -y install mongodb
26
12
}
You can’t perform that action at this time.
0 commit comments