Download and install MongoDB.
The Chat add-on uses MongoDB to store information and messages, so you need to install MongoDB.
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.
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.
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
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.
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:
Install Video Calls add-on, then configure the Weemo key and grant permissions, as detailed in Server setup, Video Calls.
Notice the cam icon that is added next to the Chat icon. The different colors of the cam icon allow administrators and users to check the Video Calls status.
Connected to Weemo driver.
Connecting to Weemo driver.
Connected with the same account on two different places.
Not connected to Weemo driver.
To activate the conference call, remember to purchase a key for Group Calls, and enable the Group Calls button (YES) for the users/groups you want to grant the Call permission.
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.
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.
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
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
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
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()
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