[ckan-dev] datastore installation

Kim Haklae haklaekim at gmail.com
Tue Jan 22 16:49:44 UTC 2013


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130123/172311f1/attachment.html>


More information about the ckan-dev mailing list