diff options
author | Dave Whiteland <dave@mysociety.org> | 2014-07-03 14:41:19 +0100 |
---|---|---|
committer | Dave Whiteland <dave@mysociety.org> | 2014-07-03 14:41:19 +0100 |
commit | 49eff147f3866cf7e28d36e27448fdad70164170 (patch) | |
tree | 4dd94328255d65468ed6f0bc7a9cb835567a72dc /docs/installing | |
parent | 54575d777d6ec8d9892b78cf8611b003b82d932e (diff) | |
parent | 1b9c236ef8e5390b0bb76ab859e44946b8a348d2 (diff) |
Merge remote-tracking branch 'origin/gh-pages' into gh-pages-upgrading
Diffstat (limited to 'docs/installing')
-rw-r--r-- | docs/installing/ami.md | 6 | ||||
-rw-r--r-- | docs/installing/deploy.md | 2 | ||||
-rw-r--r-- | docs/installing/macos.md | 34 | ||||
-rw-r--r-- | docs/installing/manual_install.md | 41 |
4 files changed, 50 insertions, 33 deletions
diff --git a/docs/installing/ami.md b/docs/installing/ami.md index 3f8897b16..1f7195761 100644 --- a/docs/installing/ami.md +++ b/docs/installing/ami.md @@ -24,10 +24,10 @@ instance due to the low amount of memory available on those instances; you will need to use at least a Small instance, which Amazon will charge for. -The AMI can be found in the EU West (Ireland) region, with the ID ami-8603f4f1 -and name “Basic Alaveteli installation 2014-01-29”. You can launch an instance +The AMI can be found in the EU West (Ireland) region, with the ID ami-23519f54 +and name “Basic Alaveteli installation 2014-06-12”. You can launch an instance based on that AMI with [this -link](https://console.aws.amazon.com/ec2/home?region=eu-west-1#launchAmi=ami-8603f4f1). +link](https://console.aws.amazon.com/ec2/home?region=eu-west-1#launchAmi=ami-23519f54). When you create an EC2 instance based on that AMI, make sure that you choose Security Groups that allows at least inbound HTTP, HTTPS, SSH and, if you want diff --git a/docs/installing/deploy.md b/docs/installing/deploy.md index 5378b89d6..4bbc91a9d 100644 --- a/docs/installing/deploy.md +++ b/docs/installing/deploy.md @@ -78,7 +78,7 @@ Next, on your local machine: * Capistrano requires Ruby 1.9 or more, and can be installed using rubygems * do: `gem install capistrano` * install Bundler if you don't have it already -- do: `gem install bundler` -* checkout the [Alaveteli repo](http://github.com/mysociety/alaveteli/) (you +* checkout the [Alaveteli repo](https://github.com/mysociety/alaveteli/) (you need some of the files available locally even though you might not be running Alaveteli on this machine) * copy the example file `config/deploy.yml.example` to `config/deploy.yml` diff --git a/docs/installing/macos.md b/docs/installing/macos.md index 2b6309b89..e93ea452f 100644 --- a/docs/installing/macos.md +++ b/docs/installing/macos.md @@ -25,7 +25,7 @@ If you are using OS X Lion, download *Command Line Tools for Xcode* from [Apple] **Note:** As of Xcode 4.2, a non-LLVM version of GCC is no longer included. Homebrew has dealt with it by [switching to Clang](https://github.com/mxcl/homebrew/issues/6852). However, you may encounter errors installing RVM. *Please report these on the [mailing list](https://groups.google.com/group/alaveteli-dev).* The following instructions have been tested with Xcode 4.1. If necessary, you can install GCC from Xcode 4.1 by running: - brew install http://github.com/adamv/homebrew-alt/raw/master/duplicates/apple-gcc42.rb + brew install https://github.com/adamv/homebrew-alt/raw/master/duplicates/apple-gcc42.rb ## Homebrew @@ -88,17 +88,27 @@ The following is mostly from [the manual installation process]({{ site.baseurl}} ### Configure database -Creates Alaveteli databases and an `foi` user with password `foi`. - - echo "CREATE DATABASE foi_development encoding = 'UTF8'; - CREATE DATABASE foi_test encoding = 'UTF8'; - CREATE USER foi WITH CREATEUSER; - ALTER USER foi WITH PASSWORD 'foi'; - ALTER USER foi WITH CREATEDB; - GRANT ALL PRIVILEGES ON DATABASE foi_development TO foi; - GRANT ALL PRIVILEGES ON DATABASE foi_test TO foi; - ALTER DATABASE foi_development OWNER TO foi; - ALTER DATABASE foi_test OWNER TO foi;" | psql -h localhost template1 +Create a database for your Mac user as homebrew doesn't create one by default: + + createdb + +Create a `foi` user from the command line, like this: + + createuser -s -P foi + +_Note:_ Leaving the password blank will cause great confusion if you're new to +PostgreSQL. + +We'll create a template for our Alaveteli databases: + + createdb -T template0 -E UTF-8 template_utf8 + echo "update pg_database set datistemplate=true where datname='template_utf8';" | psql + +Then create the databases: + + createdb -T template_utf8 -O foi alaveteli_production + createdb -T template_utf8 -O foi alaveteli_test + createdb -T template_utf8 -O foi alaveteli_development ### Clone Alaveteli diff --git a/docs/installing/manual_install.md b/docs/installing/manual_install.md index 777d95139..bf2f9b7cd 100644 --- a/docs/installing/manual_install.md +++ b/docs/installing/manual_install.md @@ -25,6 +25,17 @@ have instructions for [installing on MacOS]({{ site.baseurl }}docs/installing/ma 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 @@ -402,11 +414,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. |