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/macos.md | |
parent | 54575d777d6ec8d9892b78cf8611b003b82d932e (diff) | |
parent | 1b9c236ef8e5390b0bb76ab859e44946b8a348d2 (diff) |
Merge remote-tracking branch 'origin/gh-pages' into gh-pages-upgrading
Diffstat (limited to 'docs/installing/macos.md')
-rw-r--r-- | docs/installing/macos.md | 34 |
1 files changed, 22 insertions, 12 deletions
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 |