Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Database \ MongoDB configuration in Ubuntu 14.04     - Python 3.5 will support Async / Await Asynchronous Programming (Programming)

- Debian 8.2.0 (Jessie) fast clean installation tutorial (Linux)

- Docker: Mirroring and container operations (Server)

- Linux system monitoring, top command of the diagnostic tool Detailed (Linux)

- Copy U disk files to the Linux system on a virtual machine (Linux)

- CentOS 6.5 install VNC-Server (Linux)

- JavaScript object - Flexible and dangerous (Programming)

- IOwait Linux system monitoring diagnostic tools (Linux)

- How to add a new hard disk without restarting the CentOS 7 / RHEL 7 virtual machine (Linux)

- Linux character device - user mode and kernel mode data transfer data (Linux)

- Spring WebSocket Comments (Programming)

- echo command (Linux)

- How to deploy Icinga client (Server)

- Linux remote wake the computer original code [C] (Linux)

- RHEL5 / 6 Installation Notes (Linux)

- Ubuntu the ARP (arptables) (Linux)

- Linux dynamic libraries and Guide (Programming)

- Normal start Lazarus 1.0.8 under Ubuntu (Linux)

- How to upgrade the kernel to 3.13.7 on Ubuntu / Linux Mint (Linux)

- To install Scribus 1.4.4 under ubuntu (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]
- Ubuntu disable graphics card (Linux)
- CentOS / Debian configuration Gitlab 7.1x to build self Git repository (Linux)
- JDK installation and configuration environment variable under linuxb (Linux)
- Into the Java keyword instanceof (Programming)
- Build Docker based MongoDB replication cluster environment (Database)
- Java reflection technology explain (Programming)
- How to install with JSON support in Ubuntu 15.04 SQLite 3.9.1 (Database)
- Let CentOS perform PPPoE dial-up, ADSL can be used in a network environment! (Linux)
- Squid proxy server (Server)
- Configuring a Linux operating system security management services Explain (Linux)
- Integrated security administrator Linux accident management (Linux)
- How to configure a server in a MySQL Cluster (Database)
- Create RAID 1 (mirroring) with two disks (Linux)
- Simple and fast sorting (Programming)
- Kafka + Log4j log implement centralized management (Server)
- Linux firewall to prevent external network attacks (Linux)
- The FreeBSD zfs: failed with error 6 Error Resolution (Linux)
- Ubuntu 14.04 install the NVIDIA driver + CUDA + MATLAB (Linux)
- Ease of use "Explain Shell" script to understand Shell command (Linux)
- Linux installed PCRE (Linux)
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.