Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Database \ MongoDB configuration in Ubuntu 14.04     - Mounting Windows shared directory system under the Linux (Linux)

- Compression decompression command under Linux (Linux)

- Install Firefox 32 official version of the Linux system (Linux)

- The simple multi-threaded Python (Programming)

- rsync + inotify to achieve real-time synchronization (Server)

- ORA-30926 and MERGE tables empty the temporary occupation problem (Database)

- The OpenGL ES GLFW window structures (Programming)

- To install Docker under CentOS7 (Linux)

- How dependent on Fedora, CentOS, RHEL check RPM packages (Linux)

- OpenSUSE / Linux network configuration (Linux)

- Digital jQuery scrolling effect (Programming)

- Linux user directory (Linux)

- CentOS 6.5 Linux System Customization and Packaging Quick Implementation Script (Linux)

- The Linux role of each directory contents (Linux)

- Grading defense against Linux server attacks (Linux)

- Linux port mapping system (routing and forwarding) (Server)

- MySQL 5.7 perfectly distributed transaction support (Database)

- GNU / Linux system, how to clean up memory space (Linux)

- Vim Getting Started Tutorial (Linux)

- CentOS iptables firewall enabled (Linux)

  MongoDB configuration in Ubuntu 14.04
  Add Date : 2017-08-31      
  I'm on a virtual machine VirtualBox installed Ubuntu 14.04, then encountered an error when deploying MongoDB.


System: Ubuntu (amd64 server version) on VirtualBox, memory 256MB, dual-core CPU.
Hard disk: 8GB ext4 file system (.vdi), has spent 64.5%
Internet connection is available, the software has been updated source

Mongo-server installation

$ Sudo apt-get install mongodb-server

After that, the service can not start MongoDB

$ Sudo service mongodb start #why error?

Restart the virtual machine more than once, delete the profile and reload mongo-server repeatedly

$ Sudo apt-get remove -purge mongodb-server

$ Sudo apt-get install mongodb-server



View profile /etc/mongodb.conf, according to which the information traced to several directories, suspicious items are being given:

Space is not enough, suggesting the use of parameters --smallfiles
Log directory enough authority, denied access
Adjust up is still relatively cumbersome.

Try to manually start the process mongod, newspaper space and permissions error

$ Mongod -f /etc/mongodb.conf # permission error

$ Sudo mongod -f /etc/mongodb.conf # lack of space

Checked the / etc / group and / etc / passwd, has MongoDB related items, it indicates the MongoDB account has been created.

trade off:

Directly modify the default log directory and file permissions data may still be a problem. I do not want to tangle on the directory permissions hierarchy. The / etc / passwd know, MongoDB home in / home / mongodb.


Establish MongoDB home, and give it property

$ Sudo mkdir -p / home / mongodb

$ Sudo chown mongodb: mongodb / home / mongodb

Adjust the configuration file, point to the home, with parameters

$ Sudo vim /etc/mongodb.conf


dbpath = / home / mongodb

logpath = / home / mongodb / mongo.log

smallfiles = true


Reboot again. After drying this adjustment, we have been able to properly maintain MongoDB service

$ Sudo service mongodb [start | restart | status]
- Linux account management add relevant directives (Linux)
- Ubuntu 14.04 LTS to compile the source code Android4.4.2 (Linux)
- The Concept and Semantics of Java Memory Model (Programming)
- Win7 + Ubuntu Kylin + CentOS 6.5 installed three systems (Linux)
- numpy and SciPy installation under Python for scientific computing package (Linux)
- Create several practical points of high security PHP site (Linux)
- To create a file in Linux directory by setfacl (Linux)
- Zypper command for SUSE Linux package management (Linux)
- Download Google Android source code under Ubuntu 4.4 (Linux)
- ASM learning overview (Database)
- Ubuntu how to install and use Objective-C (Linux)
- Sublime Text 3 shortcuts summary (Linux)
- How the program is executed (Programming)
- Red-black tree in C ++ (Programming)
- 64-bit Windows Server 2012 R2 install Oracle 10g Second Edition (Database)
- Based kubernetes Construction Docker Cluster Management Comments (Server)
- Git version rollback (Linux)
- MySQL various log summary (Database)
- Java String and StringBuffer and StringBuilder Comments (Programming)
- The compiler installed Kaldi under Ubuntu 12.04 (Linux)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.