-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL
62 lines (41 loc) · 1.42 KB
/
INSTALL
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
Installation
============
Requirements
------------
- Python version 2.6+
- Django version 1.2+
- MySQL 5.0+
- mod-python 3.3+
How to install
--------------
I'm using Debian Linux, so, to install packages use the apt-get command:
apt-get install mysql-server mysql-client
apt-get install python-django
apt-get install python-mysqldb
apt-get install libapache2-mod_python
- Download the latest PostfixAdmin version:
git clone [email protected]:but3k4/postfixadmin.git
Then, enter the postfixadmin directory, fix the settings.py file (you
can use settings-sample.py as a model). Specify database relative
informations.
Create a database with the name you specified in settings.py.
- Initialize the database by running the following command:
python manage.py syncdb
It will let you create the default super administrator.
- Configure the webserver
In my setup I used apache + mod_python, so, create a new virtualhost in your
Apache configuration and follow the example:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
<Location "/">
SetHandler python-program
PythonPath '[ "<path to directory that contains postfixadmin dir>" ] + sys.path'
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE postfixadmin.settings
PythonDebug On
</Location>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Note: This is one possible configuration.