diff options
Diffstat (limited to 'docs/installing/manual_install.md')
-rw-r--r-- | docs/installing/manual_install.md | 51 |
1 files changed, 29 insertions, 22 deletions
diff --git a/docs/installing/manual_install.md b/docs/installing/manual_install.md index 4a98c9be2..8d6403b73 100644 --- a/docs/installing/manual_install.md +++ b/docs/installing/manual_install.md @@ -10,21 +10,32 @@ title: Manual installation The following instructions describe the step-by-step process for installing Alaveteli. <em>You don't necessarily need to do it this way:</em> it's usually easier to use the - <a href="{{ site.baseurl }}docs/installing/script">installation script</a> + <a href="{{ site.baseurl }}docs/installing/script/">installation script</a> or the - <a href="{{ site.baseurl }}docs/installing/ami">Amazon EC2 AMI</a>. + <a href="{{ site.baseurl }}docs/installing/ami/">Amazon EC2 AMI</a>. </p> -Note that there are [other ways to install Alaveteli]({{ site.baseurl }}docs/installing). +Note that there are [other ways to install Alaveteli]({{ site.baseurl }}docs/installing/). ## Target operating system These instructions assume Debian Squeeze (64-bit) or Ubuntu 12.04 LTS (precise). Debian Squeeze is the best supported deployment platform. We also -have instructions for [installing on MacOS]({{ site.baseurl }}docs/installing/macos). +have instructions for [installing on MacOS]({{ site.baseurl }}docs/installing/macos/). Commands are intended to be run via the terminal or over ssh. +## Set the locale + +**Debian Squeeze** + +Follow the [Debian guide](https://wiki.debian.org/Locale#Standard) for configuring the locale of the operating system. + +Generate the locales you wish to make available. When the interactive screen asks you to pick a default locale, choose "None", as the SSH session will provide the locale required. + + # dpkg-reconfigure locales + +Start a new SSH session to use your SSH locale. ## Get Alaveteli @@ -164,20 +175,20 @@ Create a `foi` user from the command line, like this: _Note:_ Leaving the password blank will cause great confusion if you're new to PostgreSQL. -Then create the databases: +We'll create a template for our Alaveteli databases: - # sudo -u postgres createdb -T template0 -E SQL_ASCII -O foi foi_production - # sudo -u postgres createdb -T template0 -E SQL_ASCII -O foi foi_test - # sudo -u postgres createdb -T template0 -E SQL_ASCII -O foi foi_development + # sudo -u postgres createdb -T template0 -E UTF-8 template_utf8 + # echo "update pg_database set datistemplate=true where datname='template_utf8';" > /tmp/update-template.sql + # sudo -u postgres psql -f /tmp/update-template.sql -We create using the ``SQL_ASCII`` encoding, because in postgres this is means -"no encoding"; and because we handle and store all kinds of data that may not -be valid UTF (for example, data originating from various broken email clients -that's not 8-bit clean), it's safer to be able to store *anything*, than reject -data at runtime. +Then create the databases: -Now you need to set up the database config file to contain the name, username -and password of your postgres database. + # sudo -u postgres createdb -T template_utf8 -O foi alaveteli_production + # sudo -u postgres createdb -T template_utf8 -O foi alaveteli_test + # sudo -u postgres createdb -T template_utf8 -O foi alaveteli_development + +Now you need to set up the database config file so that the application can +connect to the postgres database. * Copy `database.yml-example` to `database.yml` in `alaveteli/config` * Edit it to point to your local postgresql database in the development @@ -187,7 +198,8 @@ Example `development` section of `config/database.yml`: development: adapter: postgresql - database: foi_development + template: template_utf8 + database: alaveteli_development username: foi password: secure-password-here host: localhost @@ -206,7 +218,7 @@ to the test config in `database.yml` (as seen in `database.yml-example`) You will need to set up an email server (MTA) to send and receive emails. Full configuration for an MTA is beyond the scope of this document -- see this -[example config for Exim4]({{ site.baseurl }}docs/installing/email). +[example config for Exim4]({{ site.baseurl }}docs/installing/email/). Note that in development mode mail is handled by mailcatcher by default so that you can see the mails in a browser - see [http://mailcatcher.me/](http://mailcatcher.me/) for more @@ -380,11 +392,6 @@ by your deploy user (named `deploy` in this case): deploy ALL = NOPASSWD: /etc/init.d/foi-alert-tracks, /etc/init.d/foi-purge-varnish -The cron jobs refer to a program `run-with-lockfile`. See [this -issue](https://github.com/mysociety/alaveteli/issues/112) for a discussion of -where to find this program, and how you might replace it. This [one line -script](https://gist.github.com/3741194) can install this program system-wide. - ## Set up production web server It is not recommended to run the website using the default Rails web server. |