[ckan-dev] datastore installation

Dominik Moritz dominik.moritz at okfn.org
Tue Jan 22 17:46:23 UTC 2013


Hi Kim,

first, I'd suggest, you use the first option [1] since it will do most things for you. The script is intended for advanced setups that require separate servers for CKAN and the databases. 

That said, you should set the correct names in the sql script. For instance, you should set "ckantest" instead of "{ckantest}". That should solve "role "{ckanuser}" does not exist" issue.

We recently updated the setup instructions and you can find the latest version at [2]. There are step-by step instructions that help you set up your datastore. 

Best wishes,
Dominik

[1] http://docs.ckan.org/en/latest/datastore-setup.html#option-1-paster-command
[2] http://docs.ckan.org/en/latest/datastore-setup.html

On 22 Jan 2013, at 17:49, Kim Haklae <haklaekim at gmail.com> wrote:

> 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





More information about the ckan-dev mailing list