- 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
- Download Yaws
-
Uncompress Yaws:
tar -xzvf yaws-1.65.tar.gz rm yaws mv yaws-1.65 yaws cd yaws
-
Compile Yaws:
./configure --disable-pam make
- Copy yaws/include/yaws.hrl to ejabberd/src/.
- Download mod_yaws.erl and put it into ejabberd/src/.
-
Compile ejabberd:
./configure make
-
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.
- 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/'
-
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
- Download JWChat to the www/ directory.
-
Uncompress JWChat:
tar -xzvf jwchat-1.0beta2.tar.gz mv jwchat-1.0beta2 jwchat cd jwchat
-
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";
-
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
- Download MUCkl to the www/ directory.
-
Uncompress MUCkl:
tar -xzvf MUCkl-0.4.2.tar.gz mv MUCkl-0.4.2 muckl
-
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' }, ];
- Make sure the chatroom or chatrooms you specified really exist, and that they are persistent. You can create and configure the chatroom using JWChat.
- 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.
-
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
-
Copy the Wiki web files to the www/ directory:
cp -R yaws/applications/wiki/wiki/ www/
-
Compile the Wiki binaries provided with Yaws:
cd yaws/applications/wiki make
-
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.
-
Copy the Chat web files to the the www/ directory:
cp -R yaws/applications/chat/chat/ www/
-
Compile the Chat code provided with Yaws:
cd yaws/applications/chat mkdir ebin make
-
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.
- Download EyeOS source package to the www/ directory.
-
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.
- Download JRU-PHP to the www/ directory.
-
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.
- Download the Jeti applet to the www/ directory.
-
Uncompress the applet:
unzip applet0.7.5.zip mv applet jeti