Home | Mirror | Search

第 52 章 jabber

目錄

1. ejabberd - Distributed, fault-tolerant Jabber/XMPP server written in Erlang
1.1. ejabberdctl
2. DJabberd
3. freetalk - A console based Jabber client
4. library
4.1. python-xmpp

jabber homepage

1. ejabberd - Distributed, fault-tolerant Jabber/XMPP server written in Erlang

http://www.ejabberd.im/

  1. install

    				
    $ sudo apt-get install ejabberd
    				
    				
  2. 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"]}.
    
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    		
    				
    				
  3. 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/

  4. firewall

    				
    $ sudo ufw allow xmpp-server
    Rule added
    
    $ sudo ufw allow xmpp-client
    Rule added
    				
    				
  5. 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
    				
    				

1.1. ejabberdctl

set-password

			
$ sudo ejabberdctl set-password eva netkiller.8800.org eva			
			
			
comments powered by Disqus