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 by 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.

  3. Create chat.properties file under $PLATFORM_TOMCAT_HOME/gatein/conf/ or $PLATFORM_JBOSS_HOME/standalone/configuration/gatein/.

    All configurations of eXo Chat server can be written in this file but for a quick setup, you just let it use all default settings, except chatPassPhrase - its default value is chat and you should change it for security:

    chatPassPhrase=your_secret

    Note

    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 keeping the passphrase confidential is important.

  4. 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 more likely you will secure your MongoDB, so authorization is required. In this case, you need to create a configuration file for Chat add-on (chat.properties) to work with.

Note

Read MongoDB documentation for MongoDB security. The simple setup here is written to explain chat.properties more clearly.

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. This matches dbServerHost in chat.properties
    bind_ip = 192.168.1.81
    
    # This matches dbServerPort in chat.properties
    port = 27017
    
    # Turn on authentication
    auth=true
  3. Create a user having readWrite role in the database chat (you can name the database otherwise, it matches dbName in chat.properties).

    $ 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. Configure the add-on in chat.properties file that you have to create in $PLATFORM_TOMCAT_HOME/gatein/conf/ or $PLATFORM_JBOSS_HOME/standalone/configuration/gatein/ and restart eXo Platform.

    # chat.properties:
    dbName=chat
    dbServerHost=192.168.1.81
    dbServerPort=27017
    dbAuthentication=true
    dbUser=exo
    dbPassword=exo
Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus