jump to navigation

Setting up Postgresql for use with Koji – Part Two April 11, 2010

Posted by Paul Whalen in ARM, Koji.
trackback

In order to authorize the Koji-web and Koji-hub resources to use the postgresql database it was necessary to edit ‘/var/lib/pgsql/data/pg_hba.conf’ and add the following lines:

# TYPE DATABASE USER CIDR-ADDRESS METHOD
host koji koji 127.0.0.1/32 trust
host koji apache 127.0.0.1/32 trust
host koji koji ::1/128 trust
host koji apache ::1/128 trust
local koji apache trust
local koji koji trust

To enble these changes:
root@hongkong# su - postgres
postgres@hongkong$ pg_ctl reload
postgres@hongkong$ exit

After this has been completed an intial admin account needs to be added and given privileges to create new users for use with Koji. The admin account is added by executing the following commands:

koji@hongkong$ psql
koji=> insert into users (name, status, usertype) values ('kojiadmin', 0, 0);
koji=> insert into user_perms (user_id, perm_id) values (, 1);

This example is for use with SSL authentication , but Koji can also use a user/password system or Kerberos as a means for authenticating users.

Next… Koji Hub set-up.

Advertisements

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: