Guest User

Untitled

a guest
May 25th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. MongoDB Manual Installation on Ubuntu
  2. --------------------------------------
  3.  
  4. * Download Tarball File
  5. * Extract in /usr/local/mongodb
  6. * set <mongodb_installation_directory>/bin to PATH in ~/.profile
  7. * PATH=/usr/local/mongodb/bin:$PATH
  8. * export PATH
  9. * Create directories and cnf file
  10. * /usr/local/mongodb/data/log
  11. * /usr/local/mongodb/data/db
  12. * /usr/local/mongodb/conf
  13. * /usr/local/mongodb/conf/mongod.cnf
  14.  
  15. * Add Configuration in /usr/local/mongodb/conf/mongod.cnf
  16. systemLog:
  17. destination: file
  18. path: c:\data\log\mongod.log
  19. storage:
  20. dbPath: c:\data\db
  21. security:
  22. authorization: enabled
  23. * Start mongodb server
  24. * mongod --config /usr/local/mongodb/conf/mongod.cnf
  25. * Start mongodb server in background
  26. * mongod --fork --config /usr/local/mongodb/conf/mongod.cnf
  27.  
  28.  
  29.  
  30. * Adding mongodb server on ubuntu at startup
  31.  
  32. Create:
  33. ------------------
  34. vim /etc/mongodb.sh
  35.  
  36. Write
  37. ------------------
  38. #!/bin/sh
  39. /usr/local/mongodb/bin/mongod --fork --config /usr/local/mongodb/conf/mongod.cnf
  40.  
  41. Permit
  42. ------------------
  43. sudo chmod +x /etc/mongodb.sh
  44.  
  45.  
  46.  
  47.  
  48. Create
  49. ------------------
  50. vim /etc/rc.local
  51.  
  52. Write
  53. ------------------
  54. #!/bin/sh -e
  55. sh '/etc/mongodb.sh'
  56. exit 0
  57.  
  58.  
  59. Permit
  60. ---------------------------
  61. sudo chmod +x /etc/rc.local
  62.  
  63.  
  64.  
  65.  
  66. *Install Client:
  67. sudo apt-get install mongodb-clients
  68.  
  69.  
  70. Ubuntu Help
  71. -------------------------------
  72. Find Process by name:
  73. -------------------------------
  74. ps aux | grep -i <process_name>
  75.  
  76.  
  77. Kill Process by ID
  78. -------------------------------
  79. sudo kill -9 <PID>
Add Comment
Please, Sign In to add comment