Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ MongoDB configuration in Ubuntu 14.04     - Java Graphics2D Paint (Programming)

- CentOS network configuration 7, and set the host name and IP-bound problems (Linux)

- Linux operating system set up to effectively prevent ARP attacks (Linux)

- How to use scientific data Docker quickly configure the development environment (Server)

- Nginx reverse proxy and self-signed https (Server)

- Install Redis 2.6 5.5 32 position CentOS error resolved (Linux)

- How to release the cache memory on Linux (Linux)

- Node.js developers must know four JavaScript concepts (Programming)

- Shell Scripting Interview Questions (Programming)

- Linux modify environment variables method (Linux)

- Linux Security Raiders SSH tools SCP uses examples to explain in detail (Linux)

- Oracle create user authorization and in PLSQL (Database)

- How to install Nginx on FreeBSD 10.2 as an Apache reverse proxy (Server)

- Android Studio interface-related settings (Linux)

- KVM add virtual disks (Linux)

- Use Epoll develop high-performance application server on Linux (Server)

- rpm package specify the installation path (Linux)

- MySQL use benchmarking tool sysbench (Database)

- ElasticSearch basic usage and cluster structures (Server)

- Linux platform host to prevent hacking skills (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.

surroundings:

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
problem:

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

invalid.

analysis:

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.


method:

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]
     
         
       
         
  More:      
 
- Some practical tips Linux (Linux)
- Red Hat Enterprise Linux Server 6.5 installation GCC 4.9.2 (Linux)
- CentOS system dual network card IP information configuration (Linux)
- Let OpenCV face detection score output codes (Programming)
- CentOS 6.6 install JDK7 (Linux)
- FreeBSD install Gnome 3 Desktop (Linux)
- ARM Linux system call (Linux)
- HTML5 Fundamentals study notes (Programming)
- On Android running ClojureScript (Linux)
- Related to optimize the use of Btrfs file system on SSD (Linux)
- OS X CAOpenGLLayer how to enable OpenGL 3.2 core profile (Programming)
- CentOS install video converter FFmpeg and cutting tools segmenter (Linux)
- Flow control message transmission between RAC (Database)
- Linux environment installation of rvm and ruby (Linux)
- OpenGL shadow map (Programming)
- systemd-nspawn Quick Guide (Linux)
- Linux iostat command example explanation (Linux)
- CentOS 7 source code to compile and install PHP5.6 Nginx1.7.9 and MySQL (LNMP build environment) (Server)
- Linux Firewall Basics (Linux)
- Create, modify, delete users, user groups under linux (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.