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: