39.1. ejabberd - Distributed, fault-tolerant Jabber/XMPP server written in Erlang
http://www.ejabberd.im/
- install
$ sudo apt-get install ejabberd
- configure.
$ sudo cp /etc/ejabberd/ejabberd.cfg /etc/ejabberd/ejabberd.cfg.old $ sudo ls /etc/ejabberd/ ejabberd.cfg ejabberd.cfg.old ejabberd.pem inetrc $ sudo vim /etc/ejabberd/ejabberd.cfg %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Options which are set by Debconf and managed by ucf %% Admin user {acl, admin, {user, "neo", "netkiller.8800.org"}}. %% Hostname {hosts, ["netkiller.8800.org"]}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- create a admin
# ejabberdctl register <username> <server> <password> # ejabberdctl unregister <username> <server>
$ sudo ejabberdctl register neo netkiller.8800.org your_password
admin page: http://localhost:5280/admin/
- firewall
$ sudo ufw allow xmpp-server Rule added $ sudo ufw allow xmpp-client Rule added
- test
$ sudo apt-get install sendxmpp
Create config file ~/.sendxmpprc
$ vim ~/.sendxmpprc #account@host:port password neo@netkiller.8800.org chen $ sudo chmod 600 .sendxmpprc
send messages
$ echo -n hi | sendxmpp -r echocmd neo@netkiller.8800.org
39.1.1. ejabberdctl
set-password
$ sudo ejabberdctl set-password eva netkiller.8800.org eva
原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。
时间: 2024-09-24 02:55:55