forked from leadnt/ejabberd-open
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
添加配置文件的说明文档 删除没用的代码
- Loading branch information
lffan.liu
committed
Dec 13, 2018
1 parent
c39d9bc
commit 5a14b03
Showing
5 changed files
with
166 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
# ejabberd配置文件说明 | ||
|
||
本文档只说明可能需要修改的配置,其它配置项可参考[ejabberd doc](https://docs.ejabberd.im/admin/configuration/) | ||
|
||
## ejabberd.yml 配置说明 | ||
|
||
+ loglevel | ||
|
||
配置日志级别,参考配置文件中的说明 | ||
|
||
``` | ||
## loglevel: Verbosity of log files generated by ejabberd. | ||
## 0: No ejabberd log at all (not recommended) | ||
## 1: Critical | ||
## 2: Error | ||
## 3: Warning | ||
## 4: Info | ||
## 5: Debug | ||
``` | ||
|
||
+ logroate | ||
|
||
配置日志切割,参考配置文件说明 | ||
|
||
``` | ||
log_rotate_size: 504857600 | ||
log_rotate_date: "$D0" | ||
log_rotate_count: 41 | ||
``` | ||
|
||
+ log_rate_limit | ||
|
||
日志输出速率配置,参考配置文件说明 | ||
|
||
``` | ||
## overload protection: If you want to limit the number of messages per second | ||
## allowed from error_logger, which is a good idea if you want to avoid a flood | ||
## of messages when system is overloaded, you can set a limit. | ||
## 100 is ejabberd's default. | ||
log_rate_limit: 20000 | ||
``` | ||
|
||
+ hosts | ||
|
||
ejabberd服务的域名,应该是提供ejabberd服务的域名,参考配配置文件说明 | ||
|
||
``` | ||
## hosts: Domains served by ejabberd. | ||
## You can define one or several, for example: | ||
## hosts: | ||
## - "example.net" | ||
## - "example.com" | ||
## - "example.org" | ||
## | ||
hosts: | ||
- "qtalk.xxx.org" | ||
``` | ||
|
||
+ listen | ||
|
||
配置ejabberd提供服务的端口、ip以及其它配置,参考[listening-ports](https://docs.ejabberd.im/admin/configuration/#listening-ports) | ||
|
||
本项目扩展了原ejabberd的一个module(ejabberd_protobuf_c2s),提供了与客户端之间通过protobuf协议来传输数据 | ||
|
||
+ databse配置 | ||
|
||
本项目使用的是postgresql数据库,配置如下: | ||
|
||
``` | ||
## | ||
## PostgreSQL server: | ||
## | ||
sql_type: pgsql | ||
sql_server: "localhost" | ||
sql_database: "database" | ||
sql_username: "username" | ||
sql_password: "password" | ||
``` | ||
|
||
+ redis配置 | ||
|
||
redis连接的相关配置 | ||
|
||
``` | ||
sm_db_type: redis | ||
redis_start_mode: 0 | ||
redis_pool_size: 1 | ||
redis_server: "redis" | ||
redis_port: 6379 | ||
redis_password: "password" | ||
redis_tab: "0,1,2,3,5,7,10,11,15" | ||
``` | ||
|
||
+ 加解密用到的公私钥 | ||
|
||
配置加解密密码的公私钥,需要和qtalk_http_service_open服务中的配置的是同一对公私钥 | ||
|
||
``` | ||
rsa_public_key: "-----BEGIN PUBLIC KEY-----\nMIqGfMA023244GNADCBiQKBgQCy2VXDAlCZlj7gPHvC/vwvbpTN\n/GyW0tmNCqh0UPitdTTGZk3UcLqu9lWMGPViL/5lhboiSogsDxJ234wo91DDBjTX\n1HbuyuOhvsvayV7Yc8t+ajFW/8RwlvhGSzVplthoU+md9kGeZ8t73VWWZUEB0iyW\nx7Y/RjUwTdnOlNXDzQIDAQAB\n-----END PUBLIC KEY-----" | ||
rsa_private_key: "-----BEGIN RSA PRIVATE KEY-----\nMIICeXAIBAAKBgQCy2VXDAlCZlj7gPHvC/vwvbpTN/GyW0tmNCqh0UPitdTTGZk3U\nc23423L/5lhboiSogsDxJLHdwo91DDBjTX1HbuyuOhvsvayV7Yc8t+ajFW\n/8RwlvhGSzVplthoU+md9kGeZ8t73VWWZUEB0iyWx7Y/RjUwTdnOlNXDzQIDAQAB\nAoGAHlGlrkdoLoE/63eVa3saeVf/tePC7NaVtslFwWIwpgcmiTOyof7yRtLPsc5R\nWvHT6JYA9es4pm9vpHhNaEx0zjJkuAW9ECLb4dZA1b6stQy7nHl7dgT13RsEjKJI\n3CYLmK2Mneis9dObzz0CqMgdbAA456zQ4VuMlwJZzf0BT8EC23424pbxMey0tn+1\nI4lL+1JYfrfQZoA+dv0d8X2gt0d8itJFPQYWsJCt4vUl48c58E+hWarCBl+yl4ym\nz7RltmwpAkEA1WkIvwWlCyliUpgM7V0rp8vxBPyTXqNZ6+xiqVotX2PIQ116fNVW\n5Tx5DoAxQ/c+QALOZXAiY7BiAZ+AMl1PBQJAZaAYiAAiJCgerms66icOhqTf5XPo\nY65xj/GIlMy8rB4GJI4XiD/zCKttfJk9EhDnZ4LWBDqIskxfb9ULmvKioQJAfo6w\nWh/t1WWwYky7ddRH/FVMVGm4t2nl/KwNgmLw/128OH7qEbeutXkcTUYmcSjhaLKB\nVdSfAEFsjYvaSYPeRQJBANLk4jCONVQkYzSmnvqUrFvDOFq9Ei5J08waevFIoaia\nJJ9OvMg0AueWwHo/kfNz1GkCV6de4mKTshgT5d2V0T4=\n-----END RSA PRIVATE KEY-----" | ||
``` | ||
|
||
+ 一些默认值配置 | ||
|
||
配置默认的host和domain | ||
|
||
``` | ||
default_host: "qtalk.xxx.org" | ||
default_domain: "conference.qtalk.xxx.org" | ||
``` | ||
|
||
## ejabberdctl.cfg配置 | ||
|
||
+ ERLANG_NODE | ||
|
||
配置ejabberd节点名称,参考配置文件说明 | ||
|
||
``` | ||
#. | ||
#' ERLANG_NODE: Erlang node name | ||
# | ||
# The next variable allows to explicitly specify erlang node for ejabberd | ||
# It can be given in different formats: | ||
# ERLANG_NODE=ejabberd | ||
# Lets erlang add hostname to the node (ejabberd uses short name in this case) | ||
# ERLANG_NODE=ejabberd@hostname | ||
# Erlang uses node name as is (so make sure that hostname is a real | ||
# machine hostname or you'll not be able to control ejabberd) | ||
# [email protected] | ||
# The same as previous, but erlang will use long hostname | ||
# (see erl (1) manual for details) | ||
# | ||
# Default: ejabberd@localhost | ||
# | ||
ERLANG_NODE=ejabberd@主机名 | ||
``` | ||
|
||
主机名应该是以.分割的全主机名 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.