Changes between Initial Version and Version 1 of mongodb


Ignore:
Timestamp:
Mar 7, 2019, 3:29:20 PM (7 years ago)
Author:
Jamie McClelland
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • mongodb

    v1 v1  
     1= MongoDB =
     2
     3May First/People Link does not officially support mongodb databases and does not make backups of databases created by users. However, if requested, we can setup a mongodb for you.
     4
     5== Admin steps ==
     6
     7 * Install mongodb: `apt install mongodb`
     8 * Login: `mongo mongodb://localhost:27017`
     9 * Add admin user/password (save password in [wiki:keyringer])
     10{{{
     11db.createUser(
     12  {
     13    user: "useradmin",
     14    pwd: "xxxxxxxxxxxxxxxxxxxxxxxxP",
     15    roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]
     16  }
     17)
     18}}}
     19 * Logout (`ctl-d`)
     20 * Edit `/etc/mongodb.conf` and uncomment `auth = true`
     21 * Restart mongodb `systemctl restart mongodb`
     22 * Login again (this time with password) `mongo -u useradmin -p mongodb://localhost:27017`
     23 * Create requested database: `use <dbname>`
     24 * Create user account:
     25{{{
     26db.createUser(
     27  {
     28    user: "<username>",
     29    pwd: "xxxxxxxxxxxxxxxxxxx",
     30    roles: [ { role: "readWrite", db: "<dbname>" } ]
     31  }
     32)
     33}}}
     34 * Create file in user home directory with the credentials.