Installguide quickstartguiderpm

cervajs edited this page Apr 3, 2012 · 7 revisions

Go up: InstallGuide

Quick Start Guide for RPM based systems

This guide is intended to get Jabberd 2 installed and running as quickly as possible:

Requirements

  • Fedora/Centos Linux
  • MySQL

Install

yum install jabberd
mysqladmin create jabberd2
mysql jabberd2 < /usr/share/jabberd/db-setup.mysql

(create user in mysql for jabberd2 database) 
mysql mysql -u root -p 
mysql> GRANT ALL PRIVILEGES ON jabberd2.* TO 'jabberd2'@'localhost' IDENTIFIED BY 'secret_pass' WITH GRANT OPTION;
mysql> flush privileges; 

note: for Centos you must enable EPEL repo (http://fedoraproject.org/wiki/EPEL)

Configuration

Default configration directory is

/etc/jabberd   

The most basic Jabberd configuration requires a total of 4 configuration edits:

1. Set hostname ID in c2s.xml
2. Set authreg module to use in c2s.xml
3. Set hostname ID in sm.xml
4. Set storage module to use in sm.xml

Set hostname ID in c2s.xml

In c2s.xml edit the id tag under the section labelled local network configuration so that the id references a resolvable network name for your jabber server. For example, using the FQDN of somemachine.somedomain.com, your c2s.xml configuration would appear as below:

    <local>
       <id>somemachine.somedomain.com</id> 

Note that this id must be resolvable by the clients that will be connecting to your Jabberd server. Using an IP address as the id should work; however, this is strongly discouraged.

Set authreg module to use in c2s.xml

Further down in c2s.xml is a section labeled Authentication/registration database configuration. This is where the authreg data module is specified. Edit the module tag so that MySQL is specified as the Backend module to use. Throughout Jabberd configuration, MySQL is abbreviated to db. Therefore, you should edit the module tag as below:

    <!-- Authentication/registration database configuration -->
    <authreg>
      <!-- Backend module to use -->
      <module>mysql</module>      
       <mysql>
        <host>localhost</host>
        <port>3306</port>
        <dbname>jabberd2</dbname>
        <user>jabberd2</user>
        <pass>secret_pass</pass>
       </mysql>
    </authreg>

Set hostname ID in sm.xml

At the top of sm.xml is the id setting for hostname. Edit the id tag with the same hostname specified in previous section above:

    <sm>
      <!-- Our ID on the network. Users will have this as the domain part of
           their JID. If you want your server to be accessible from other
           Jabber servers, this ID must be resolvable by DNS.s
           (default: localhost) -->
      <id>somemachine.somedomain.com</id>      

Set storage module to use in sm.xml

Further down in sm.xml is a section labeled Storage database configuration. This is where the storage data module is specified. Edit this section as below so that Berkely DB is specified as the storage data driver to use:

      <!-- Storage database configuration -->
      <storage>
        <!-- By default, we use the MySQL driver for all storage -->
        <driver>mysql</driver>
         <mysql>
          <host>localhost</host>
          <port>3306</port>
          <dbname>jabberd2</dbname>
          <user>jabberd2</user>
          <pass>secret_pass</pass>
         </mysql>        

Create jabber user

mysql jabberd2 -u root -p
mysql> insert into authreg (username, realm, password) values ('myusername', 'somedomain.com', 'mypassword'); 

Starting Jabberd 2

Start your Jabberd 2 server by using the start up script:

   service jabberd start

Connecting to your Jabberd Server

You should now be able to connect to your Jabberd server. Check the FAQ if you have problems

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.