GithubHelp home page GithubHelp logo

barryrowe / mongo-arm Goto Github PK

View Code? Open in Web Editor NEW
65.0 9.0 19.0 24.09 MB

This is a distribution of the MongoDB binaries built for the ARM architecture. Specifically these were built to run MongoDB on a Raspberry Pi.

License: MIT License

C++ 97.99% C 1.24% Shell 0.70% Objective-C 0.07%

mongo-arm's Introduction

NOTE August 24th, 2016: I was informed today that the JIRA ticket listed below in the last note has been resolved, and that official 64-bit ARM support will be coming in v3.4. It looks like you can find current binaries in the comments of the JIRA ticket here It does appear that only a 64-bit version is available (and my only ever be available) so take this into account if you're targeting a platform that is only 32-bit.

NOTE January 7th, 2015: I have not been actively working on this project, and realize the binaries are quite old (v2.1.1). I started this as a proof of concept, and have stopped work on the project it supported. The MongoDB team is working on ARM support, but it relies on several large core-unit refactors or re-writes. You can view the status on their JIRA ticket here: MongoDB Support for ARM JIRA Ticket

MongoDB for ARM

This is a distribution of the MongoDB binaries built for the ARM architecture. Specifically these were built to run MongoDB on a Raspberry Pi. This was tested and built using a Model B Pi running Raspbian Wheezy 3.6.11+ Available for Download Here

I can only take credit for compiling these instructions in one place, and providing a compiled set of binaries. These binaries and instructions are based on information from the following links:

Compiling MongoDB

Building MongoDB on the Raspberry Pi - mongopi

Setting Up MongoDB as A Service

Issues

  • The mongo shell causes Segmentation Fault errors when running "show dbs;" and sometimes when querying collections. NOTE: the pymongo driver is tested and works well against this installation process. It appears only the shell has this issue.

Installation Steps:

  1. Download binaries

    #Clone this repository
    git clone https://github.com/Barryrowe/mongo-arm.git
  2. Create the mongo user

    sudo useradd mongo
    sudo passwd mongo
  3. Copy the mongo binaries to the desired install location

    #example:
    cp -R binaries/2.1.1 /opt/mongo
  4. Change the ownership of the installed mongo binaries so they are owned by the mongo user

    chown -R mongo:mongo /path/to/installed/binaries
  5. Creat the /data/db directory for MongoDB's data storage

    sudo mkdir /data
    sudo mkdir /data/db
  6. Change the ownership of the /data/db directory so it is owned by the mongo user

    sudo chown mongo:mongo /data/db

Set As Service Steps (Debian)

  1. Copy config/mongodb to the init.d location

    sudo cp config/mongodb /etc/init.d/mongodb
  2. Update /etc/init.d/mongodb to point to your install path from step 3

    A. Line 50 will need to be modified to point to the mongos executable from your install path in step 3.

    B. If you created a user with name other than "mongo" in step 2 you will need to update Line 95 with the user you configured.

  3. Update the permissions for the mongodb init.d file so it can be executed

    sudo chmod 755 /etc/init.d/mongodb
  4. Copy the config/mongod.conf file to /etc/mongod.conf

    sudo cp config/mongod.conf /etc/mongod.conf
  5. Register the mongodb service

    sudo update-rc.d mongodb defaults
  6. Startup the service

    sudo service mongodb start

Managing MongoDB After Install and Setting as Service

Once installed and configured, you can use these commands to manage the mongodb service you've setup.

#start the service
sudo service mongodb start

#check the service status
service mongodb status

#stop the service
sudo service mongodb stop

If your mongodb service won't start you might just get output like this:

....] Starting database: mongod/etc/init.d/mongodb: 131: ulimit: Illegal option -u
numactl: 
daemuser: mongo
pidfile: /var/run/mongod.pid
daem: /opt/mongo/bin/mongod
daemopts: -- --config /etc/mongod.conf
. failed

NOTE: In this case, make sure to check the /data/db/ directory for a file mongod.lock. If mongodb isn't stopped cleanly, the mongod process can leave this lock file in place preventing the service from properly starting. Usually you can just remove the file and mongodb will start normally

#remove mongod.lock file after unclean shutdown
sudo rm /data/db/mongod.lock

mongo-arm's People

Contributors

barryrowe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mongo-arm's Issues

Please add a note indicating that MongoDB now offers ARMv8-A support

The ticket you mentioned, https://jira.mongodb.org/browse/SERVER-1811, has been resolved in the latest development version of MongoDB, 3.3.11. Please see the most recent comments in that tickets for details on where to obtain the development release. Official support will arrive in MongoDB 3.4 GA, expected later this year.

I'm not familiar enough with the current happenings in the Pi space to know, but my understanding is that more recent models can run 64-bit ARM binaries.

If that is true, and especially if you are no longer currently maintaining this, would you mind updating your README to reflect the new status? This page is highly ranked for google queries related to "mongodb arm", and I think it would be useful to get the word out about the work that we have done.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.