Programming, science, engineering, and more…
RSS icon Home icon English Spanish
  • Installing MongoDB and php driver in Ubuntu 10.10

    Posted on {10-May-2011} Frank Vielma No comments

    MongoDB is a NoSQL (“not only sql”), a non-relational, distributed, open-source, horizontal scalable and document-oriented database written in the C++. It doesn’t have transactions, ACID compliance, joins, foreign keys, or many of the other features belonging to relational database management system (RDBMS). The database is document-oriented so it manages collections of JSON-like documents.

    One of the most important feature is than MongoDB scaling very well.

    Installation.

    • Step 1. Adding the ubuntu repository:
      sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10

      add at the end of the /etc/apt/sources.list file:

      deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
    • Step 2. Installing mongodb
       sudo aptitude update && sudo aptitude install mongodb-10gen
    • Step 3. Verifying installation:
      mongo --version
      MongoDB shell version: 1.8.1
    • Step 3. Now, we will installing the PHP driver:
      sudo aptitude install php5-dev php5-cli php-pear && sudo pecl install mongo

      add the dynamic library mongo.so at the end of the php.ini (/etc/php5/apache2/php.ini) file:

      extension=mongo.so
    • Step 4. Restart apache and verify if all is ok running the phpinfo() function:
      sudo /etc/init.d/apache2 restart

    mongodb

    More info

    Comments are closed.

best web hosting