wiki:installation

Version 2 (modified by jbe, 17 months ago) (diff)

Configuration of core

How to install LiquidFeedback (stable) on a Debian system with lighttpd

Install debian security updates:

apt-get install update
apt-get install upgrade

Install the neccessary debian packages:

apt-get install lua5.1 postgresql build-essential libpq-dev liblua5.1-0-dev lighttpd ghc libghc6-parsec3-dev imagemagick exim4

Create a database role for www-data:

su - postgres
createuser
Enter name of role to add: www-data
Shall the new role be a superuser? (y/n) n
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

Create a directory for unpacking source tarballs:

cd /root
mkdir install

Install and configure LiquidFeedback Core v1.3.1:

cd /root/install
wget http://www.public-software-group.org/pub/projects/liquid_feedback/backend/v1.3.1/liquid_feedback_core-v1.3.1.tar.gz
tar -xvzf liquid_feedback_core-v1.3.1.tar.gz
cd liquid_feedback_core-v1.3.1
make
mkdir /opt/liquid_feedback_core
cp core.sql lf_update /opt/liquid_feedback_core/
su - www-data
cd /opt/liquid_feedback_core
createdb liquid_feedback
createlang plpgsql liquid_feedback
psql -v ON_ERROR_STOP=1 -f core.sql liquid_feedback
psql liquid_feedback
psql (8.4.9)
Type "help" for help.

liquid_feedback=> SELECT * FROM liquid_feedback_version;
 string | major | minor | revision 
--------+-------+-------+----------
 1.3.1  |     1 |     3 |        1
(1 row)

liquid_feedback=> SELECT * FROM system_setting;
 member_ttl 
------------
(0 rows)

liquid_feedback=> INSERT INTO system_setting (member_ttl) VALUES ('1 year');
INSERT 0 1
liquid_feedback=> SELECT * FROM contingent;
 time_frame | text_entry_limit | initiative_limit 
------------+------------------+------------------
(0 rows)

liquid_feedback=> INSERT INTO contingent (time_frame, text_entry_limit, initiative_limit) VALUES ('1 hour', 20, 6);
INSERT 0 1
liquid_feedback=> INSERT INTO contingent (time_frame, text_entry_limit, initiative_limit) VALUES ('1 day', 80, 12);
INSERT 0 1
liquid_feedback=> SELECT * FROM policy;
 id | index | active | name | description | admission_time | discussion_time | verification_time | voting_time | issue_quorum_num | issue_quorum_den | initiative_quorum_num | initiative_quorum_den | majority_num | majority_den | majority_strict 
----+-------+--------+------+-------------+----------------+-----------------+-------------------+-------------+------------------+------------------+-----------------------+-----------------------+--------------+--------------+-----------------
(0 rows)

liquid_feedback=> 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, majority_num, majority_den, majority_strict) VALUES (1, 'Default policy', '8 days', '15 days', '8 days', '15 days', 10, 100, 10, 100, 1, 2, TRUE);
INSERT 0 1

liquid_feedback=> SELECT * FROM policy;
 id | index | active |      name      | description | admission_time | discussion_time | verification_time | voting_time | issue_quorum_num | issue_quorum_den | initiative_quorum_num | initiative_quorum_den | majority_num | majority_den | majority_strict 
----+-------+--------+----------------+-------------+----------------+-----------------+-------------------+-------------+------------------+------------------+-----------------------+-----------------------+--------------+--------------+-----------------
  1 |     1 | t      | Default policy |             | 8 days         | 15 days         | 8 days            | 15 days     |               10 |              100 |                    10 |                   100 |            1 |            2 | t
(1 row)

liquid_feedback=> SELECT * FROM area;
 id | active | name | description | direct_member_count | member_weight | autoreject_weight | text_search_data 
----+--------+------+-------------+---------------------+---------------+-------------------+------------------
(0 rows)

liquid_feedback=> INSERT INTO area (name) VALUES ('Default area');
INSERT 0 1
liquid_feedback=> SELECT * FROM area;
 id | active |     name     | description | direct_member_count | member_weight | autoreject_weight |   text_search_data   
----+--------+--------------+-------------+---------------------+---------------+-------------------+----------------------
  1 | t      | Default area |             |                     |               |                   | 'area':2 'default':1
(1 row)

liquid_feedback=> SELECT * FROM allowed_policy;
 area_id | policy_id | default_policy 
---------+-----------+----------------
(0 rows)

liquid_feedback=> INSERT INTO allowed_policy (area_id, policy_id, default_policy) VALUES (1, 1, TRUE);
INSERT 0 1
liquid_feedback=> \q
could not save history to file "/var/www/.psql_history": No such file or directory
exit

(this document is not finished yet)