# HG changeset patch # User jbe # Date 1404951289 -7200 # Node ID b9300c2e75dafd293aa9cceffe91c84188876662 # Parent 701a5cf6b067008e2097568556c91c77ae6a2763 Removed RocketWiki from installation instructions diff -r 701a5cf6b067 -r b9300c2e75da INSTALL.html --- a/INSTALL.html Thu Jul 10 01:19:48 2014 +0200 +++ b/INSTALL.html Thu Jul 10 02:14:49 2014 +0200 @@ -1,13 +1,18 @@
-This document gives a short outline about the necessary steps to setup a LiquidFeedback system.
-If you're using a Debian system, make sure that the following packages are installed:
+This document gives a short outline about the necessary steps to setup a +LiquidFeedback system.
+ +If you're using a Debian system, make sure that the following packages are +installed:
+If you're using any other Linux distribution or BSD system, install the necessary software components accordingly.
-Whichever useraccount is used by the webserver (usually www-data
) needs to have access to your PostgreSQL installation. This is done by executing PostgreSQL's shell command createuser
as database superuser (usually pgsql
, or postgres
for Debian installations):
If you're using any other Linux distribution or BSD system, install the +necessary software components accordingly.
+ +Whichever useraccount is used by the webserver (usually www-data
) needs to
+have access to your PostgreSQL installation. This is done by executing
+PostgreSQL's shell command createuser
as database superuser (usually pgsql
,
+or postgres
for Debian installations):
su - postgres
createuser
@@ -31,10 +45,18 @@
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) n
-exit
-We recommend to create the database with the same user as your webserver (usually www-data
) to avoid having to setup database privileges.
The example below installs the database as www-data
and stores the two executables lf_update
and lf_update_issue_order
in the directory /opt/liquid_feedback_core/
:
We recommend to create the database with the same user as your webserver
+(usually www-data
) to avoid having to setup database privileges.
The example below installs the database as www-data
and stores the two
+executables lf_update
and lf_update_issue_order
in the directory
+/opt/liquid_feedback_core/
:
# Download and unpack LiquidFeedback-Core
# from http://www.public-software-group.org/pub/projects/liquid_feedback/backend/
make
@@ -44,148 +66,190 @@
cd /opt/liquid_feedback_core
createdb liquid_feedback
createlang plpgsql liquid_feedback # command may be omitted, depending on PostgreSQL version
-psql -v ON_ERROR_STOP=1 -f core.sql liquid_feedback
+psql -v ON_ERROR_STOP=1 -f core.sql liquid_feedback
+
+
A simple configuration may look as follows:
+psql liquid_feedback
-INSERT INTO system_setting (member_ttl) VALUES ('1 year');
-INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (false, '1 hour', 20, 6);
-INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (false, '1 day', 80, 12);
-INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (true, '1 hour', 200, 60);
-INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (true, '1 day', 800, 120);
-INSERT INTO policy (index, name, admission_time, discussion_time, verification_time, voting_time, issue_quorum_num, issue_quorum_den, initiative_quorum_num, initiative_quorum_den) VALUES (1, 'Default policy', '8 days', '15 days', '8 days', '15 days', 10, 100, 10, 100);
-INSERT INTO unit (name) VALUES ('Our organization');
-INSERT INTO area (unit_id, name) VALUES (1, 'Default area');
-INSERT INTO allowed_policy (area_id, policy_id, default_policy) VALUES (1, 1, TRUE);
+INSERT INTO system_setting (member_ttl) VALUES ('1 year');
+INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (false, '1 hour', 20, 6);
+INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (false, '1 day', 80, 12);
+INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (true, '1 hour', 200, 60);
+INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (true, '1 day', 800, 120);
+INSERT INTO policy (index, name, admission_time, discussion_time, verification_time, voting_time, issue_quorum_num, issue_quorum_den, initiative_quorum_num, initiative_quorum_den) VALUES (1, 'Default policy', '8 days', '15 days', '8 days', '15 days', 10, 100, 10, 100);
+INSERT INTO unit (name) VALUES ('Our organization');
+INSERT INTO area (unit_id, name) VALUES (1, 'Default area');
+INSERT INTO allowed_policy (area_id, policy_id, default_policy) VALUES (1, 1, TRUE);
+
+
If you want to create an admin user with an empty password (CAUTION!), then execute the following SQL statement:
-INSERT INTO member (login, name, admin, password) VALUES ('admin', 'Administrator', TRUE, '$1$/EMPTY/$NEWt7XJg2efKwPm4vectc1');
+
+INSERT INTO member (login, name, admin, password) VALUES ('admin', 'Administrator', TRUE, '$1$/EMPTY/$NEWt7XJg2efKwPm4vectc1');
+
+
Exit the psql
interface by typing:
\q
+
+\q
+
+
And don't forget to quit the www-data
shell:
exit
-Note: Using Debian, it may be necessary to append -I /usr/include/lua5.1
at the end of the CFLAGS line in Makefile.options
of the WebMCP source distibution:
exit
+
+
+Note: Using Debian, it may be necessary to append -I /usr/include/lua5.1
at
+the end of the CFLAGS line in Makefile.options
of the WebMCP source
+distibution:
# Download and unpack WebMCP
# from http://www.public-software-group.org/pub/projects/webmcp/
vi Makefile.options # Debian requires -I /usr/include/lua5.1 at end of CFLAGS line
make
mkdir /opt/webmcp
-cp -RL framework/* /opt/webmcp/
-# Download and unpack "RocketWiki LqFb-Edition"
-# from http://www.public-software-group.org/pub/projects/rocketwiki/liquid_feedback_edition/
-make
-mkdir /opt/rocketwiki-lqfb
-cp rocketwiki-lqfb rocketwiki-lqfb-compat /opt/rocketwiki-lqfb/
-If you experience problems with multi-byte encoding (UTF-8) later, then apply the following patch to both rocketwiki-lqfb.hs
and rocketwiki-lqfb-compat.hs
prior compilation:
--- rocketwiki-lqfb.hs
-+++ rocketwiki-lqfb.hs
-@@ -1,4 +1,6 @@
+cp -RL framework/* /opt/webmcp/
+
-+import System.IO (hSetEncoding, stdin, stdout, utf8)
-+
- import Text.ParserCombinators.Parsec
- import Control.Applicative ((<$>), (<*>))
- import Data.List (intercalate)
-@@ -405,7 +407,10 @@
- return htmlEntity
-
-
--main = interact wikiParse
-+main = do
-+ hSetEncoding stdin utf8
-+ hSetEncoding stdout utf8
-+ interact wikiParse
+Unpack source tree into appropriate directory, e.g. /opt/liquid_feedback_frontend
:
# Download LiquidFeedback-Frontend
# from http://www.public-software-group.org/pub/projects/liquid_feedback/frontend/
-mv liquid_feedback_frontend-vX.X.X /opt/liquid_feedback_frontend
+mv liquid_feedback_frontend-vX.X.X /opt/liquid_feedback_frontend
+
+
Create HTML code for help texts:
+cd /opt/liquid_feedback_frontend/locale
-PATH=/opt/rocketwiki-lqfb:$PATH make
+PATH=/opt/rocketwiki-lqfb:$PATH make
+
+
Make tmp/
directory of LiquidFeedback-Frontend writable for webserver:
chown www-data /opt/liquid_feedback_frontend/tmp
+
+chown www-data /opt/liquid_feedback_frontend/tmp
+
+
Compile binary for fast delivery of member images:
+cd /opt/liquid_feedback_frontend/fastpath
vi getpic.c # check and modify #define commands as necessary
-make
-It may be necessary to configure your server's mail system, e.g. running dpkg-reconfigure exim4-config
on a Debian system.
A sample configuration for lighttpd
is given below (assuming mod_alias
has been included elsewhere):
server.modules += ("mod_cgi", "mod_rewrite", "mod_redirect", "mod_setenv")
+make
+
+
+It may be necessary to configure your server's mail system, e.g. running
+dpkg-reconfigure exim4-config
on a Debian system.
A sample configuration for lighttpd
is given below (assuming mod_alias
has
+been included elsewhere):
server.modules += ("mod_cgi", "mod_rewrite", "mod_redirect", "mod_setenv")
# Enable CGI-Execution of *.lua files through lua binary
-cgi.assign += ( ".lua" => "/usr/bin/lua5.1" )
+cgi.assign += ( ".lua" => "/usr/bin/lua5.1" )
-alias.url += ( "/lf/fastpath/" => "/opt/liquid_feedback_frontend/fastpath/",
- "/lf/static" => "/opt/liquid_feedback_frontend/static",
- "/lf" => "/opt/webmcp/cgi-bin" )
+alias.url += ( "/lf/fastpath/" => "/opt/liquid_feedback_frontend/fastpath/",
+ "/lf/static" => "/opt/liquid_feedback_frontend/static",
+ "/lf" => "/opt/webmcp/cgi-bin" )
# Configure environment for demo application
-$HTTP["url"] =~ "^/lf" {
+$HTTP["url"] =~ "^/lf" {
setenv.add-environment += (
- "LANG" => "en_US.UTF-8",
- "WEBMCP_APP_BASEPATH" => "/opt/liquid_feedback_frontend/",
- "WEBMCP_CONFIG_NAME" => "myconfig")
+ "LANG" => "en_US.UTF-8",
+ "WEBMCP_APP_BASEPATH" => "/opt/liquid_feedback_frontend/",
+ "WEBMCP_CONFIG_NAME" => "myconfig")
}
# URL beautification
url.rewrite-once += (
# do not rewrite static URLs
- "^/lf/fastpath/(.*)$" => "/lf/fastpath/$1",
- "^/lf/static/(.*)$" => "/lf/static/$1",
+ "^/lf/fastpath/(.*)$" => "/lf/fastpath/$1",
+ "^/lf/static/(.*)$" => "/lf/static/$1",
# dynamic URLs
- "^/lf/([^\?]*)(\?(.*))?$" => "/lf/webmcp-wrapper.lua?_webmcp_path=$1&$3",
+ "^/lf/([^\?]*)(\?(.*))?$" => "/lf/webmcp-wrapper.lua?_webmcp_path=$1&$3",
)
-$HTTP["url"] =~ "^/lf/fastpath/" {
- cgi.assign = ( "" => "" )
- setenv.add-response-header = ( "Cache-Control" => "private; max-age=86400" )
-}
-If you're using Debian, you may want to create a file with the name /etc/lighttpd/conf-available/60-liquidfeedback.conf
and create a softlink in /etc/lighttpd/conf-enabled/
.
If you're using Debian, you may want to create a file with the name
+/etc/lighttpd/conf-available/60-liquidfeedback.conf
and create a softlink in
+/etc/lighttpd/conf-enabled/
.
cd /opt/liquid_feedback_frontend/config
cp example.lua myconfig.lua
-# edit myconfig.lua according to your needs
-Use the following option in your configuration file to enable fast image loading:
+# edit myconfig.lua according to your needs + + +Use the following option in your configuration file to enable fast image +loading:
+config.fastpath_url_func = function(member_id, image_type)
- return request.get_absolute_baseurl() .. "fastpath/getpic?" .. tostring(member_id) .. "+" .. tostring(image_type)
-end
-lf_update
and lf_update_suggestion_order
The executables lf_update
and lf_update_suggestion_order
must be executed regularly. This may be achieved by creating a file named /opt/liquid_feedback_core/lf_updated
with the following contents:
lf_update
and lf_update_suggestion_order
The executables lf_update
and lf_update_suggestion_order
must be executed
+regularly. This may be achieved by creating a file named
+/opt/liquid_feedback_core/lf_updated
with the following contents:
#!/bin/sh
-PIDFILE="/var/run/lf_updated.pid"
+PIDFILE="/var/run/lf_updated.pid"
PID=$$
-if [ -f "${PIDFILE}" ] && kill -CONT $( cat "${PIDFILE}" ); then
- echo "lf_updated is already running."
+if [ -f "${PIDFILE}" ] && kill -CONT $( cat "${PIDFILE}" ); then
+ echo "lf_updated is already running."
exit 1
fi
-echo "${PID}" > "${PIDFILE}"
+echo "${PID}" > "${PIDFILE}"
while true; do
- su - www-data -c 'nice /opt/liquid_feedback_core/lf_update dbname=liquid_feedback 2>&1 | logger -t "lf_updated"'
- su - www-data -c 'nice /opt/liquid_feedback_core/lf_update_suggestion_order dbname=liquid_feedback 2>&1 | logger -t "lf_updated"'
+ su - www-data -c 'nice /opt/liquid_feedback_core/lf_update dbname=liquid_feedback 2>&1 | logger -t "lf_updated"'
+ su - www-data -c 'nice /opt/liquid_feedback_core/lf_update_suggestion_order dbname=liquid_feedback 2>&1 | logger -t "lf_updated"'
sleep 5
-done
+done
+
+
This file must be marked as executable:
-chmod +x /opt/liquid_feedback_core/lf_updated
+
+chmod +x /opt/liquid_feedback_core/lf_updated
+
+
And this file should be started automatically at system boot.
-In addition to regular execution of lf_update
and lf_update_suggestion_order
, the following commands should be executed in background:
In addition to regular execution of lf_update
and
+lf_update_suggestion_order
, the following commands should be executed in
+background:
su - www-data
cd /opt/liquid_feedback_frontend/
-echo "Event:send_notifications_loop()" | ../webmcp/bin/webmcp_shell myconfig
-After lf_update
has been executed at least once, and the webserver has been restarted (using the configuration above), you should be able to access your LiquidFeedback system.
After lf_update
has been executed at least once, and the webserver has been
+restarted (using the configuration above), you should be able to access your
+LiquidFeedback system.