Phoenix 集成 ejabberd

mix.exs 添加依賴

{:ejabberd, "~> 20.4"}

配置 ejabberd application git

image.png

config/config.exs

config :ejabberd,
  file: "config/ejabberd.yml",
  log_path: 'logs/ejabberd.log'

config :mnesia,
  dir: 'mnesiadb/'

下載官方示例配置文件到 config/ejabberd.ymlgithub

https://github.com/processone...app

編譯

mix.deps get 
mix compile

openssl 問題

===> /Users/lidashuang/Github/ejabberd/deps/fast_tls/c_src/fast_tls.c:21:10: fatal error: 'openssl/err.h' file not found

openssl https://github.com/processone...ui

設置環境變量spa

export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CFLAGS="-I/usr/local/opt/openssl/include/"
export CPPFLAGS="-I/usr/local/opt/openssl/include/"
相關文章
相關標籤/搜索