美文网首页代码改变世界
How to install Jabberd2 on Ubunt

How to install Jabberd2 on Ubunt

作者: xinpureZhu | 来源:发表于2014-12-09 22:47 被阅读112次

    How to install Jabberd2 on Ubuntu Server 12.04

    Installation

    To install jabberd2, in a terminal enter:

    sudo apt-get install jabberd2
    

    Configuration

    A couple of XML configuration files will be used to configure jabberd2 for Berkely DB user authentication. This is a very simple form of authentication.

    First, edit /etc/jabberd2/sm.xml changing:

    6   <id>localhost.localdomain</id>
    

    Note: Replace localhost.localdomain with the hostname, or other id, of your server.

    Look like:

    6   <id>192.168.1.200</id>
    

    Note: 192.168.1.200 is VENUS server

    Now in the <storage> section change:

     70   <storage>
     71     <!-- Dynamic storage modules path -->
     72     <path>/usr/lib/jabberd2</path>
     73 
     74     <!-- By default, we use the MySQL driver for all storage -->
     75     <driver>mysql</driver>
     76 
     ······
    101     <!-- MySQL driver configuration -->
    102     <mysql>
    103       <!-- Database server host and port -->
    104       <host>localhost</host>
    105       <port>3306</port>
    106 
    107       <!-- Database name -->
    108       <dbname>jabberd2</dbname>
    109 
    110       <!-- Database username and password -->
    111       <user>jabberd2</user>
    112       <pass>secret</pass>
    

    Note: Replace <dbname>, <user>, <pass> with your database name, username and password

    Next, edit /etc/jabberd2/c2s.xml in the section change:

    125     <id register-enable='true'>localhost.localdomain</id>
    

    Look like:

    125     <id register-enable='true'>192.168.1.200</id>
    

    And in the <authreg> section change:

    320   <authreg>
    321     <!-- Dynamic authreg modules path -->
    322     <path>/usr/lib/jabberd2</path>
    323 
    324     <!-- Backend module to use -->
    325     <module>mysql</module>
    ······
    372     <!-- MySQL module configuration -->
    373     <mysql>
    374       <!-- Database server host and port -->
    375       <host>localhost</host>
    376       <port>3306</port>
    377 
    378       <!-- Database name -->
    379       <dbname>jabberd2</dbname>
    380 
    381       <!-- Database username and password -->
    382       <user>jabberd2</user>
    383       <pass>secret</pass>
    

    Note: Replace <dbname>, <user>, <pass> with your database name, username and password

    Finally, restart jabberd2 to enable the new settings:

    sudo /etc/init.d/jabberd2 restart
    or
    sudo service jabberd2 restart

    You should now be able to connect to the server using a Jabber client.

    相关文章

      网友评论

        本文标题:How to install Jabberd2 on Ubunt

        本文链接:https://www.haomeiwen.com/subject/olentttx.html