I have used openfire as a server before, but the openfire cluster does not support very well, so I switched to ejabberd. Since it was developed using the Erlang language, its concurrency and distributed functions are both powerful, here I will record my installation and configuration processes.
1. Install the installation package on its official website. My system is Mac OS, so I only want to install it on Mac OS. After downloading the installation package, click Install. After installation, the ejabberd directory will be generated in the/applications directory, since I downloaded a Ejabberd-2.1.11, so the installation directory is:/applications/ejabberd-2.1.11/
2. The configuration supports MySQL, open/applications/ejabberd-2.1.11/CONF/ejabberd. cfg and make the following modifications
A. Notes
{auth_method, internal}.
After annotation
%%{auth_method, internal}.
B. Cancel the comment.
{auth_method, odbc}.
C. Create a database named ejabberd.
D. Create a table. If your MySQL version is earlier than 5.5.3, edit mysql. SQL and change set table_type = InnoDB; To set default_storage_engine = InnoDB;
cd /Applications/ejabberd-2.1.11/lib/ejabberd-2.1.11/priv/sqlmysql -u root -p ejabberd < mysql.sql
D. Configure MySQL
%%%% MySQL server:%%{odbc_server, {mysql, "localhost", "ejabberd", "root", "MySqlPassword"}}.
E. Add a _ ODBC
{mod_last_odbc, []},{mod_offline_odbc, []},{mod_privacy_odbc, []},{mod_private_odbc, []},{mod_pubsub_odbc, [ % requires mod_caps ...{mod_roster_odbc, []},{mod_vcard_odbc, []},
3. Enable ejabberd,
cd /Applications/ejabberd-2.1.11/lib./start
Because MySQL does not have data, we register an account with the following command:
./ejabberdctl register admin mes1.com 123456
Now go to http: // localhost: 5280/admin/to login
Username: Admin
Password 123456
Reference: http://iohq.net/index.php? Title = building_an_ejabberd_server_with_mysql