From 64c21787babd5665dec7a6d81366d59f8e6f2bfb Mon Sep 17 00:00:00 2001 From: Mark Longair Date: Fri, 20 Apr 2012 15:43:46 +0100 Subject: Suggest "git clone --recursive " as an alternative --- notes/INSTALL.pod | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'notes') diff --git a/notes/INSTALL.pod b/notes/INSTALL.pod index ea549bd7e..cf0034eb5 100644 --- a/notes/INSTALL.pod +++ b/notes/INSTALL.pod @@ -13,6 +13,11 @@ following command from inside the fixmystreet directory: git submodule update --init +If you're using git version 1.6.5 or later, you can do those steps in +one go with: + + git clone --recursive https://github.com/mysociety/fixmystreet.git + =head1 REQUIREMENTS On the server you are installing FixMyStreet on you will need the following things: -- cgit v1.2.3 From a3bd45f927836d826cf0f6141bc63f3b1972eddd Mon Sep 17 00:00:00 2001 From: Mark Longair Date: Fri, 20 Apr 2012 15:44:10 +0100 Subject: There's no need to "unpack" the code after cloning --- notes/INSTALL.pod | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'notes') diff --git a/notes/INSTALL.pod b/notes/INSTALL.pod index cf0034eb5..087deebc5 100644 --- a/notes/INSTALL.pod +++ b/notes/INSTALL.pod @@ -86,16 +86,14 @@ geolocation services. =head1 DETAILED INSTALLATION INSTRUCTIONS -=head2 Unpacking the Code - -Once you've downloaded the code you should unpack it. The best place to do this -is in the location you want the web server vhost to be. - =head2 Creating the database The default settings file assumes the database is called fms and the user the same. You can change these if you like. + + + =head2 Set up the database Once you've created the database you can use the sql in C to create the required -- cgit v1.2.3 From 3400e9b9d10107fa210df3d64b32fae25fdf9bbd Mon Sep 17 00:00:00 2001 From: Mark Longair Date: Mon, 23 Apr 2012 10:00:19 +0100 Subject: Add step-by-step instructions for creating the database. --- notes/INSTALL.pod | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 54 insertions(+), 4 deletions(-) (limited to 'notes') diff --git a/notes/INSTALL.pod b/notes/INSTALL.pod index 087deebc5..e13178601 100644 --- a/notes/INSTALL.pod +++ b/notes/INSTALL.pod @@ -88,18 +88,68 @@ geolocation services. =head2 Creating the database -The default settings file assumes the database is called fms and the user the same. +The default settings file (C) assumes the database is called fms and the user the same. You can change these if you like. +If you wish to create this new database and database user with +password authentication, the following steps may help. First, create +the fms user: + $ sudo -u postgres createuser fms + Shall the new role be a superuser? (y/n) n + Shall the new role be allowed to create databases? (y/n) n + Shall the new role be allowed to create more new roles? (y/n) n +Then create the fms database: + + $ sudo -u postgres createdb fms + +Set the password of the fms user, and change the owner of the fms database to be the fms user: + + $ sudo -u postgres psql + postgres=# ALTER USER fms WITH PASSWORD 'somepassword' + ALTER ROLE + postgres=# ALTER DATABASE fms OWNER to fms; + ALTER DATABASE + postgres=# \q + $ + +Then you need to configure PostgreSQL to allow password-based access +to the fms database as the user fms from using Unix-domain sockets. +Edit the file C and add as the +first line: + + local fms fms md5 + +You will then need to restart PostgreSQL with: + + $ sudo /etc/init.d/postgresql restart + +If you want to access the database from the command line, you can add +the following line to C<~/.pgpass>: + + localhost:*:fms:fms:somepassword + +Then you should be able to access the database with: + + $ psql -U fms fms =head2 Set up the database -Once you've created the database you can use the sql in C to create the required +Before creating the database schema, you will need to install the +PostgreSQL's SQL procedural language into the database: + + createlang -U fms plpgsql fms + +Now you can use the sql in C to create the required tables, triggers and stored procedures. You will also need to run -C which -populates the alert_types table. +C which populates the alert_types table. For +example, you might run: + + $ psql -U fms fms < db/schema.sql + ... + $ psql -U fms fms < db/alert_types.sql + ... =head2 Install Perl modules -- cgit v1.2.3 From afa22b4d5f3ba46e829280b438e13c589b699dda Mon Sep 17 00:00:00 2001 From: Mark Longair Date: Mon, 23 Apr 2012 10:01:06 +0100 Subject: Add some instructions on using the Catalyst development server Thanks to Struan Donald for explaining to me how to do this. --- notes/INSTALL.pod | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'notes') diff --git a/notes/INSTALL.pod b/notes/INSTALL.pod index e13178601..fc89547bf 100644 --- a/notes/INSTALL.pod +++ b/notes/INSTALL.pod @@ -183,6 +183,21 @@ the required development tools. =head2 Set up Webserver +For production use of FixMyStreet, we suggest you use Apache and +FastCGI. (See below.) For local development, however, you can use +the Catalyst development server. First, install the Catalyst +development tools with: + + ./bin/cron-wrapper local/bin/carton install Catalyst::Devel + +Then the development server can be run with: + + CATALYST_DEBUG=1 ./bin/cron-wrapper ./script/fixmystreet_app_server.pl -r + +The server will be accessible as L. + +=head3 Setting up Apache + It is recommended that you run FixMyStreet using FastCGI. It should also be possible to run it using Plack/PSGI. -- cgit v1.2.3 From b556389f66d5b99d62364a363c068fc99e6fa1c6 Mon Sep 17 00:00:00 2001 From: Mark Longair Date: Mon, 23 Apr 2012 11:00:46 +0100 Subject: Move towards one package list for a defined distribution The previous version of the instructions suggested an xargs invocation that didn't work: a whitespace-separated '|' in conf/packages caused every package to be selected. It also seems like a good idea to have package lists and instructions that are specific to a known-to-work distribution, and add others if they are contributed. --- notes/INSTALL.pod | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'notes') diff --git a/notes/INSTALL.pod b/notes/INSTALL.pod index fc89547bf..3cc88e937 100644 --- a/notes/INSTALL.pod +++ b/notes/INSTALL.pod @@ -55,17 +55,16 @@ to CSS convertor. You can get one from L If you're expecting a lot of traffic it's recommended that you install memcached: L -If you're using a Debian based Linux distribution then the packages to install -some required dependencies (though not all the required Perl modules) are -listed in C. To install all of them you can run: +If you're using Debian 6.0 ("squeeze") then the packages to install +some required dependencies (though not all the required Perl modules) +are listed in C. To install all of them +you can run: - xargs -a conf/packages apt-get install + sudo xargs -a conf/packages.debian-squeeze apt-get install -Note, you will need to either be logged in as root or to use - - sudo xargs -a conf/packages apt-get install - -for this to work. +A similar list of packages should work for other Debian-based +distributions. (Please let us know if you would like to contribute +such a package list or instructions for other distributions.) =head2 Service dependencies -- cgit v1.2.3 From 884191f2f5a1c2a408cfe3145b9a25a7c582bb5c Mon Sep 17 00:00:00 2001 From: Mark Longair Date: Thu, 3 May 2012 16:22:19 +0100 Subject: ruby-compass shouldn't be in the squeeze package list Thanks to Matthew Somerville for pointing this out. --- notes/INSTALL.pod | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'notes') diff --git a/notes/INSTALL.pod b/notes/INSTALL.pod index 3cc88e937..701112b45 100644 --- a/notes/INSTALL.pod +++ b/notes/INSTALL.pod @@ -66,6 +66,14 @@ A similar list of packages should work for other Debian-based distributions. (Please let us know if you would like to contribute such a package list or instructions for other distributions.) +To generate the CSS for the current design of FixMyStreet you will +also need Compass L, but unfortunately +it is not packaged in Debian squeeze (or squeeze-backports). You +will either need to install the package from testing, or you could +install it from the Ruby gem with: + + gem install compass + =head2 Service dependencies For most uses of FixMyStreet you'll also need access to a MaPit server with -- cgit v1.2.3