2.1. eXo Platform server setup

  1. Download and install MongoDB.

    The Chat add-on uses MongoDB to store information and messages, so you need to install MongoDB.

    Note

    For a quick setup, the Chat add-on by default connects to MongoDB at localhost:27017 without authentication, so no advanced setup is required if you install MongoDB in the same machine with Platform server.

    If you secure MongoDB and allow remote connections, you have to configure the add-on - see Secured MongoDB.

  2. Install Chat add-on with the command: addon install exo-chat. The installation procedure is the same to that of other add-ons, as detailed in Installing/Uninstalling add-ons, Administrator Guide.

    For Community Edition: addon install exo-chat-community.

    Note

    By default, a chatPassPhrase property has been created. The eXo Chat server provides some operations via REST service so that anyone who knows the passphrase can do things, such as dropping, re-creating and indexing the database, so you need to change this property in the configuration file.

  3. Start eXo Platform server. When the users sign in eXo Platform, the Chat icon () will be shown on the top navigation bar.

Integrating Video Calls

If you want to allow users to make video calls within Chat:

Secured MongoDB

For a quick setup, the add-on by default uses a local and none-authorization connection. However, in production it is likely you will secure your MongoDB, so authorization is required. Below are steps to do this.

Note

Read MongoDB documentation for MongoDB security. This setup procedure is applied for MongoDB 2.6. It is different in MongoDB 2.4.

  1. Start MongoDB and connect to the shell to create a database named admin. Add a user with role userAdminAnyDatabase.

    $ mongo
    >use admin
    >db.createUser({user: "admin", pwd: "admin", roles: [{role: "userAdminAnyDatabase", db: "admin"}]})
    >exit
  2. Edit MongoDB configuration to turn on authentication, then restart the server.

    # mongodb.conf
    # Your MongoDB host.
    bind_ip = 192.168.1.81
    
    # The default MongoDB port
    port = 27017
    
    # Turn on authentication
    auth=true
  3. Create a user having readWrite role in the database chat (you can name the database as your desire).

    $ mongo -port 27017 -host 192.168.1.81 -u admin -p admin -authenticationDatabase admin
    >use chat
    >db.createUser({user: "exo", pwd: "exo", roles: [{role: "readWrite", db: "chat"}]})
    >exit
  4. Verify the authentication/authorization of the new user:

    $ mongo -port 27017 -host 192.168.1.81 -u exo -p exo -authenticationDatabase chat
    >use chat
    >db.placeholder.insert({description: "test"})
    >db.placeholder.find()
  5. Create a configuration file containing these below parameters.

    dbName=chat
    dbServerHost=192.168.1.81
    dbServerPort=27017
    dbAuthentication=true
    dbUser=exo
    dbPassword=exo

    Note

    The parameters above correspond with the values used during creating authorization for MongoDB.

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus