File: INSTALL

package info (click to toggle)
dico 2.9-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 16,908 kB
  • sloc: ansic: 85,886; sh: 50,207; lex: 2,624; yacc: 1,437; tcl: 1,434; python: 1,281; makefile: 1,266; perl: 881; lisp: 489; awk: 157; pascal: 125; cpp: 44; fortran: 25; asm: 19; sed: 16; xml: 8
file content (117 lines) | stat: -rw-r--r-- 3,470 bytes parent folder | download | duplicates (2)
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
GNU Dico - Dicoweb INSTALL
See end of file for copying conditions.

* Dicoweb requirements
======================

- Django    -- a Python Web framework (http://www.djangoproject.com/)
- wikitrans -- a wiki translator (https://pypi.org/project/wikitrans/)
- python-memcached -- Pure python memcached client
                      (https://pypi.org/project/python-memcached)

* Installation instructions
===========================

The instructions below assume dicoweb sources are located in
/var/www/dicoweb.

1. Create the virtual environment directory in /var/www/dicoweb.
Assuming the directory will be named 'venv':

   $ cd /var/www/dicoweb
   $ virtualenv venv

2. Activate the environment:

   $ . venv/bin/activate

3. Install the prerequisites

   $ pip install -r requirements.txt

4. Deactivate the environment

   $ deactivate

5. Rename 'settings-sample.py' to 'settings.py' and edit your
local Dicoweb site configuration.

6. Enable the following Apache modules: mod_alias, mod_env, mod_wsgi.

The exact instructions depend on your Apache configuration layout. In
general, they boil down to adding the following three statements to
the Apache configuration:

  LoadModule alias_module modules/mod_alias.so
  LoadModule env_module modules/mod_env.so
  LoadModule wsgi_module modules/mod_wsgi.so

7. Configure Apache virtual host. The minimal configuration is as
follows:

  <VirtualHost *:80>
     ServerName dict.example.org
     DocumentRoot /var/www/dicoweb

     # Ensure proper encoding (for Python 3)
     SetEnv LC_ALL en_US.utf8

     # Configure virtual environment.
     # (If not using virtual environment, omit the WSGIDaemonProcess and
     # WSGIProcessGroup statements).
    
     # Make sure to edit the statement below to match to the actual
     # path to the site-packages directory.
     WSGIDaemonProcess dicoweb python-path=/var/www/dicoweb/venv/lib/python3.5/site-packages
     WSGIProcessGroup dicoweb

     # Start up the module.
     WSGIScriptAlias / /var/www/dicoweb/wsgi.py
     # Provide access to the static files.
     Alias /static /var/www/dicoweb/static
     <Directory "/var/www/dicoweb/">
        AllowOverride All
	Options None
	Require all granted
     </Directory>
  </VirtualHost>

For a general discussion of deployment of the Django applications,
please see https://docs.djangoproject.com/en/dev/howto/deployment.

** The development/test server
------------------------------

To start the stand-alone development server, change to /var/www/dicoweb
and run the command `python manage.py runserver'. You will see
the following output:

 Validating models...
 0 errors found.

 Django version 1.11.5, using settings 'dicoweb.settings'
 Development server is running at http://127.0.0.1:8000/
 Quit the server with CONTROL-C.

Use your web browser to query the displayed URL. 

* Copyright information:

Copyright (C) 2008-2018 Wojciech Polak

   Permission is granted to anyone to make or distribute verbatim copies
   of this document as received, in any medium, provided that the
   copyright notice and this permission notice are preserved,
   thus giving the recipient permission to redistribute in turn.

   Permission is granted to distribute modified versions
   of this document, or of portions of it,
   under the above conditions, provided also that they
   carry prominent notices stating who last changed them.


Local Variables:
mode: outline
paragraph-separate: "[	]*$"
version-control: never
End: