blob: ea924c8f78fb6b15d4c9e838260fb4e91e680095 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
# INSTALLING FROM SCRATCH
# mySociety applications are intended to be run on a Debian system. Other Linux
# distributions may well work but may also require some tweaking.
# This document assumes that you are starting with a bare Debian Lenny box and
# that you want to install the latest code from GitHub. For some step you will
# need root access (via sudo)
# GETTING THE CODE
# bring your system up-to-date
# FIXME - ???should we specify any extras apt sources???
sudo apt-get update
sudo apt-get upgrade
# ensure that you have 'git' installed
sudo apt-get install git-core
# fetch the FixMyStreet code from GitHub:
git clone https://github.com/mysociety/fixmystreet.git
# fetch the submodules too
cd fixmystreet
git submodule update --init
# SETTING UP SYSTEM
# change into project directory
cd ~/fixmystreet
# check that you have all the packages needed. mySociety projects always have a
# file in 'conf/packages' where any debian ones needed are listed
sudo apt-get install `cat conf/packages`
# also install these that are available by default on mySoc boxes:
libregexp-common-perl php5-cli
# SETTING UP APACHE
cd /etc/apache2
# there is an apache config file in 'conf/httpd.conf' - insert it as per sample
# config at top of file into your /etc/apache2/ config setup
sudo nano sites-available/fixmystreet
sudo ln -s ../sites-available/fixmystreet sites-enabled/
# you may need to enable some modules too
sudo ln -s ../mods-available/rewrite.load mods-enabled/
sudo ln -s ../mods-available/proxy.load mods-enabled/
sudo ln -s ../mods-available/proxy_http.load mods-enabled/
# check the config and restart apache
sudo apache2ctl configtest
sudo apache2ctl restart
cd -
# You may need to change the permissions on your files so that apache can read them
# sudo chgrp -Rc www-data ~/fixmystreet
# SETTING UP CONFIG FILES
# the setup is configured using the file 'conf/general' - copy the example one and then edit it
cp conf/general-example conf/general
nano conf/general
# Really you only need to alter the database connection details - the rest should be fine
# SETTING UP THE DATABASES
# create your own db user (as a superuser to make things easier)
sudo su - postgres
createuser -s your_username
exit
# You'll need to create a database, enable plpgsql and load in the schema
createdb -E SQL_ASCII bci
createlang plpgsql bci
psql bci < db/schema.sql
# LOOK AT THE SITE IN YOUR BROWSER
# everything should now be set up - please try to load the site in your browser
|