|Version 21 (modified by 8 years ago) ( diff ),|
Chat Server Setup
- Install a JRE: 1.5.0 or later. You can check your java version by typing "java -version" at the command line and (if necessary) upgrade your Java installation by visiting http://java.sun.com.
On Debian you can use:
apt-get install openjdk-6-jre
- Download Openfire server tarball (recommended version: 3.9.3):
cd /tmp wget http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_3_9_3.tar.gz -O openfire.tar.gz
- Extract the archive to /opt :
cd /opt sudo tar zxvf /tmp/openfire.tar.gz cd /opt/openfire/bin ./openfire start
Doing this will enable web console. Open the browser with url http://<ip of the server>:9090/
- Follow through the onscreen steps to set up web console.
- Language Selection
- Server Settings: Choose default
- Database settings: Select embedded as of now since database integration is still in progress.
- Profile Settings: Default (store users and groups in the server database)
- Admin account: Give a valid email address for user 'admin'
- After logging into admin console as 'admin' go into server settings tab, go into HTTP Binding and enable 'Clients can connect to this server using HTTP binding.' and save the settings.
The port numbers can be changed to whichever you like. The default ports are 7070 and 7443. This port number is the one which will be used to connect by Sahana Eden Chat. So the chat ip to be entered in 000_config file will be "<public ip>:<port selected>".
Go to Server->Server Settings->HTTP Binding and enable script syntax.
- Go into plugins, from Available Plugins install
- Client Control
- Presence Service
- User Creation
- User Import Export
If for some reason you cannot see available plugins you can upload jar files after downloading from https://www.igniterealtime.org/projects/openfire/plugins.jsp.
- Restart the Openfire server.
sudo /opt/openfire/bin/openfire restart
Setup contact list for each user and greeting message
- Create a group called "everyone".
Users/Groups -> Groups -> Create New Group .
- Click enable in Contact List (Roster) Sharing.
- Enter “everyone” as Group Name and tick share group with additional users(after clicking select all users option).
- Go to User/Group -> Users -> Registration Properties
- Enter whatever message you want to welcome message box and click on save message.
- Enter the default group as “everyone” in default group box and click on save group.
- Then in the registration settings box at the top tick:
- Enable welcome message.
- Enable automatically adding of new users to a group
Click on Save Settings.
- Go to User/Groups -> Groups. Go to everyone group and manually add admin as the user to that group.
Setup Status messages
- Go to Server -> Server Settings -> Presence Service and change presence visibility to Anyone.
Custom Db Integration(MYSQl/Postgre SQL)
1) Clean the databases(when in base eden folder) using
rm -rf databases/* errors/* uploads/* sessions/*
2) In models/000_config.py choose database connection settings (use mysql).
3) In the sql table of auth_user add a user with email email@example.com , username chat_admin_example.com and password of your choice(having alphanumeric characters).
4) Install openfire. During installation use mysql and choose the openfire database name.
5) After Installation and following steps from above. Go to server properties and set the following properties.
- jdbcProvider.driver : com.mysql.jdbc.Driver
- jdbcProvider.connectionString : jdbc:mysql://localhost/<sahana database name>?user=<sql_username>&password=<sql_password>
- change provider.auth.className to org.jivesoftware.openfire.auth.JDBCAuthProvider
- jdbcAuthProvider.passwordSQL : select password from auth_user where username=?
- jdbcAuthProvider.passwordType : plain
- change provider.user.className to org.jivesoftware.openfire.user.JDBCUserProvider
- jdbcUserProvider.loadUserSQL : select first_name,email from auth_user where username=?
- jdbcUserProvider.userCountSQL : select count(*) from auth_user
- jdbcUserProvider.allUsersSQL : select username from auth_user
- jdbcUserProvider.searchSQL : select username from auth_user where
- jdbcUserProvider.usernameField : username
- jdbcUserProvider.emailField : email
- jdbcUserProvider.nameField : first_name
- admin.authorizedJIDs: choose a username from the user database and put it here e.g. chat_admin_example.com@<servername>
6) Restart the server