Build YawsPack

This tutorial assumes that:
  • ejabberd is executed from the source directory where it was compiled, without installing it.
  • ejabberd sources are on /home/test/ejabberd
  • Yaws directory will be /home/test/yaws
  • The WWW directory will be /home/test/www
  • The Jabber server name is 'localhost', and the web server will listen on IP 127.0.0.1 on port 5224.

Yaws

  1. Download Yaws
  2. Uncompress Yaws:

    tar -xzvf yaws-1.65.tar.gz
    rm yaws
    mv yaws-1.65 yaws
    cd yaws
  3. Compile Yaws:

    ./configure --disable-pam
    make
  4. Copy yaws/include/yaws.hrl to ejabberd/src/.
  5. Download mod_yaws.erl and put it into ejabberd/src/.
  6. Compile ejabberd:

    ./configure
    make
  7. Edit ejabberd.cfg and enable the new module. Example config:

    {mod_yaws,     [
                      {logdir, "/tmp/"},
                      {servers, [
                        {"localhost", 5224, "/home/test/www", [
                          {dir_listing, true},
                          {ip, {127, 0, 0, 1}}
                        ]}
                      ]}
      ]},

    Make sure the /home/test/www directory exists and is readable by the user that will execute ejabberd.

  8. mod_yaws needs access to Yaws binary files. You have two options:
    • Copy all Yaws' beam files to the same directory where these of ejabberd are stored.
    • Alternatively, modify your ejabberd start script and add the Yaws binary directory to the search path with next option when calling Erlang:

      erl ... -pa '/home/test/yaws/ebin/'
  9. Start ejabberd. If everything is right, the log file must show a message like this:

    =INFO REPORT==== 28-Jul-2006::13:58:09 ===
    Yaws: Listening to 127.0.0.1:5224 for servers
     - http://localhost:5224 under /home/test/www

    Now you can point your browser to http://localhost:5224/ but of course there is nothing interesting there. You can later define multiple Yaws domains, for example:

    • jwchat.example.org to serve JWChat and disable dir_listing for that directory.

JWChat

  1. Download JWChat to the www/ directory.
  2. Uncompress JWChat:

    tar -xzvf jwchat-1.0beta2.tar.gz
    mv jwchat-1.0beta2 jwchat
    cd jwchat
  3. Edit config.js and set the following options:

    var SITENAME = "localhost"
    var BACKENDS =
    [
    	{
           		name:"Ejabberd",
    	       	description:"Ejabberd's native HTTP Polling backend",
           		httpbase:"polling/http-poll/",
    	       	type:"polling",
    	       	servers_allowed:[SITENAME]
           	},
    ];
    var DEFAULTCONFERENCEROOM = "talks";
    var DEFAULTCONFERENCESERVER = "conference.localhost";
  4. Only one translation language can be used, so enter the jwchat/ directory and rename the files of the language you prefer with a command like this:

    for a in $(ls *.en); do b=${a%.en}; cp $a $b; done

MUCkl

  1. Download MUCkl to the www/ directory.
  2. Uncompress MUCkl:

    tar -xzvf MUCkl-0.4.2.tar.gz
    mv MUCkl-0.4.2 muckl
  3. Edit config.js and set the following options:

    var BACKENDTYPE = 'polling';
    var HTTPBASE = "polling/http-poll/";
    var XMPPDOMAIN = "localhost";
    var MUCKLJID = "muckl";
    var MUCKLPASS = "mucklpass";
    var ROOMS =
    [
            {
                    name:'talks',
                    description:'the place to be...',
                    server:'conference.localhost'
            },
    ];
  4. Make sure the chatroom or chatrooms you specified really exist, and that they are persistent. You can create and configure the chatroom using JWChat.
  5. Create an account on your ejabberd Jabber server with the username you specified for MUCKLJID and the password for MUCKLPASS. You can create the account using JWChat.
  6. Enable Anonymous Login support in ejabberd.cfg with something like this:

    {host_config, "example.org", [{auth_method, [anonymous, internal]}]}.

    You need to restart ejabberd for this change to take effect.

Yaws' Wiki

  1. Copy the Wiki web files to the www/ directory:

    cp -R yaws/applications/wiki/wiki/ www/
  2. Compile the Wiki binaries provided with Yaws:

    cd yaws/applications/wiki
    make
  3. Copy the Wiki beam files from the ebin/ directory to Yaws' ebin directory:

    cp yaws/applications/wiki/ebin/* yaws/ebin/

Yaws' Chat

Remark: this program is not very usefull if you already have MUCkl installed.

  1. Copy the Chat web files to the the www/ directory:

    cp -R yaws/applications/chat/chat/ www/
  2. Compile the Chat code provided with Yaws:

    cd yaws/applications/chat
    mkdir ebin
    make
  3. Copy the Chat beam files from the ebin/ directory to Yaws' ebin directory:

    cp yaws/applications/chat/ebin/* yaws/ebin/

EyeOS

Requirement: you need to have PHP CGI installed.

  1. Download EyeOS source package to the www/ directory.
  2. Uncompress EyeOS:

    tar -xzvf eyeOS-0.9.0-4.tar.gz  
    mv eyeOS eyeos

JRU-PHP

Requirement: you need to have PHP CGI installed.

Warning: this program does not run currently. Help is appreciated.

  1. Download JRU-PHP to the www/ directory.
  2. Uncompress JRU-PHP:

    unzip jru-php-0.6.1.zip -d jru-php

Jeti

Requirement: the end user's web browser must have Java installed to use this Jabber client.

  1. Download the Jeti applet to the www/ directory.
  2. Uncompress the applet:

    unzip applet0.7.5.zip 
    mv applet jeti
Syndicate content