-
Notifications
You must be signed in to change notification settings - Fork 1
Fast start (ru)
denizzzka edited this page Jun 11, 2014
·
5 revisions
Для сборки потребуются:
- компилятор dmd (http://dlang.org/download.html)
- утилита сборки проектов dub (http://code.dlang.org/download)
- клиентские библиотеки PostgreSQL:
- On linux libpq.so (or libpq.so.5)
- On windows libpq.dll, libintl.dll (only 32 bit arch supported yet)
Клонируем репозиторий pgator, заходим в полученную директорию и выполняем команду сборки:
dub build --force
Полученный после сборки исполняемый файл находится в bin/
Создадим конфигурационный файл /etc/pgator.conf:
{
"sqlServers": [
{
"maxConn": 5,
"connString": "dbname=mydbname user=postgres"
}
],
"sqlAuth": [
"pgator.username",
"pgator.password"
],
"maxConn": 10,
"port": 8080,
"sqlTimeout": 1000,
"logname": "/var/log/pgator/pgator.txt",
"vibelog": "/var/log/pgator/http.log",
"sqlJsonTable": "public.json_rpc",
"userid": 1000,
"groupid": 1000
}
Теперь pgator можно запустить с правами postgres командой:
su -c "bin/pgator --daemon --pidfile=/tmp/pgator.pid --lockfile=/tmp/pgator.lock" postgres