Mercurial > hg > ltpdarepo
annotate README.txt @ 260:0ac15efd8c17 default tip
Drop obsolete parameter to bootstrap.py in README.txt
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Mon, 29 Sep 2014 15:49:42 +0200 |
parents | b9f7aac3fd06 |
children |
rev | line source |
---|---|
40
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
1 INSTALL |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
2 ======= |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
3 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
4 This package uses buildout for development and deployment. The use of |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
5 buildout allows for the creation of a self contained environment |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
6 containing application code and most of the required dependencies. |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
7 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
8 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
9 Prerequisites |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
10 ------------- |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
11 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
12 1. Running MySQL server version >= 5.0 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
13 2. Python version >= 2.6 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
14 3. MySQLdb Python package |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
15 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
16 To install this application you need a recent python interpreter: |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
17 development and testing have been performed with Python 2.6, but |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
18 Python 2.7 should work as well. MySQL and the Python MySQL connector |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
19 are not installed as part of the buildout recipe because it is much |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
20 easier to do so with the help of the OS package management software. |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
21 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
22 On a Debian or Debian like GNU-Linux installation you can easily |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
23 install all the required packages as follows:: |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
24 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
25 # apt-get install mysql-server python2.6 python2.6-mysqldb |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
26 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
27 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
28 Install |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
29 ------- |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
30 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
31 The buildout recipe takes care of installing all the other required |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
32 component. For that you need to have an Internet connection, if you |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
33 access the Web through a proxy server remember to set it correctly for |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
34 you shell. For a bash shell:: |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
35 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
36 # export http_proxy=http://proxy.example.net:3128/ |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
37 # export https_proxy=http://proxy.example.net:3128/ |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
38 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
39 First download the buildout software itself:: |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
40 |
260
0ac15efd8c17
Drop obsolete parameter to bootstrap.py in README.txt
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
227
diff
changeset
|
41 # python2.6 bootstrap.py |
40
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
42 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
43 Then run the buildout recipe:: |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
44 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
45 # ./bin/buildout |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
46 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
47 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
48 Setup |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
49 ----- |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
50 |
207 | 51 The application needs to be configured. Copy the example configuration |
52 file to the expected configuration file location:: | |
53 | |
54 # cp etc/ltpdarepo.ex etc/ltpdarepo | |
55 | |
56 Then edit this file and enter the required information:: | |
40
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
57 |
207 | 58 # edit etc/ltpdarepo |
59 | |
60 Chose a database name at will: this database will be created during | |
61 the application initialization. The user used in the connection should | |
62 be an user with administrative capabilities on the MySQL database, | |
209
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
63 ordinarily the `root` user [1]. |
40
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
64 |
207 | 65 Remember to set an unique encryption key for the SECRET_KEY parameter. |
66 This key is used in the application for generating cryptographic | |
67 hashes and the security of your application depends on selecting an | |
68 unique and unpredicible value for this key. A good way to obtain a | |
69 random string on an Unix machine is to execute:: | |
40
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
70 |
207 | 71 # dd bs=1024 count=16 if=/dev/random 2>/dev/null | md5 |
72 | |
73 Note that in the default configuration notification emails are not | |
74 sent. To enable notification emails set the TESTING parameter to False. | |
75 | |
76 To initialize the database use the LTPDA Repository administration | |
77 command line tool:: | |
40
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
78 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
79 # ./bin/admin install |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
80 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
81 Then create an administrator user to use in the first connection |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
82 through the Web interface:: |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
83 |
207 | 84 # ./bin/admin useradd <username> --admin true |
85 # ./bin/admin passwd <username> <password> | |
40
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
86 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
87 Help on the usage of the command line tool can be obtained with:: |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
88 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
89 # ./bin/admin help |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
90 |
207 | 91 For development and evaluation you can run the Web application in |
92 standalone mode using the an embedded HTTP server. Execute:: | |
40
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
93 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
94 # ./bin/run |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
95 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
96 and connect to it at the address http://localhost:5000/ |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
97 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
98 |
219
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
99 [1] It is also possible to run the application with an user having |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
100 reduced privileges. An user with the the minimum set of privileges |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
101 required for running the application may be obtained with the |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
102 following SQL commands:: |
209
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
103 |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
104 CREATE USER <username>@'localhost' IDENTIFIED BY <password>; |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
105 |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
106 GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, CREATE VIEW, |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
107 CREATE USER ON *.* TO <username>@'localhost' WITH GRANT OPTION; |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
108 |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
109 GRANT EXECUTE, CREATE TEMPORARY TABLES |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
110 ON <database>.* TO <username>@'localhost'; |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
111 |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
112 However, due to MySQL server limitations, this minimum set of |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
113 privileges allows the user to grant himself additional privileges, and |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
114 more generally to modify MySQL administrative tables. Therefore, this |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
115 is not an effective protection from security issues. |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
116 |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
117 The initialization of the database and the upgrade procedure require |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
118 additional privileges than the ones listed above. Therefore, the |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
119 command line administration tool `install` and `upgrade` commands |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
120 allow to connect to the database with a different user than the one |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
121 specified in the configuration file, via the `--user` and `--password` |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
122 parameters. Example:: |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
123 |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
124 # ./bin/admin install --user root --password <password> |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
125 |
219
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
126 An user with the username and password specified in the configuration |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
127 file, and with the minimum set of privileges required for running the |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
128 application, may be created during the database initialization |
209
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
129 procedure with the `--create-user` option of the `install` command:: |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
130 |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
131 # ./bin/admin install --create-user --user root --password <password> |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
132 |
0c2936ea34bf
Document the unprivileged user possibility in the README.
Daniele Nicolodi <daniele@grinta.net>
parents:
207
diff
changeset
|
133 |
219
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
134 Upgrade |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
135 ------- |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
136 |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
137 Upgrading from old versions of the application may require chenges to |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
138 the databases schema. To permorm the upgrade install and configure the |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
139 application and then run the upgrade procedure:: |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
140 |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
141 # ./bin/admin upgrade |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
142 |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
143 If the application is configured to run with an user with limited |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
144 privileges, as detailed in the previous section, it is necessary to |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
145 use the `--user` and `--password` parameters of the `upgrade` commnand |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
146 to connect to the database with a user having administration |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
147 capabilities:: |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
148 |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
149 # ./bin/admin upgrade --user root --password <password> |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
150 |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
151 Upgrading from the PHP base Web interface is also possible. For doing |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
152 that install and configure the application to connect to the old |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
153 administrative database (the default administrative database name for |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
154 the PHP application is `ltpda_admin`) and run the upgrade procedure. |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
155 It is recommended to backup the database content before attempting the |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
156 upgrade. |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
157 |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
158 |
40
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
159 Deployment |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
160 ---------- |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
161 |
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
162 For the deployment to a production server you do not want to use the |
207 | 163 embedded HTTP server. You can use any WSGI capable web server. The |
164 easiest solution it is probably to use Apache `mod_wsgi`. | |
165 | |
226
bec775b8c364
Add modwsgi activation instructions to README.
Daniele Nicolodi <daniele@grinta.net>
parents:
221
diff
changeset
|
166 First enable the `mod_wsgi` Apache module. On Debian and Debian |
bec775b8c364
Add modwsgi activation instructions to README.
Daniele Nicolodi <daniele@grinta.net>
parents:
221
diff
changeset
|
167 derivate GNU-Linux distributions you can simply do:: |
207 | 168 |
169 # a2enmod wsgi | |
170 | |
226
bec775b8c364
Add modwsgi activation instructions to README.
Daniele Nicolodi <daniele@grinta.net>
parents:
221
diff
changeset
|
171 On other platforms, add the following configuration directive, |
bec775b8c364
Add modwsgi activation instructions to README.
Daniele Nicolodi <daniele@grinta.net>
parents:
221
diff
changeset
|
172 properly adjusted for your instllation paths, to the Apache |
bec775b8c364
Add modwsgi activation instructions to README.
Daniele Nicolodi <daniele@grinta.net>
parents:
221
diff
changeset
|
173 configuration file:: |
bec775b8c364
Add modwsgi activation instructions to README.
Daniele Nicolodi <daniele@grinta.net>
parents:
221
diff
changeset
|
174 |
bec775b8c364
Add modwsgi activation instructions to README.
Daniele Nicolodi <daniele@grinta.net>
parents:
221
diff
changeset
|
175 LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so |
bec775b8c364
Add modwsgi activation instructions to README.
Daniele Nicolodi <daniele@grinta.net>
parents:
221
diff
changeset
|
176 |
207 | 177 A WSGI script is generated during the application install procedure. |
178 To have Apache load it, copy this configuration snippet into your | |
179 Apache server configuration:: | |
180 | |
181 WSGIScriptAlias /ltpdarepo /srv/ltpdarepo/bin/wsgi | |
182 WSGIDaemonProcess ltpdarepo | |
40
e640b2302fab
Add short README with install and setup instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
diff
changeset
|
183 |
207 | 184 <Directory /srv/ltpdarepo/> |
185 WSGIProcessGroup ltpdarepo | |
186 WSGIApplicationGroup %{GLOBAL} | |
187 Order deny,allow | |
188 Allow from all | |
189 </Directory> | |
190 | |
227
b9f7aac3fd06
Fix Apache configuration example in README.
Daniele Nicolodi <daniele@grinta.net>
parents:
226
diff
changeset
|
191 Alias /ltpdarepo/static/ /srv/ltpdarepo/src/ltpdarepo/static/ |
207 | 192 |
193 <Directory /srv/ltpdarepo/src/ltpdarepo/static/> | |
194 AllowOverride None | |
195 Order deny,allow | |
196 Allow from all | |
197 </Directory> | |
198 | |
199 In this example the application was installed in the `/srv/ltpdarepo/` | |
219
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
200 directory and has been configureted to be reached at the `/ltpdarepo` |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
201 path of the webserver. Modify the configuration to adjust for your |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
202 installation folder and for the path where the application should be |
2a9af8163c46
Update README. Extend upgrade instructions.
Daniele Nicolodi <daniele@grinta.net>
parents:
209
diff
changeset
|
203 reached. |
207 | 204 |
205 Then restart the Apache server:: | |
206 | |
207 # apache2ctl restart |