Mercurial > libervia-pubsub
annotate INSTALL @ 159:6fe78048baf9
Rework error handling, depend on Twisted Words 0.4.0.
Twisted Words 0.4.0 introduced support for stanza error handling, much better
than the custom error handling in Idavoll. Also, all protocol-level errors
were examined and brought up to date with version 1.8 of JEP-0060.
As a result of the error examination, the retrieval of default configuration
options using <default/> is now supported properly.
author | Ralph Meijer <ralphm@ik.nu> |
---|---|
date | Wed, 06 Sep 2006 12:38:47 +0000 |
parents | 5191ba7c4df8 |
children | ef22e4150caa |
rev | line source |
---|---|
155 | 1 Requirements |
2 ============ | |
3 | |
4 - Twisted Core >= 2.0.0 | |
159
6fe78048baf9
Rework error handling, depend on Twisted Words 0.4.0.
Ralph Meijer <ralphm@ik.nu>
parents:
155
diff
changeset
|
5 - Twisted Words >= 0.4.0 |
155 | 6 - uuid.py (http://ofxsuite.berlios.de/uuid.py) |
7 - A jabber server that supports the component protocol (JEP-0114) | |
8 | |
9 For the PostgreSQL backend, the following is also required: | |
10 | |
11 - PostgreSQL | |
12 - pyPgSQL | |
13 | |
14 Installation | |
15 ============ | |
16 | |
17 Run: | |
18 | |
19 python setup.py install | |
20 | |
21 Configuration | |
22 ============= | |
23 | |
24 The configuration file is created using Twisted's mktap, which needs a number | |
25 of parameters: | |
26 | |
27 --jid: The Jabber ID the component will assume. | |
28 --rport: the port number of the Jabber server to connect to | |
29 --secret: the secret used to authenticate with the Jabber server. | |
30 --backend: the backend storage facility to be used (memory or PostgreSQL). | |
31 | |
32 The default settings of mktap for Idavoll use the memory database and assume | |
33 the default settings of jabberd 2.x for --rport and --secret. | |
34 | |
35 jabberd 2.x | |
36 =========== | |
37 You can use the 'legacy' component support that defaults to port 5347 with | |
38 secret 'secret'. You do not need to add anything specific for this service. | |
39 | |
40 jabberd 1.4.x | |
41 ============= | |
42 | |
43 Put the following in the jabber.xml configuration file of jabberd: | |
44 | |
45 <service id='pubsub.localhost'> | |
46 <accept> | |
47 <ip>127.0.0.1</ip> | |
48 <port>5347</port> | |
49 <secret>secret</secret> | |
50 </accept> | |
51 </service> | |
52 | |
53 and restart jabberd. Unlike jabber 2.x, you can only have one component per | |
54 port, so the port number may need to be changed. | |
55 | |
56 For other server implementations, please refer to its documentation on | |
57 how to interact with server side components using the protocol defined in | |
58 JEP-0114. | |
59 | |
60 Then, in the same directory as this file run: | |
61 | |
62 mktap idavoll --rport=5347 --jid=pubsub.localhost --secret=secret | |
63 | |
64 This uses the (default) memory based backend. | |
65 | |
66 For using the PostgreSQL backend, create a database (for example named pubsub) | |
67 like so: | |
68 | |
69 createdb pubsub | |
70 psql pubsub <db/pubsub.sql | |
71 | |
72 To use this backend, add the --backend=pgsql parameter to mktap. | |
73 | |
74 For viewing all options, run: | |
75 | |
76 mktap idavoll --help | |
77 | |
78 The generated file idavoll.tap now holds the configuration. | |
79 | |
80 Running | |
81 ======= | |
82 | |
83 Using the configuration file idavoll.tap, run: | |
84 | |
85 twistd -of idavoll.tap | |
86 | |
87 This will start the service and run it in the background. It generates a | |
88 file twistd.pid that holds the PID of the service and a log file twistd.log. | |
89 The twistd utility has a fair number of options that might be useful, and | |
90 can be viewed with: | |
91 | |
92 twistd --help |