Mercurial > libervia-pubsub
comparison doc/installation.rst @ 425:968091cea547
doc: installation instructions corrections
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 13 Sep 2020 15:51:32 +0200 |
parents | f124ed5ea78b |
children | f6f4f99f1a1b |
comparison
equal
deleted
inserted
replaced
424:3fce48c0a44d | 425:968091cea547 |
---|---|
11 | 11 |
12 Requirements | 12 Requirements |
13 ------------ | 13 ------------ |
14 | 14 |
15 - Python 3.7+ | 15 - Python 3.7+ |
16 - Python 3 "venv", which may be installed with Python 3 | |
17 - Mercurial | |
16 - Twisted >= 15.2.0: | 18 - Twisted >= 15.2.0: |
17 - Twisted Core | 19 - Twisted Core |
18 - Twisted Words | 20 - Twisted Words |
19 - Wokkel >= 0.7.1 (http://wokkel.ik.nu/) | 21 - Wokkel >= 0.7.1 (http://wokkel.ik.nu/) |
20 - A XMPP server that supports the component protocol (XEP-0114), | 22 - A XMPP server that supports the component protocol (XEP-0114), |
33 ------------------------- | 35 ------------------------- |
34 | 36 |
35 To install SàT PubSub we'll work in a virtual environment. On Debian and derivatives you | 37 To install SàT PubSub we'll work in a virtual environment. On Debian and derivatives you |
36 should easily install dependencies with this:: | 38 should easily install dependencies with this:: |
37 | 39 |
38 sudo apt-get install postgresql python-dev mercurial virtualenv | 40 sudo apt-get install postgresql python3-dev python3-venv python3-wheel mercurial |
39 | 41 |
40 Now go in a location where you can install SàT Pubsub, for instance your home directory:: | 42 Now go in a location where you can install SàT Pubsub, for instance your home directory:: |
41 | 43 |
42 $ cd | 44 $ cd |
43 | 45 |
58 ----------------- | 60 ----------------- |
59 | 61 |
60 Once SàT Pubsub is installed, you'll need to create a PostgreSQL user, and create the | 62 Once SàT Pubsub is installed, you'll need to create a PostgreSQL user, and create the |
61 database:: | 63 database:: |
62 | 64 |
63 % sudo -u postgres createuser -d -P $(whoami) | 65 % sudo -u postgres createuser -d -P $(whoami) |
64 % createdb pubsub | 66 % createdb pubsub |
65 % cd /tmp && wget https://repos.goffi.org/sat_pubsub/raw-file/tip/db/pubsub.sql | 67 % cd /tmp && wget https://repos.goffi.org/sat_pubsub/raw-file/tip/db/pubsub.sql |
66 % psql pubsub < pubsub.sql | 68 % psql pubsub < pubsub.sql |
67 | 69 |
68 | 70 |
69 .. _prosody_configuration: | 71 .. _prosody_configuration: |
70 | 72 |
71 Prosody Configuration | 73 Prosody Configuration |
79 - add these two lines at the end of your ``prosody.cfg.lua`` file, adapting them to your XMPP | 81 - add these two lines at the end of your ``prosody.cfg.lua`` file, adapting them to your XMPP |
80 server domain (virtual host) and selecting a password of your choice: | 82 server domain (virtual host) and selecting a password of your choice: |
81 | 83 |
82 .. sourcecode:: lua | 84 .. sourcecode:: lua |
83 | 85 |
84 Component "sat-pubsub.<xmpp_domain>" | 86 Component "pubsub.<xmpp_domain>" |
85 component_secret = "<password>" | 87 component_secret = "<password>" |
86 | 88 |
87 - there are extra steps to enable the micro-blogging feature with Prosody. Please follow | 89 - there are extra steps to enable the micro-blogging feature with Prosody. Please follow |
88 the installation and configuration instructions that are given on these pages: | 90 the installation and configuration instructions that are given on these pages: |
89 | 91 |
108 | 110 |
109 Once your symlinks are set, to update the modules we just need to type this: | 111 Once your symlinks are set, to update the modules we just need to type this: |
110 | 112 |
111 .. sourcecode:: shell | 113 .. sourcecode:: shell |
112 | 114 |
113 % cd /path/to/install_dir/prosody-modules | 115 % cd /path/to/install_dir/prosody-modules |
114 % hg pull -u | 116 % hg pull -u |
115 | 117 |
116 Here is an example of how your ``prosody.cfg.lua`` should look like with | 118 Here is an example of how your ``prosody.cfg.lua`` should look like with |
117 ``mod_delegation`` and ``mod_privilege`` activated: | 119 ``mod_delegation`` and ``mod_privilege`` activated: |
118 | 120 |
119 .. sourcecode:: lua | 121 .. sourcecode:: lua |
167 Running SàT PubSub | 169 Running SàT PubSub |
168 ------------------ | 170 ------------------ |
169 | 171 |
170 The minimal example for running sat_pubsub is: | 172 The minimal example for running sat_pubsub is: |
171 | 173 |
172 % twistd sat_pubsub | 174 % twistd sat-pubsub |
173 | 175 |
174 This will start the service and run it in the background. It generates a | 176 This will start the service and run it in the background. It generates a |
175 file twistd.pid that holds the PID of the service and a log file twistd.log. | 177 file twistd.pid that holds the PID of the service and a log file twistd.log. |
176 The twistd utility has a fair number of options that might be useful, and | 178 The twistd utility has a fair number of options that might be useful, and |
177 can be viewed with: | 179 can be viewed with: |
181 When the service starts, it will connect to the XMPP server at the local machine using the | 183 When the service starts, it will connect to the XMPP server at the local machine using the |
182 component protocol, and assumes the JID ``pubsub``. This assumes a couple of defaults | 184 component protocol, and assumes the JID ``pubsub``. This assumes a couple of defaults |
183 which can be overridden by passing parameters to the twistd plugin. You can get an | 185 which can be overridden by passing parameters to the twistd plugin. You can get an |
184 overview of the parameters and their defaults using: | 186 overview of the parameters and their defaults using: |
185 | 187 |
186 % twistd sat_pubsub --help | 188 % twistd sat-pubsub --help |
187 | 189 |
188 In particular, the following parameters will be of interest: | 190 In particular, the following parameters will be of interest: |
189 | 191 |
190 ``--jid`` | 192 ``--jid`` |
191 The Jabber ID the component will assume. | 193 The Jabber ID the component will assume. |
196 ``--xmpp_pwd`` | 198 ``--xmpp_pwd`` |
197 the secret used to authenticate with the XMPP server. | 199 the secret used to authenticate with the XMPP server. |
198 | 200 |
199 For example:: | 201 For example:: |
200 | 202 |
201 twistd sat_pubsub --jid=sat-pubsub.<your_xmpp_domain> --xmpp_pwd=<password> | 203 twistd sat-pubsub --jid=sat-pubsub.<your_xmpp_domain> --xmpp_pwd=<password> |
202 | 204 |
203 You can set your options in ``sat.conf`` which is the same file used as for Salut à Toi | 205 You can set your options in ``sat.conf`` which is the same file used as for Salut à Toi |
204 ecosystem. Please check backend ``configuration`` section for details. The SàT PubSub | 206 ecosystem. Please check backend ``configuration`` section for details. The SàT PubSub |
205 options must be in ``[pubsub]`` section. | 207 options must be in ``[pubsub]`` section. |
206 | 208 |