Set up MongoDB on SUSE Linux Enterprise Server

Preparation

Make sure your system is up-to-date.

sudo yum -y update
During this installation some files will need to be edited manually. If you are familiar with vim set it as default editor with the commands below. If you are not familiar with vim please skip this and keep using the default editor.
sudo zypper -n install vim
sudo update-alternatives --install /usr/bin/editor editor /usr/bin/vim 100

Install MongoDB

Follow the official MongoDB installation guide for SUSE Linux Enterprise Server.

Configure MongoDB for Relution

If you are going to install Relution on another machine, you need to configure MongoDB to listen on all network interfaces. If Relution is going to be installed on the same machine you can skip these steps.

sudo editor /etc/mongod.conf

Find the following section:

# network interfaces
net:
  port: 27017
  bindIp: 127.0.0.1  # Listen to local interface only, comment to listen on all interfaces.

Comment the bindIp so that it looks like this:

# network interfaces
net:
  port: 27017
#  bindIp: 127.0.0.1  # Listen to local interface only, comment to listen on all interfaces.

Restart the MongoDB service for the changes to take effect:

sudo systemctl restart mongod.service

Check installation

Verify MongoDB is running as expected:

sudo cat /var/log/mongodb/mongod.log

You should see a message similar to:

... NETWORK  [initandlisten] waiting for connections on port 27017

You can now use the command line utility to connect to the MongoDB instance.

mongo

Type exit to disconnect again.

Firewall configuration

If you’re going to install Relution on another machine, you need to open port 27017 on this machine, so Relution can talk to MongoDB. If Relution is going to be installed on the same machine you can skip these steps.

  • Open the YaST tool by issuing the following command: yast firewall

  • Use the cursor keys to select Allowed Services, followed by the return key

  • Use the tab key to select Advanced…, followed by the return key

  • Enter “27017” as TCP Port

  • Select OK to close the Advanced dialog box.

  • Select Next and review the summary of your changes.

  • Select Finish to apply your changes.