liquid_feedback_frontend

view INSTALL.html @ 1668:6d75df24e66e

Updated German translation
author bsw
date Sun Mar 07 09:52:36 2021 +0100 (2021-03-07)
parents fa9e93235e02
children a92e5df8905c
line source
1 <html><head><title>LiquidFeedback Installation Instructions</title></head><body>
2 <h1>LiquidFeedback Installation Instructions</h1>
4 <p>This document gives a short outline about the necessary steps to setup a
5 LiquidFeedback system.</p>
7 <h2>1. Install necessary dependencies</h2>
9 <p>If you're using a Debian system, make sure that the following packages are
10 installed:</p>
12 <ul>
13 <li>build-essential</li>
14 <li>postgresql</li>
15 <li>postgresql-server-dev-12</li>
16 <li>libbsd-dev</li>
17 <li>lua5.3</li>
18 <li>liblua5.3-dev</li>
19 <li>mercurial</li>
20 <li>bmake</li>
21 <li>lsb-release</li>
22 <li>imagemagick</li>
23 </ul>
25 <p>If you're using any other Linux distribution or BSD system, install the
26 necessary software components accordingly.</p>
28 <h2>2. Ensure that the user account of your webserver has access to the database</h2>
30 <p>The useraccount of Moonbridge server process needs to have access to your
31 PostgreSQL installation. This is done by executing PostgreSQL's shell command
32 <code>createuser</code> as database superuser (usually <code>pgsql</code>, or <code>postgres</code> for
33 Debian installations):</p>
35 <pre><code>su - postgres -s $SHELL
36 createuser --no-superuser --createdb --no-createrole www-data
37 exit
38 </code></pre>
40 <h2>3. Install and configure LiquidFeedback-Core</h2>
42 <p>We recommend to create the database with the same user as your webserver
43 (usually <code>www-data</code>) to avoid having to setup database privileges.</p>
45 <p>The example below installs the database as <code>www-data</code> and stores the three
46 executables <code>lf_update</code>, <code>lf_update_issue_order</code> and
47 <code>lf_update_suggestion_order</code> in the directory <code>/opt/liquid_feedback_core/</code>:</p>
49 <pre><code># Download and unpack LiquidFeedback-Core
50 # from http://www.public-software-group.org/pub/projects/liquid_feedback/backend/
51 make
52 mkdir /opt/liquid_feedback_core
53 cp core.sql lf_update lf_update_issue_order lf_update_suggestion_order /opt/liquid_feedback_core
54 su www-data -s $SHELL
55 cd /opt/liquid_feedback_core
56 createdb liquid_feedback
57 psql -v ON_ERROR_STOP=1 -f core.sql liquid_feedback
58 </code></pre>
60 <p>A simple configuration may look as follows:</p>
62 <pre><code>psql liquid_feedback
64 INSERT INTO system_setting (member_ttl) VALUES ('1 year');
65 INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (false, '1 hour', 20, 6);
66 INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (false, '1 day', 80, 12);
67 INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (true, '1 hour', 200, 60);
68 INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (true, '1 day', 800, 120);
69 </code></pre>
71 <p>Create an invite code for an admin user:</p>
73 <pre><code>INSERT INTO member (invite_code, admin) VALUES ('sesam', true);
74 </code></pre>
76 <p>Exit the <code>psql</code> interface by typing:</p>
78 <pre><code>\q
79 </code></pre>
81 <p>And don't forget to quit the <code>www-data</code> shell:</p>
83 <pre><code>exit
84 </code></pre>
86 <h2>4. Install Moonbridge</h2>
88 <pre><code># Download and unpack Moonbridge
89 # from http://www.public-software-group.org/pub/projects/moonbridge/
90 pmake MOONBR_LUA_PATH=/opt/moonbridge/?.lua
91 mkdir /opt/moonbridge
92 cp moonbridge /opt/moonbridge/
93 cp moonbridge_http.lua /opt/moonbridge/
94 </code></pre>
96 <h2>5. Install WebMCP</h2>
98 <pre><code># Download and unpack WebMCP
99 # from http://www.public-software-group.org/pub/projects/webmcp/
100 make
101 mkdir /opt/webmcp
102 cp -RL framework/* /opt/webmcp/
103 </code></pre>
105 <h2>6. Install the LiquidFeedback-Frontend</h2>
107 <p>Unpack source tree into appropriate directory, e.g. <code>/opt/liquid_feedback_frontend</code>:</p>
109 <pre><code># Download LiquidFeedback-Frontend
110 # from http://www.public-software-group.org/pub/projects/liquid_feedback/frontend/
111 mv liquid_feedback_frontend-vX.X.X /opt/liquid_feedback_frontend
112 </code></pre>
114 <p>Make <code>tmp/</code> directory of LiquidFeedback-Frontend writable for webserver:</p>
116 <pre><code>chown www-data /opt/liquid_feedback_frontend/tmp
117 </code></pre>
119 <h2>7. Configure mail system</h2>
121 <p>It may be necessary to configure your server's mail system.</p>
123 <h2>8. Configure the LiquidFeedback-Frontend</h2>
125 <pre><code>cd /opt/liquid_feedback_frontend/config
126 cp example.lua myconfig.lua
127 # edit myconfig.lua according to your needs
128 </code></pre>
130 <h2>9. Setup regular execution of <code>lf_update</code> and related commands </h2>
132 <p>The executables <code>lf_update</code>, <code>lf_update_issue_order</code>, and
133 <code>lf_update_suggestion_order</code> must be executed regularly. This may be achieved
134 by creating a file named <code>/opt/liquid_feedback_core/lf_update.sh</code> with the
135 following contents:</p>
137 <pre><code>#!/bin/sh
139 while true; do
140 nice /opt/liquid_feedback_core/lf_update dbname=liquid_feedback 2&gt;&amp;1 | logger -t "lf_core"
141 nice /opt/liquid_feedback_core/lf_update_issue_order dbname=liquid_feedback 2&gt;&amp;1 | logger -t "lf_core"
142 nice /opt/liquid_feedback_core/lf_update_suggestion_order dbname=liquid_feedback 2&gt;&amp;1 | logger -t "lf_core"
143 sleep 5
144 done
145 </code></pre>
147 <p>This file must be marked as executable:</p>
149 <pre><code>chmod +x /opt/liquid_feedback_core/lf_updated
150 </code></pre>
152 <p>And this file should be started automatically at system boot. On systems with
153 systemd, create a file named <code>/etc/systemd/system/liquid_feedback_core.service</code>:</p>
155 <pre><code>[Unit]
156 Description=LiquidFeedback Core update
158 [Service]
159 User=www-data
160 ExecStart=/opt/liquid_feedback_core/lf_update.sh
162 [Install]
163 WantedBy=multi-user.target
164 </code></pre>
166 <p>Enable and start the service:
167 systemctl start liquid<em>feedback</em>core
168 systemctl enable liquid<em>feedback</em>core</p>
170 <h2>10. Start the frontend</h2>
172 <p>After <code>lf_update</code> has been executed at least once, you should be able to use
173 your LiquidFeedback system.</p>
175 <p>Create a file named "/opt/liquid<em>feedback</em>frontend/run.sh":</p>
177 <pre><code>#/bin/bash
179 /opt/moonbridge/moonbridge /opt/webmcp/bin/mcp.lua /opt/webmcp/ /opt/liquid_feedback_frontend/ main myconfig 2&gt;&amp;1 | logger -t "lf_frontend"
180 </code></pre>
182 <p>Make it executable:</p>
184 <pre><code>chmod +x /opt/liquid_feedback_frontend/run.sh
185 </code></pre>
187 <p>On systemd based systems, create a file named
188 <code>/etc/systemd/system/liquid_feedback_frontend.service</code>:</p>
190 <pre><code>[Unit]
191 Description=LiquidFeedback Frontend
193 [Service]
194 User=www-data
195 ExecStart=/opt/liquid_feedback_frontend/run.sh
197 [Install]
198 WantedBy=multi-user.target
199 </code></pre>
201 <p>Enable and start the service:
202 systemctl start liquid<em>feedback</em>frontend
203 systemctl enable liquid<em>feedback</em>frontend</p>
205 <p>In the latter case, the Moonbridge server will open a TCP port according to
206 your configuration. Directly accessing this TCP port through your webbrowser
207 is helpful for development purposes. For real-life deployment, however, it is
208 recommended to further proxy the application (e.g. using nginx). The proxy can
209 also add HTTPS and/or HTTP/2 support (which is not supported by Moonbridge
210 itself).</p>
211 </body></html>

Impressum / About Us