[ckan-dev] datastore installation
Vitor Baptista
vitor at vitorbaptista.com
Tue Jan 22 17:25:14 UTC 2013
Hi Kim,
You forgot to change the variables in set_permissions.sql. Check
https://github.com/okfn/ckan/blob/master/ckanext/datastore/bin/set_permissions.sql#L17-L25
.
{ckandb}, {datastoredb}, {ckanuser}, {writeuser}, and {readonlyuser} should
be changed to what you've configured in your case (i.e. change {ckandb} to
ckantest, etc).
What didn't worked for you, when using Option 1? We're trying to improve
the documentation, and your feedback would help :-)
Thanks,
Vítor.
2013/1/22 Kim Haklae <haklaekim at gmail.com>
> Hi,
>
> I have tried to install a datastore, but still have problems.
> Postgresql 9.2 is installed before installing CKAN, then followed CKAN
> instruction.
> For setting up permission, the option 3 is used (set_permissions.sql
> downloaded from GitHub,
> https://github.com/okfn/ckan/blob/master/ckanext/datastore/bin/set_permissions.sql),
> since I have failed by the option 1:
>
> @ubuntu:/usr/lib/pymodules/python2.6/ckanext/datastore/bin$ sudo -u
> postgres psql postgres -f set_permissions.sql
> REVOKE
> REVOKE
> psql:set_permissions.sql:33: ERROR: role "{ckanuser}" does not exist
> psql:set_permissions.sql:34: ERROR: role "{ckanuser}" does not exist
> psql:set_permissions.sql:36: ERROR: role "{writeuser}" does not exist
> psql:set_permissions.sql:37: ERROR: role "{writeuser}" does not exist
> psql:set_permissions.sql:42: ERROR: syntax error at or near "{"
> LINE 1: REVOKE CONNECT ON DATABASE {ckantest} FROM "{readonlyuser}";
> ^
> psql:set_permissions.sql:45: ERROR: syntax error at or near "{"
> LINE 1: GRANT CONNECT ON DATABASE {datastore} TO "{readonlyuser}";
> ^
> psql:set_permissions.sql:46: ERROR: role "{readonlyuser}" does not exist
> psql:set_permissions.sql:49: ERROR: role "{readonlyuser}" does not exist
> psql:set_permissions.sql:54: ERROR: role "{readonlyuser}" does not exist
>
> As the instruction (http://docs.ckan.org/en/ckan-1.8/datastore-setup.html),
> two commands executed as followed:
>
> sudo -u postgres createuser -S -D -R -P -l readonlyuser
>
> sudo -u postgres createdb -O ckanuser datastore
>
> sudo -u postgres psql -l
> List of databases
> Name | Owner | Encoding | Collate | Ctype | Access privileges
> -----------+----------+----------+------------+------------+-----------------------
>
>
> ckantest | ckanuser | UTF8 | en_US.utf8 | en_US.utf8 |
> datastore | ckanuser | UTF8 | en_US.utf8 | en_US.utf8 |
> postgres | postgres | UTF8 | en_US.utf8 | en_US.utf8 |
> std | std | UTF8 | en_US.utf8 | en_US.utf8 |
>
>
> template0 | postgres | UTF8 | en_US.utf8 | en_US.utf8 | =c/postgres +
> | | | | | postgres=CTc/postgres
> template1 | postgres | UTF8 | en_US.utf8 | en_US.utf8 | =c/postgres +
>
>
> | | | | | postgres=CTc/postgres
>
> Is there step-by-step instructions to install a datastore? With many
> trials and errors, I still don't know how to solve this problem. Thanks in
> advance.
>
> - Haklae
> --
> Dr.Dr. Haklae Kim
> Semantic Web and Open Data Hacker
> http://thedatahub.kr
> http://getthedata.kr
> http://blogweb.co.kr
> Tel: +82-(0)10-3201-0714
> Who's Who in the World's 27th Edition - 2010
> IBC 2000 Outstanding Scientists - 2010
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130122/01bec5ee/attachment-0001.html>
More information about the ckan-dev
mailing list