The installation of MongoDB

Source: Internet
Author: User

Say I this period of time, did not come to the blog Park, on the one hand is my company's project forcing himself really no energy, in addition to this part of my mood is not too good.

This period of time, or seriously read the majority of MySQL content, but also left a part of the MySQL operation of the part did not learn, this first put it. I'm going to lecture next week, the content is thinkphp's explanation. Around the colleagues, are very familiar with thinkphp, really do not know what to say. But since I have volunteered for the stage, then you have to do some preparatory work.

Ready to take a quick tour of some thinkphp's source code execution process, and then talk about some common operations: such as Memcache, Redis, MySQL, mong0db.

So take it for granted that MongoDB is the first to start MongoDB. As for the depth of things, then slowly intervene again.

Install the tutorials online with a lot of catching.

In fact, the general process is just the few:

1, download MongoDB source code or binary package.

2, the compilation or directly decompression.

3, create the database directory, and log directory.

4. Start MongoDB in the daemon process.

5, added to the system to open the startup directory.

6. Add the command that starts MONGO to the system constant, or an alias.

Gee, this is a six-vein sword.

1, the source package can directly visit MongoDB's official website. Https://www.mongodb.org/downloads#production

Not FQ friends, estimated download speed slow into a dog. Http://www.mongoing.com/downloads Chinese official website, download it yourself.

2. After downloading, I put it under my use/local.

Use TAR-ZXF to unzip the downloaded file and rename the folder using the MV command.

3. Mkdir-p Data

Mkdir-p Logs/log.txt

4. Switch to the bin directory and execute

./mongod--dbpath=/usr/local/mongodb/data--logpath==/usr/local/mongodb/logs/log.txt--logappend&

5. Then add the command just now in etc/rc.local to the open startup item.

6, write aliases. Vim ~/.BASHRC gives us a friendly name for the start command.

The installation of MongoDB

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.