找不到 ejabberd 命令,不存在 ejabberd.cfg

ejabberd command not found, non-existent ejabberd.cfg

我从以前的员工那里继承了一个 ejabberd 安装。基本命令 return

Error command 'xxxx' not known

该文档引用了 /etc/ejabberd.cfg,它在服务器上不存在。 /opt/ejabberd-15.03/conf/ejabberd.yml 似乎包含所有相关配置,例如 LDAP 和 ssl 证书位置。

对于用户来说,一切似乎都 运行 没问题,所以也许我做错了什么。以下是一些示例:

[root@jabber bin]# pwd
/opt/ejabberd-15.03/bin
[root@jabber bin]# ./ejabberdctl create_room SteveTest conference.localhost localhost

Error: command "create_room" not known.

[root@jabber bin]# ./ejabberdctl muc_online_rooms global

Error: command "muc_online_rooms" not known.

配置文件

The doc refers to /etc/ejabberd.cfg, which does not exist on the server. /opt/ejabberd-15.03/conf/ejabberd.yml seems to contain all pertinent configs, such as LDAP and ssl certificate locations.

配置文件的位置特定于 ejabberd 的安装方式,因此将其放在 /opt/ejabberd-15.03/conf/ 中应该没问题。

ejabberd.cfg 对比 ejabberd.yml 的原因是 ejabberd 13.10 introduced YAML as configuration file format (ejabberd.yml) and deprecated the previously used Erlang terms based one (ejabberd.cfg). From their documentation:

In previous ejabberd version the configuration file should be written in Erlang terms. The format is still supported, but it is highly recommended to convert it to the new YAML […]

ejabberdctl

当你 运行 ejabberdctl 没有任何参数时,它应该会显示所有支持的命令。

你试过的(create_roommuc_online_rooms)不应该在列表中,因为它们是 part of the mod_muc_admin module, which got introduced with ejabberd 15.04,但你似乎是 运行ning较旧的 ejabberd 15.03.

要获得这些命令,您可以升级 ejabberd,这是推荐的方式,或者从 ejabberd-contrib repository, which contains third-party ejabberd modules. mod_muc_admin was part of this repository before it became directly included into ejabberd. Here is a link to the last revision of ejabberd-contrib which still contains the module: https://github.com/processone/ejabberd-contrib/tree/e5336f/mod_muc_admin

获取 mod_muc_admin 模块