Home | Mirror | Search |
目錄
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