2016-04-04-Ejabberd-configure-db-postgresql
Configure Ejabberd chat server to use PostgreSQLDate: 2016-04-04 19:58:00 In order to make data persistent with in any application,we can link it to a PostgreSQL relational database.
huazhang@zhoutekiMacBook-Air:~/ejabberd-15.09/bin$ psql
psql (9.4.4)
huazhang=# run ./createdb ejabberd
```
2. Create the tables using the supplied script
huazhang-# ./psql ejabberd < ~/ejabberd-15.09/lib/ejabberd-15.09/priv/sql/pg.sql 3. Add a user for the database
~/ejabberd-15.09/bin$ createuser -P -s -e admin 4. Configure ODBC options in ejabberd.cfg:
Scroll down to the section headed Database setup. PostgreSQL server:odbc_type: pgsql 5. Add _odbc to modules you wish to use the odbc database,and store messages into archive table
e.g. mod_offline_odbc instead of mod_offline. Modules enabled in all ejabberd virtual hosts.modules:
auth_method: internalThen un comment auth_method: odbc
ReferenceGetting started with ejabberd (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |