liquid_feedback_frontend

annotate INSTALL.mkd @ 1668:6d75df24e66e

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

Impressum / About Us