[Aaronyang] Nodejs learning-mongodb[1]

Source: Internet
Author: User
Tags brew install mongodb create directory install homebrew install mongodb administrator password

    1. 1. Provision and installation of resources (Ayjs.net)
    2. Learning instructions: Nodejs is still operating in a non-Windows environment, so everything is
    3. Current time: December 06, 2014 Aaronyang
    4. Website address: www.mongodb.org
    5. Document reference Address: http://docs.mongodb.org/manual
    6. Current mongodb-osx-x86_64-2.6.5.gz: Baidu Cloud Download extract password: Azoa
    7. Code installation: (seemingly more than 100 trillion, and the official website is relatively slow)
    8. Mode 1:
    9. Open the terminal, we first install homebrew
    10. ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    11. Then press any key, enter the administrator password, and then enter to start downloading and installing the
    12. Update Homebrew:brew Update
    13. Brew mode installation Mongo:brew Install MongoDB
    14. or the latest version (including tested) brew install Mongodb-devel
    15. or compile the brew install MongoDB--with-openssl through the source code
    16. Mode 2:
    17. Curl-o http://downloads.mongodb.org/osx/mongodb-osx-x86_64-2.6.4.tgz
    18. Decompression extraction
    19. TAR-ZXVF mongodb-osx-x86_64-2.6.5.tgz
      1. 2. Install (I am using the download from the official website)
      2. I created a new soft folder on the desktop, put the extracted files into the soft folder, into the soft inside.
      3. 2.1 Copy the extracted files to the directory you want to run
      4. reference:
         mkdir-p mongodbcp-r-n mongodb-osx-x86_64-2.6.5/mongodb 

        my: /p>

      5.  mkdir-p mongodbcp-r-n/users/aaronyang/desktop/soft/mongodb-osx-x86_64-2.6.5/mongodb 
        Tip: Novice Mac users, may not know how to get the file path in the terminal, you just put the folder into the terminal inside a drag and drop to get the path.
      6. 2.2 Ensure that the PATH variable has a location for the binaries
      7.  export path=mongodb/bin: $PATH; 
      8. 3. Running MongoDB
      9. 3.1 Specify the data directory
      10. by default, the directory where the Mongod process runs is/data/db
      11. Create directory: Mkdir-p/data/db
      12. If you specify a different directory, for example, I create a new data in the MongoDB folder
      13. then open terminal   Mongod-dbpath/users/aaronyang/mongodb/data
      14. file directory, I directly drag the data folder to the terminal interface automatically generated
      15. 3.2 To ensure that the current user, the Mongod process can read and write to the Data folder
      16. 3.3 Run Mongod with no path parameter, default data read and write in/data/db
      17. 3.4 Stop Mongod, terminal class   Press CTRL + C key
      18. 4. Start your journey
      19. official documentation, start learning, or use other techniques, such as Java,.net,nodejs, to perform operations equivalent to MONGO terminal
5. This article right only left www.ayjs.net, not allowed reprint!!!!

[Aaronyang] Nodejs learning-mongodb[1]

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.