Mercurial > libervia-pubsub
annotate INSTALL @ 326:b76cbf59772b
update INSTALL file, we don't use remote roster anymore
author | souliane <souliane@mailoo.org> |
---|---|
date | Fri, 04 Mar 2016 11:26:07 +0100 |
parents | b757c29b20d7 |
children | 6662cc9519cc |
rev | line source |
---|---|
155 | 1 Requirements |
2 ============ | |
3 | |
193 | 4 - Twisted >= 8.0.1: |
5 - Twisted Core | |
6 - Twisted Words | |
168
e2c2c2baf483
Fix use of uuid module now shipping with Python 2.5.
Ralph Meijer <ralphm@ik.nu>
parents:
167
diff
changeset
|
7 - uuid.py (Python 2.5 std. lib. or http://pypi.python.org/pypi/uuid) |
212
edabaa535476
These files also belong to the Idavoll 0.9.0 release.
Ralph Meijer <ralphm@ik.nu>
parents:
207
diff
changeset
|
8 - Wokkel >= 0.5.0 (http://wokkel.ik.nu/) |
264 | 9 - A Jabber server that supports the component protocol (XEP-0114), |
326
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
10 and, to enable the micro-blogging feature, the Namespace Delegation |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
11 (XEP-0355) and Privileged Entity (XEP-0356) protocols. We recommend |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
12 using Prosody. |
155 | 13 |
14 For the PostgreSQL backend, the following is also required: | |
15 | |
276
b757c29b20d7
import changes from idavoll changeset 233 (24be3a11ddbc), by Ralph Meijer and based on a patch by Nuno Santos
souliane <souliane@mailoo.org>
parents:
264
diff
changeset
|
16 - PostgreSQL (including development files for psycopg2) |
b757c29b20d7
import changes from idavoll changeset 233 (24be3a11ddbc), by Ralph Meijer and based on a patch by Nuno Santos
souliane <souliane@mailoo.org>
parents:
264
diff
changeset
|
17 - psycopg2 |
155 | 18 |
193 | 19 |
155 | 20 Installation |
21 ============ | |
22 | |
264 | 23 sat_pubsub uses setuptools for package building and installing. |
24 To build from the source run: | |
193 | 25 |
26 python setup.py build | |
27 | |
28 Then, to install run the following, possibly as root: | |
155 | 29 |
30 python setup.py install | |
31 | |
193 | 32 See the setuptools documentation for further information on changing |
33 installation locations. | |
34 | |
35 | |
155 | 36 Configuration |
37 ============= | |
38 | |
264 | 39 sat_pubsub uses Twisted's twistd command for running its services. Starting with |
193 | 40 Twisted 2.5.0, twistd supports running Twisted Application Plugins directly, |
41 without the use of mktap. In Twisted 8.1.0, the use of mktap for configuration | |
264 | 42 is deprecated. |
193 | 43 |
264 | 44 Idavoll, on which sat_pubsub is based, provides two types of storage for the backend: |
45 a memory-based storage facility, which is volatile, and a persistent storage facility | |
46 using PostgreSQL. For now, sat_pubsub only uses the persistent storage facility. | |
193 | 47 |
264 | 48 For using the PostgreSQL backend, create a database (for example named pubsub): |
193 | 49 |
264 | 50 sudo -u postgres createuser -d -P `whoami` |
51 createdb pubsub | |
52 psql pubsub < sat_pubsub/db/pubsub.sql | |
193 | 53 |
54 | |
264 | 55 Your Jabber server must also be configured to accept component connections and, |
56 to enable the micro-blogging feature, remote roster management. See below for details. | |
57 | |
193 | 58 |
264 | 59 Running sat_pubsub |
60 ================== | |
193 | 61 |
264 | 62 The minimal example for running sat_pubsub is: |
193 | 63 |
264 | 64 twistd sat_pubsub |
193 | 65 |
66 This will start the service and run it in the background. It generates a | |
67 file twistd.pid that holds the PID of the service and a log file twistd.log. | |
68 The twistd utility has a fair number of options that might be useful, and | |
69 can be viewed with: | |
70 | |
71 twistd --help | |
72 | |
73 When the service starts, it will connect to the Jabber server at the local | |
74 machine using the component protocol, and assumes the JID 'pubsub'. This | |
75 assumes a couple of defaults which can be overridden by passing parameters to | |
76 the twistd plugin. You can get an overview of the parameters and their defaults | |
77 using: | |
78 | |
264 | 79 twistd sat_pubsub --help |
193 | 80 |
81 In particular, the following parameters will be of interest: | |
155 | 82 |
83 --jid: The Jabber ID the component will assume. | |
84 --rport: the port number of the Jabber server to connect to | |
85 --secret: the secret used to authenticate with the Jabber server. | |
86 | |
264 | 87 For example: |
88 | |
89 twistd sat_pubsub --jid=sat-pubsub.<xmpp_domain> --secret=<password> | |
193 | 90 |
91 You may also want to provide the --verbose flag to see the traffic flow, | |
92 for example to debug the configuration. Below some specifics for the | |
264 | 93 Prosody XMPP server implementation. |
193 | 94 |
155 | 95 |
264 | 96 Running sat_pubsub with Prosody |
97 =============================== | |
155 | 98 |
264 | 99 To enable the micro-blogging feature with Prosody XMPP server, you need |
326
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
100 the delegation and privilege plugins: |
155 | 101 |
326
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
102 https://modules.prosody.im/mod_delegation.html |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
103 https://modules.prosody.im/mod_privilege.html |
264 | 104 |
326
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
105 Your prosody.cfg.lua file needs to look a bit like that: |
264 | 106 |
326
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
107 [...] |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
108 modules_enabled = { |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
109 [...] |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
110 "delegation"; |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
111 "privilege"; |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
112 } |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
113 [...] |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
114 VirtualHost "<xmpp_domain>" |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
115 privileged_entities = { |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
116 ["sat-pubsub.<xmpp_domain>"] = { |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
117 roster = "get"; |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
118 message = "outgoing"; |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
119 }, |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
120 } |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
121 delegations = { |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
122 ["urn:xmpp:mam:1"] = { |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
123 filtering = {"node"}; |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
124 jid = "sat-pubsub.<xmpp_domain>"; |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
125 }, |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
126 ["http://jabber.org/protocol/pubsub"] = { |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
127 jid = "sat-pubsub.<xmpp_domain>"; |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
128 }, |
264 | 129 } |
155 | 130 |
326
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
131 Component "sat-pubsub.<xmpp_domain>" |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
132 component_secret = "<password>" |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
133 modules_enabled = {"delegation", "privilege"} |
155 | 134 |
326
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
135 Of course, you have to replace <xmpp_domain> and <password> with the good |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
136 values. |
155 | 137 |
326
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
138 For a more complete installation and configuration of Prosody to be used |
b76cbf59772b
update INSTALL file, we don't use remote roster anymore
souliane <souliane@mailoo.org>
parents:
276
diff
changeset
|
139 with sat_pubsub, please report yourself to the Salut à Toi wiki: |
264 | 140 |
141 http://wiki.goffi.org/wiki/Libervia/en#XMPP_server |