Installation and configuration of the messaging server
From mle
Contents |
Requirements:
- Java Sun 5.0 or higher (http://java.sun.com)
- A database: We recommend Postgres, because the server is already preconfigured for postgres
- A Unix Operation System, if you want to use the start-up scripts, otherwise you have to start and stop the server manually
Installation and configuration:
First of all extract the whole ZIP package to the folder where the server should be installed
Go now to the "conf/" folder and edit the following configuration files:
hibernate_messaging.properties
Note: The server doesn't work without a database!
First of all create a new database (default charset: "UTF-8" or "unicode"). You just need to create the empty database, upon the first start of the server, the tables will be generated automatically. Afterwards change the following three keys:
| Key: | Example: | Description: |
| hibernate.connection.url | jdbc:postgresql://localhost:5432/messaging | The database connection key, which consists out of the server-IP, the port and the database name. Useually you have to adapt only the database name, so replace "messaging" to your database. |
| hibernate.connection.username | dbuser | The username to access this database |
| hibernate.connection.password | dbpass | The password for this user |
settings_messaging.properties
This is the main configuration file for the Messaging server. Every configuration key is explained in this file, but here are anyway the most important keys you might need:
| Key: | Example: | Description: |
| PORT | 6644 | The port of your Messaging server. Be sure that this port is free and not taken by any other application. Otherwise the startup will fail. |
| MSG_ENCODING | UTF-16 | The default text encoding of messages. This key is important if you want to access the database from you web platform, so be sure to write text-messages with exactly this text encoding to the database! |
Starting and stopping the server:
In the installation folder:
On Unix:
| ./mleMessagingServer.sh start | Starts the Server in the background |
| ./mleMessagingServer.sh stop | Stops the running Server |
| ./mleMessagingServer.sh log | Shows the log file |
| ./mleMessagingServer.sh restart | Restarts the Server |
Everywhere else:
Basic startup:
java -jar mle_Messaging_Server_1_0.jar
Full startup:
java -Djava.util.logging.config.file=conf/logging_messaging.properties -Dcom.elibera.msgs.app.MessagingServer.settingsDIR=conf/ -server -XX:+UseBiasedLocking -XX:+UseParallelGC -Xmx512m -Xms128m -jar mle_Messaging_Server_1_0.jar
Note: If you write a startup script for Windows, please send it to us!
