Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Database \ MongoDB configuration in Ubuntu 14.04     - Python data types summary (Programming)

- Tomcat session clustering and server session (Server)

- Oracle data files deleted recover after physical (Database)

- SYN attack hacker attack and defense of the basic principles and prevention technology (Linux)

- Linux Getting Started tutorial: XWindow what (Linux)

- Oracle Bug caused by the collection of AWR Snapshot fault (Database)

- Zabbix Agent for Linux Installation and Configuration (Server)

- How Oracle implements random reads from specific combinations (Database)

- PPA on Ubuntu Linux installation Plank 0.8.0 (Linux)

- About Nginx 7 (Server)

- HDFS Hadoop Distributed File System Works (Server)

- Mounting kit under Fedora Linux (Linux)

- Using the Linux folder wc statistics number of lines of code for all files (including subdirectories) (Linux)

- Objective-C basic program structure (Programming)

- Getting CentOS Learning Notes (Linux)

- Docker study notes (Server)

- Use XtraBackup be physical standby database MySQL (Database)

- Ubuntu uses under KVM + Qemu virtual machine build (Linux)

- Linux_Logo - output color ANSI Linux distributions logo command-line tool (Linux)

- 64 Ubuntu 15.04 Linux kernel upgrade to Linux 4.1.0 (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]
- Copy and paste in Linux terminal and Vim (Linux)
- Advanced network security tips Linux backdoor Technology and Practice (Linux)
- For the FreeBSD install Adobe Flash plug-in (Linux)
- Adjust the size of the hard disk VirtualBox (Linux)
- To compile and install MySQL 5.7.7 RC under CentOS 7.1 (Database)
- Debian 8 (amd64) installation deployment Memcached management tools MemAdmin (Server)
- Depth study and understanding for individual users suicide DDoS attacks (Linux)
- Monitor log file (listener.log) (Database)
- Oracle 11g creates virtual private directory RMAN-06004 ORA-00942 error handling (Database)
- Java coding conventions (Programming)
- Disk partition MBR (Linux)
- Ubuntu 15.04 and CentOS 7 to deploy .NET, Mono and DNX (Server)
- Debian 7.8 system installation and configuration process (Linux)
- To delete the directory and all specified files under the Mac (Linux)
- RedHat Linux 7 build yum source server (Server)
- Ubuntu Slingscold (Linux)
- Sublime Text 3 (Linux)
- Nginx version of helloworld (Server)
- CentOS 6.4 under PXE + Kickstart unattended operating system installation (Programming)
- Difference in MySQL VARCHAR and CHAR data format (Database)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.