Setting Up MongoDB Enterprise Advanced Server

Full support for MongoDB Enterprise Advanced Server has been added in FileCloud 23.241.

By default, FileCloud includes MongoDB Community Edition, a versatile, efficient database that meets most customers needs.  However, if your system requires database encryption or compliance with the MongoDB STIG, you may choose to deploy MongoDB Enterprise Advanced, which meets those requirements. For more information about MongoDB Enterprise Advanced, see https://www.mongodb.com/products/self-managed/enterprise-advanced.

Install MongoDB Enterprise Advanced

Installing on Ubuntu

  1. If gnupg and curl are not already installed, install them.
    In a command line enter:
    sudo apt-get install gnupg curl
    
    curl -fsSL https://pgp.mongodb.com/server-6.0.asc | \
    
       sudo gpg -o /usr/share/keyrings/mongodb-server-6.0.gpg \
    
       --dearmor
  2. Go to /etc/apt/sources.list.d/
  3. Create the list file mongodb-enterprise-6.0.list:
    echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-6.0.gpg ] https://repo.mongodb.com/apt/ubuntu jammy/mongodb-enterprise/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-enterprise-6.0.list
  4. Reload the local package database:
    sudo apt-get update
  5. Install MongoDB Enterprise Advanced:
    sudo apt-get install -y mongodb-enterprise


Installing on RHEL

  1.  Go to /etc/yum.repos.d/ and create the file mongodb-enterprise-6.0.repo file with the following contents. 
    [mongodb-enterprise-6.0] 
    
    name=MongoDB Enterprise Repository 
    
    baseurl=https://repo.mongodb.com/yum/redhat/9/mongodb-enterprise/6.0/$basearch/ 
    
    gpgcheck=1 
    
    enabled=1 
    
    gpgkey=https://pgp.mongodb.com/server-6.0.asc 
  2. The mongodb-enterprise-6.0.repo enables you to install MongoDB Enterprise Advanced directly using yum.
    Enter the following to perform the installation. 
    sudo yum install -y mongodb-enterprise 

 Configure the connection to FileCloud for Ubuntu or RHEL

  1. Make the bind IP of MongoDB in the Enterprise Advanced server private:
    vi /etc/mongod.conf 
    change bindip: 127.0.0.1 to bindip: [private ip of Enterprise Advanced server]
  2. Create a new db user in the Enterprise Advanced server.
    First, connect to the mongo shell:
    mongosh private_ip 
    Then create the user:
    db.createUser({user: 'fcdbuser', pwd: 'passw0rd1', roles:['root']}) 
    Finally, verify the connection from the FileCloud server:
    mongosh private_ip -u fcdbuser  --authenticationDatabase "admin" 

  3. Open /var/www/html/config/cloudconfig.php and update the IP address of the db server to point to the MongoDB Enterprise Advanced server: 
    // ... Cloud Database 
    
    define("TONIDOCLOUD_DBSERVER", "mongodb://[private ip of Enterprise Advanced server]"); 
    
    // ... Audit Database 
    
    define("TONIDOCLOUD_AUDIT_DBSERVER", "mongodb://[private ip of Enterprise Advanced server]"); 
    
    // … Settings Database 
    
    define("TONIDOCLOUD_SETTINGS_DBSERVER", "mongodb://[private ip of Enterprise Advanced server]"); 
  4. Open /var/www/html/config/localstorageconfig.php, and update the IP address of the db server to point to the MongoDB Enterprise Advanced server: 
    define("TONIDO_LOCALSTORAGE_DBSERVER", "mongodb://[private ip of Enterprise Advanced server]"); 

Installing on Windows

  1. Download MongoDB Enterprise 6.0 Windows msi from https://www.mongodb.com/try/download/enterprise.
  2. Launch the msi file, and install MongoDB Enterprise 6.0.
    When the installer prompts you to specify where you want to install the file, enter:
    C:\Program Files\MongoDB\Server\6.0\bin\

Configure the connection to FileCloud for Windows

  1. In the server containing the MongoDB Enterprise installation, set the bind IP of C:\Program Files\MongoDB\Server\6.0\bin\mongodb.cfg to the server's private IP.
    Open mongodb.cfg and change the setting:
    bindip: 127.0.0.1

    to
    bindip: [private_ip of Enterprise Advanced server] 

  2. Restart the mongodb service.
  3. In the server containing the MongoDB Enterprise installation, open a command prompt and switch to the /bin directory:

    cd C:\Program Files\MongoDB\Server\6.0\bin\
    Connect to the mongo shell.
    mongosh private_ip

  4. Switch to the admin user:
    use admin

  5. Create a new db user:
    db.createUser({user: 'fcdbuser', pwd: 'passw0rd1', roles:['root']}) 

  6. If necessary, open port 27017 to the IP of the other machine on both servers to allow connection between the servers. 
    Run the following command in both servers and set the value of the remote ip to the private ip address of the other server.
    netsh advfirewall firewall add rule name="Opening port to allow MongoDB" dir=in action=allow protocol=TCP localport=27017 remoteip=[remote ip of other server]

  7. From the FileCloud server, verify the connection:
    mongosh [private ip of Enterprise Advanced server] -u fcdbuser  --authenticationDatabase "admin” 

  8. Open C:/xampp/htdocs/config/cloudconfig.php and update the IP address of the db server to point to the MongoDB Enterprise Advanced server: 
    // ... Cloud Database 
    
    define("TONIDOCLOUD_DBSERVER", "mongodb://[private ip of Enterprise Advanced server]"); 
    
    // ... Audit Database 
    
    define("TONIDOCLOUD_AUDIT_DBSERVER", "mongodb://[private ip of Enterprise Advanced server]"); 
    
    // … Settings Database 
    
    define("TONIDOCLOUD_SETTINGS_DBSERVER", "mongodb://[private ip of Enterprise Advanced server]"); 

  9. Open C:/xampp/htdocs/config/localstorageconfig.php and replace the DB server IP with the private IP of the Enterprise Advanced server:
    define("TONIDO_LOCALSTORAGE_DBSERVER", "mongodb://[private ip of Enterprise Advanced server]");