Skip to content
trangvh edited this page Mar 4, 2015 · 7 revisions

To be sure, the Chat will never interfere with eXo Platform, you can install it on a separated server. It's of course the recommended configuration.

Step 1 : Build

Prerequisite : install Maven 3.

git clone https://github.com/exo-addons/chat-application.git
cd chat-application

then build the project with maven :

mvn clean install

If you have a problem of dependency during the building, try adding eXo Mirror in your Maven settings :


     <mirrors>
        <mirror>
          <id>exo-central-server</id>
          <name>eXo Central Server</name>
          <url>http://repository.exoplatform.org/public/</url>
          <mirrorOf>central</mirrorOf>
        </mirror>
      </mirrors>

Step 2 : Configure MongoDB Server

Prerequisite : install MongoDB. then configure your chat.properties file like :

dbServerHost=localhost
dbServerPort=27017
dbName=chat
dbAuthentication=false
dbUser=admin
dbPassword=pass
chatServerBase=http://localhost:8888
chatPortalPage=/portal/intranet/chat
chatIntervalNotif=3000
chatIntervalChat=3000
chatIntervalSession=60000
chatIntervalStatus=15000
chatIntervalUsers=5000
chatPassPhrase=your-passphrase-here
chatCronNotifCleanup=0 0/60 * * * ?
publicMode=true
publicAdminGroup=/platform/administrators

You can notice here, we call Chat Server on port 8888.

Important : don't forget to change the passphrase (chatPassPhrase) !

Step 3 : Configure Chat Server on Tomcat

Step 3a : Configuration

Prerequisite : install Apache Tomcat 7 and rename it chat-server/

Change the conf/server.xml to port 8280 :


    <Connector port="8280" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8243" URIEncoding="UTF-8" />

    <Connector port="8209" protocol="AJP/1.3" redirectPort="8243" URIEncoding="UTF-8" />

Step 3b : Deploy

cp data/chat.properties chat-server/conf/
cp server-standalone/target/chatServer.war chat-server/webapps/

Step 3c : Run

cd chat-server
./bin/catalina.sh run

Step 4 : Deploy Chat Application

Step 4a : Dry Run eXo Platform 4

Prerequisite : install eXo Platform 4 and rename it tomcat/

Use eXo start script :

cd tomcat 
./start_eXo.sh

Now, point your browser to http://localhost:8080/portal/ and create your administrator account.

cd tomcat 
./stop_eXo.sh   #or CTRL+C in your terminal

Step 4b : Deploy

Prerequisite : install eXo Platform 4 Tomcat bundle and rename it tomcat/

cp data/chat.properties tomcat/conf/
cp exo-addons-chat-extension-config/target/exo-addons-chat-extension-config-0.7.0.jar tomcat/lib/
cp application/target/chat.war tomcat/webapps/
cp exo-addons-chat-extension/target/chat-extension.war tomcat/webapps/

Note : XXX in the jar stands for its version (i.e. 0.7.0 or 0.7.0-SNAPSHOT). There's also a source jar (chat-extension-config-XXX-sources.jar). This jar can be ignored.

Step 4c : Run

Use eXo start script :

cd tomcat 
./start_eXo.sh

Step 5 : Virtualhosts

The Chat Application is using extensive use of Ajax calls. For this to run in multiple servers mode, the client must call the server on the same domain name and same protocol (that's the easier way to avoid anti-fishing security in modern browsers).

This easiest way to do so is to use Apache to re-route the requests using ProxyPass module.

In your Apache, configure some Proxy Pass rules, here's an example :


<VirtualHost *:8888>
  ServerName www.localhost.com

  ProxyRequests Off
  ProxyPreserveHost On

  <Proxy *>
    Order deny,allow
    Allow from all
  </Proxy>

  ProxyPass /chatServer http://localhost:8280/chatServer
  ProxyPassReverse /chatServer http://localhost:8280/chatServer
  ProxyPass / http://localhost:8080/
  ProxyPassReverse / http://localhost:8080/
</VirtualHost>

Step 5b : For Windows 2008 r2 servers

This is a feedback from the Community : On windows, you should also :

  • Add "Header set Access-Control-Allow-Origin www.localhost.com" in your httpd.conf file
  • Check your firewall rules (open 80 and 8280 port)

Step 6 : Login

Now, point your browser to http://localhost:8888/portal/intranet/ and login with your administrator

You should have a new entry for the Chat in the Left Menu.