跳转到主要内容

为项目初始化一个postgresql的数据库

项目描述

================
makina.recipe.postgres包
================

.. 目录:

什么是makina.recipe.postgres ?
==================

它是一个初始化数据库的recipe,从initdb命令开始。

如何使用makina.recipe.postgres ?
=====================

示例(postgis init):

parts =
...
initdb

[initdb]
recipe = makina.recipe.postgres
bin = ${buildout:directory}/parts/postgresql/bin
initdb = --auth=trust --pgdata=${buildout:directory}/var/postgres
pgdata = ${buildout:directory}/var/postgres
port = 5433
cmds =
createuser -p 5433 --createdb --no-createrole --no-superuser --login admin
createuser -p 5433 --no-createdb --no-createrole --no-superuser --login zope
createdb -p 5433 --owner admin --encoding LATIN9 zsig
createlang -p 5433 plpgsql zsig
psql -d zsig -p 5433 -f ${buildout:directory}/parts/postgis/share/lwpostgis.sql
psql -d zsig -p 5433 -f ${buildout:directory}/parts/postgis/share/spatial_ref_sys.sql



如果不想用buildout安装postgresql,bin选项可以是从/usr/bin(所有postgresql系统二进制文件所在位置)的一个符号链接。

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源分发

makina.recipe.postgres-0.1.zip (10.4 kB 查看散列值)

上传时间:

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面