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
- 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
- Go to /etc/apt/sources.list.d/
- 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
- Reload the local package database:
sudo apt-get update
- Install MongoDB Enterprise Advanced:
sudo apt-get install -y mongodb-enterprise
Installing on RHEL
- 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
- 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
- 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]
- Create a new db user in the Enterprise Advanced server.
First, connect to the mongo shell:Then create the user:mongosh private_ip
Finally, verify the connection from the FileCloud server:db.createUser({user: 'fcdbuser', pwd: 'passw0rd1', roles:['root']})
mongosh private_ip -u fcdbuser --authenticationDatabase "admin"
- 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]");
- 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
- Download MongoDB Enterprise 6.0 Windows msi from https://www.mongodb.com/try/download/enterprise.
- 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
- 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
tobindip: [private_ip of Enterprise Advanced server]
- Restart the mongodb service.
- In the server containing the MongoDB Enterprise installation, open a command prompt and switch to the /bin directory:Connect to the mongo shell.
cd C:\Program Files\MongoDB\Server\6.0\bin\
mongosh private_ip
- Switch to the admin user:
use admin
- Create a new db user:
db.createUser({user: 'fcdbuser', pwd: 'passw0rd1', roles:['root']})
- 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]
- From the FileCloud server, verify the connection:
mongosh [private ip of Enterprise Advanced server] -u fcdbuser --authenticationDatabase "admin”
- 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]");
- 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]");