Добавлены иструкции по установке.

This commit is contained in:
Jack Stdin 2016-02-13 23:32:03 +03:00
parent 9b8cdf5ad1
commit c2a89956b1
3 changed files with 68 additions and 6 deletions

View File

@ -34,20 +34,55 @@ _Внимание_! Только Python 2.7, только PostgreSQL, тольк
Предварительно обязательно установить и настроить:
1. Python 2.7.x, pip
Для Windows качаем - ставим, для Debian:
```
sudo apt-get install python-setuptools
sudo easy_install pip
```
2. PostgreSql 9.5 и выше (из-за синтаксиса _ON CONFLICT ... DO_)
3. Sphinx 2.2.1 и новее
Для Windows, как обычно, [качаем](http://www.enterprisedb.com/products-services-training/pgdownload#windows) - ставим, для Debian:
```
sudo sh -c 'echo deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main 9.5 > /etc/apt/sources.list.d/postgresql.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-9.5
```
Затем создайте пользователя и базу данных.
3. Sphinx 2.2.1 и новее:
[Windows](http://sphinxsearch.com/downloads/release/), Debian:
```
cd /tmp
wget http://sphinxsearch.com/files/sphinx-2.2.10-release.tar.gz
tar xzf sphinx-2.2.10-release.tar.gz
cd sphinx-2.2.10-release
sudo apt-get install postgresql-server-dev-9.5
./configure --without-mysql --with-pgsql
make
sudo make install
```
4. Web-сервер с поддержкой WSGI, любой, по Вашему желанию.
### Windows
1. Установить lxml, через pip не ставится, так что качаем [отсюда](https://pypi.python.org/pypi/lxml/3.5.0).
2. Установить unrar.exe (можно установить WinRar целиком).
3. Установить sphinxapi последней версии (либо взять из директории Sphinx):
`python -m pip install https://github.com/Romamo/sphinxapi/zipball/master`
```
python -m pip install https://github.com/Romamo/sphinxapi/zipball/master
```
### Debian Linux
1. Установить unrar
1. Установить unrar (non-free)
```
sudo sh -c 'echo deb ftp://ftp.us.debian.org/debian/ stable main non-free > /etc/apt/sources.list.d/non-free.list'
sudo apt-get update
sudo apt-get install unrar
```
2. Установить sphinxapi последней версии:
`pip install https://github.com/Romamo/sphinxapi/zipball/master`
```
pip install https://github.com/Romamo/sphinxapi/zipball/master
```
3. Установить, собственно, нашу штуку:
```
pip install --target=d:\somewhere\other\than\the\default https://github.com/jar3b/...
```

18
aore/config/prod.py Normal file
View File

@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from .common import *
sphinx_conf.host_name = "localhost"
sphinx_conf.port = 9312
sphinx_conf.var_dir = "/var/sphinx"
db_conf.database = "postgres"
db_conf.host = "localhost"
db_conf.port = 5432
db_conf.user = "postgres"
db_conf.password = "postgres"
unrar_config.path = "unrar"
folders.temp = "/tmp/py-fias"

9
requirements.txt Normal file
View File

@ -0,0 +1,9 @@
lxml==3.5.0
bottle>=0.12.9
psycopg2>=2.6.1
PySimpleSOAP==1.16
python-Levenshtein==0.12.0
enum34>=1.0.0
rarfile
requests==2.8.1
soap2py==1.16