Install MongoDB in ubuntukylin

Source: Internet
Author: User
Tags install mongodb mongodb server

Install MongoDB in ubuntukylin (refer to the experiences after successful installation of MongoDB in ubuntukylin)
1. Download the installation package from the official website
Http://www.mongodb.org/dr/fastdl.mongodb.org/linux/mongodb-linux-i686-2.4.1.tgz/download

2. decompress the package (note that you must enter the/OPT folder here). We recommend that you obtain the root permission before this operation. You can modify it as follows.

I recently used a package (libpcap) when developing a project. This package can be used for underlying parsing of network streams, but when I want to use this package for network sniffing, the root permission is required and sudo is often used to run the program. In order to facilitate project debugging, the current user is promoted to the root permission.

The method for upgrading is as follows: Enter sudo gedit/etc/passwd in shell to modify the id value of the current user. For example, my current user is chenjieb.

Then you can find chenjieb: X: 1000: 1000: Administrator,:/home. chenjieb:/bin/bash and change the two 1000 values to 0. The final result is:

Chenjieb: X: 0: 0: Administrator,:/home. chenjieb:/bin/bash. At last, the Ubuntu system is logged out. Then, enter your username and password in the login username. In this way, the login is the root permission. This is because the root ID is 0. (See http://blog.csdn.net/chenjieb520/article/details/7316268 for the original article)


When you enter the login page, you may need to enter the user name and login.

 

3. Enter the directory to see what is there

 

4. Go to the bin directory, start the MongoDB server, and specify the directory where the data is stored and the location of the log file (I have created it in advance, and I put it under/etc/data)

 

Logapend indicates that logs support append and are running in the background (You may have to wait until you exit with Ctrl + D and then restart the terminal)


5. Run the client:
 

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.