Child pages
  • Running MongoDB on the SICE Unified Linux Systems
Skip to end of metadata
Go to start of metadata

If you have an account on the SICE burrow systems (, aka. you can run a mongodb server under your own account with no intervention needed by the systems staff.  This page presents a cookbook example of how you can do this.  In these steps, you will need to replace "username" with your actual IU username.


  1. Log into the burrow server (, aka using ssh, PuTTY, or some other SSH client.  All of the following steps must be done while logged into the burrow server.
  2. Create a directory in your homedir to save the needed files.  In this example we will use a mongodb directory.

    mkdir /u/username/mongodb
  3. Copy in the default mondod configuration file into this directory

    cp /etc/mongod.conf /u/username/mongodb/mongod.conf
  4. Edit the /u/username/mongodb/mongodb.conf file, making the following changes:


    • Change the paths for pidfilepath, logpath, unixSocketPrefix, and dbpath from things like /var/run/mongodb/ to /u/username/mongodb/  You must make sure that you have no paths that point into /var/...
    • Uncomment the port line and change the port number from the default (27017) to some other random port that must be greater than 10,000.  You can use the checkport command to check if a port is available.  For example, if you wanted to use port 12233 then run "checkport 12233" to verify that it is available.

  5. Start the daemon with:

    mongod --config /u/username/mongodb/mongod.conf

    We have a newer mongo 3.2 installed that you can use.  If you want to use this version instead of the default, just run ". /opt/rh/rh-mongodb32/enable" (that's a '.' followed by the filename) before you start mongod.  You can run "which mongod" to confirm which version you are running.

  6. Connect to the database server:

    mongo localhost:12345

    You must replace 12345 with the unique port number you assigned in the mongodb.conf file (from step 4)

  7. The default configuration will only allow connections from silo itself via what is called localhost.  If you need to make remote connections (say, from a cgi or php script) then you will need to make a change to your mongod.conf file.  You will have to change the line "bind_ip=" to "bind_ip=" and restart your server.  Then, you can use a server connect string like the following:


    As above, you will need to replace 12345 with the proper port number.

    If you configure mongodb to listen on the network, you must configure authentication.  Leaving a mongodb server up on the network with no authentication is leaving the service ripe for abuse and is against IU and SICE policy.  Please see the MongoDB Security Checklist for more information.

If you have any trouble with these steps, you can request assistance as explained in How do I ask for help with a SICE technology or facilities issue?