[英]How to compile and use modified ejabberd source files
I have ejabberd server v16.03 running, (written in erlang 18.3
), which I downloaded from ejabberd site for ubuntu
. 我正在运行ejabberd服务器v16.03(用erlang 18.3
编写),该服务器是从ejabberd网站上下载的ubuntu
。
I want some custom tasks to be done by server. 我希望一些自定义任务由服务器完成。
So I have modified ejabberd_c2s.erl
file. 所以我修改了ejabberd_c2s.erl
文件。
When I compile it from source using ./configure
make
make install
, it compiles without any errors. 当我使用./configure
make
make install
从源代码进行编译时,它会编译而没有任何错误。
But when I run it using ejabberdctl start
it doesn't run the changes I made. 但是,当我使用ejabberdctl start
运行它ejabberdctl start
它不会运行我所做的更改。
So, I need to use debugger ejabberdctl debug
and attach the module ejabberd_c2s.erl
only then changes I made works. 因此,我需要使用调试器ejabberdctl debug
并附加模块ejabberd_c2s.erl
然后我所做的更改才能起作用。
Even the logs don't show any changes after debug mode enable or disabled. 启用或禁用调试模式后,即使日志也不显示任何更改。
I want my changes to be work on production server. 我希望我的更改可以在生产服务器上使用。
Any suggestions will be appreciated!!! 任何建议将不胜感激!!!
try this- syntax - erlc -I include_hrl_file_path -o ejabberd_binary_file_path(output path) sourc_file_path 试试这个语法-erlc -I include_hrl_file_path -o ejabberd_binary_file_path(输出路径)sourc_file_path
example-
erlc -I /opt/ejabberd-16.03/lib/ejabberd-16.03/include -o /opt/ejabberd-16.03/lib/ejabberd-16.03/ebin ejabberd_src/ejabberd_c2s.erl
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.