使用Chef postgresql安装PostgreSQL 9.2

前端之家收集整理的这篇文章主要介绍了使用Chef postgresql安装PostgreSQL 9.2前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我很难在Vagrant VM(Ubuntu 12.04)上安装带有 Opscode postgresql cookbook的Postgresql 9.2.

这是我的食谱:

node.set['postgresql']['version']             = "9.2"
node.set['postgresql']['enable_pgdg_apt']     = true
node.set['postgresql']['password']            = {postgres: "pwd"}
node.set['postgresql']['server']['packages']  = ["postgresql-9.2"]

include_recipe "postgresql::apt_pgdg_postgresql"
include_recipe "postgresql::server"
include_recipe "database"

运行结果如下:

[2013-05-23T11:00:52+00:00] FATAL: Chef::Exceptions::EnclosingDirectoryDoesNotExist:
template[/etc/postgresql/9.2/main/postgresql.conf] (postgresql::server line 60) had an error: 
Chef::Exceptions::EnclosingDirectoryDoesNotExist: Parent directory /etc/postgresql/9.2/main does not exist.

我正在使用poostgresql cookbook的最新3.0.0版本.

使用干净的VM(vagrant destroy,up等)从头开始重新运行所有内容会出现此错误

[2013-05-23T11:16:37+00:00] FATAL: Chef::Exceptions::EnclosingDirectoryDoesNotExist:
template[/etc/postgresql/9.1/main/postgresql.conf] (postgresql::server line 60) had an error: 
Chef::Exceptions::EnclosingDirectoryDoesNotExist: Parent directory /etc/postgresql/9.1/main does not exist.

突然间我们甚至没有合适的版本.

我能够通过设置目录来解决这个问题:
node.set['postgresql']['dir'] = "/var/lib/postgresql/9.2/main"

看起来这是同一个问题:http://tickets.opscode.com/browse/COOK-2113

原文链接:https://www.f2er.com/postgresql/192017.html

猜你在找的Postgre SQL相关文章