aboutsummaryrefslogtreecommitdiffstats
path: root/docs/installing/macos.md
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2014-07-03 17:56:54 +0100
committerLouise Crow <louise.crow@gmail.com>2014-07-03 17:56:54 +0100
commit3d8d1c2796ec2e0704fb0bebe1ba24bae261c480 (patch)
treeb272576343cf7fa4b95fc6cb74c0d8628cb928ce /docs/installing/macos.md
parent39fd6a5562de76e4d9dfd539c6814567cc0baa16 (diff)
parentdfaafc5e8847260f2e0708314840761e271a7856 (diff)
Merge branch 'gh-pages' of ssh://git.mysociety.org/data/git/public/alaveteli into gh-pages
Diffstat (limited to 'docs/installing/macos.md')
-rw-r--r--docs/installing/macos.md32
1 files changed, 21 insertions, 11 deletions
diff --git a/docs/installing/macos.md b/docs/installing/macos.md
index c46bdf4ba..e93ea452f 100644
--- a/docs/installing/macos.md
+++ b/docs/installing/macos.md
@@ -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