MongoDB binary installation and configuration
MongoDB 1.6.5 x64
Ubuntu 10.10x64
Download
Http://www.mongodb.org/downloads
Linux 64-bit is a compiled package, which can be decompressed
Unzip and install
Decompress the package to/usr/local/mongodb-1.6.5 and link/usr/local/MongoDB.
Shell code
- $ Tar-zxvf mongodb-linux-x86_64-1.6.5.tgz
- $ Sudo MV mongodb-linux-x86_64-1.6.5/usr/local/mongodb-1.6.5
- $ Sudo ln-S/usr/local/mongodb-1.6.5/usr/local/MongoDB
Configure users and directories
Shell code
- $ Sudo useradd-r MongoDB
- # Log File Path
- $ Sudo mkdir/var/log/MongoDB
- # Data file path
- $ Sudo mkdir/var/lib/MongoDB
- $ Sudo chown MongoDB/var/lib/MongoDB
Use the configuration file
Please download the configuration file here. The automation corner is not complete yet. Do not use it for the moment.
Https://github.com/lanvige/mongodb-conf
Shell code
- $ Sudo CP MongoDB/etc/init. d/
- $ Sudo chmod + x/etc/init. d/MongoDB
- $ Sudo CP MongoDB. CONF/etc/
Enable and disable monogodb
Shell code
- $ Sudo/etc/init. d/MongoDB start
- $ Sudo/etc/init. d/MongoDB stop
The following information indicates that the database is successfully installed.
* Starting database MongoDB [OK]
Start
Shell code
- $ Sudo update-rc.d MongoDB ults
Refer:
Http://blog.lxneng.com /? P = 54
Http://www.mongodb.org/pages/viewpage.action? Pageid = 20742427