Install and configure MongoDB

As FrameMaker Publishing Server uses MongoDB for data storage, you need a working setup of MongoDB on your system before installing FMPS.

To install MongoDB, perform the following steps:

Important: Before installing FrameMaker Publishing Server or any update, clean the MongoDB instance. This is required to fix some critical security issues.
  1. Download MongoDB Community Server version 5.0 or 4.0.19 from the official website:

    https://www.mongodb.com/try/download/community

    Note: You can find the download link either in the Available Downloads section or the Archived Releases section.
  2. Configure the MongoDB Service as follows:

    • Service Name: MongoDB (keep the default name)

    • Data Directory: Any directory outside the Program Files folder where all programs and users would have the read and write access.

    • Log Directory: Specify a directory to store the logs.

  3. Configure the IP address of the MongoDB Service in the mongod.cfg file. By default, the mongod.cfg file is available in the following location:

    <Drive>:\MongoDB\Server\<version>\bin\

    Change the default IP address from 127.0.0.1 to 0.0.0.0. This will ensure that MongoDB can be accessed from any other system by using the host system’s IP address and port.

  4. Create the default user account with administrative privileges to access MongoDB.

    To create the basic user account, run the following commands:

    1. Open the command prompt.

    2. Change the working directory to “%INSTALLDIR%\mongodb\bin”.

    3. Run “mongod.exe”.

    4. Run “mongo.exe”.

    5. In the MongoDB interface, run the following script:

      use admin
      db.createUser(
      {
      user: "fmadmin",
      pwd: "fmadmin",
      roles: [
      { role: "userAdminAnyDatabase", db: "admin" },
      { role: "readWriteAnyDatabase", db: "admin" },
      { role: "dbAdminAnyDatabase", db: "admin" },
      { role: "clusterAdmin", db: "admin" },
      { role: "root", db: "admin" },
      { role: "readWrite", db: "admin" },
      ]
      })
      
      exit

If you are using LDAP-based authentication, then you need to create and assign administrative privileges to a LDAP user ID. This is a one-time activity. For the subsequent requests, you can use this user account to grant privileges to other users via API. To assign administrative privileges to a LDAP user ID, perform the following steps:

Note: The following instructions are using the CLI. However, you can also use MongoDB Compass, which is free a UI tool to access and work with MongoDB.
  1. Open the command prompt.

  2. Change the working directory to “%INSTALLDIR%\mongodb\bin”.

  3. Run “mongod.exe”.

  4. Run “mongo.exe”.

  5. In the MongoDB interface, run the following script:

    use stubFM;db.users.find();

    Note the user ID that you want to update.

  6. Run the following script:

    db.users.update(
        { _id: ObjectId("5a321b0c602d2e16677760f5") },
        {
            $set: {
               userPermission: "ADMIN"
            }
        }
    )

    This script will update the user with an ID of “5a321b0c602d2e16677760f5” with administrative privileges.


May 30, 2024

Legal Notices | Online Privacy Policy