MongoDB

De Wiki LOGre
Aller à : navigation, rechercher


  • Compilation (TRES LONG)
sudo apt-get install git-core build-essential scons libpcre++-dev xulrunner-dev libboost-dev libboost-program-options-dev libboost-thread-dev libboost-filesystem-dev
git clone https://github.com/skrabban/mongo-nonx86
cd mongo-nonx86
scons
sudo scons --prefix=/opt/mongo install
cp debian/mongodb.conf /etc/
cp debian/init.d /etc/init.d/mongod
chmod a+x /etc/init.d/mongod
PATH=$PATH:/opt/mongo/bin/
export PATH
  • Configuration
sudo adduser mongodb
# for the mongodb data files:
sudo mkdir /var/lib/mongodb
# for the log files:
sudo mkdir /var/log/mongodb
sudo chown -R mongodb /var/lib/mongodb/
sudo chown -R mongodb /var/log/mongodb/
  • Editer /etc/init.d/mongod
...
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/mongo/bin
DAEMON=/opt/mongo/bin/mongod
...
DAEMON_OPTS="$DAEMON_OPTS --config $CONF --rest"
  • Demarrage
sudo /etc/init.d/mongod start
  • Administration
http://ip_raspberry:28017/