jump to navigation

Setting up Postgresql for use with Koji – Part One March 25, 2010

Posted by Paul Whalen in Koji.

So next we are going to attempt to create a Koji Build system for the ARM architecture. We have decided for now that all parts of the Koji build system will reside on Hong Kong, and then ported to other machines as needed. In order to do this we need to complete a number of initial steps, first being the creation of certificates for use by the different parts of Koji, this portion is omitted here but I will link to another blog for additional information. The entire instructions are also available from the Fedora Project website – Here.
First if you do not already have Postgresql install on your system you can simply download it via Yum:
root@hongkong# yum install postgresql-server
Once installed you will then need to initialize the Database with the following command:
root@hongkong# service postgresql initdb
Then start the Postgresql service with:
root@hongkong# service postgresql start
At this point the Postgresql server is installed and operational provided no errors were reported with the database initialized. The next steps is to create a user named “koji”, set up Postgresql and populate the schema:
root@hongkong# useradd koji
root@hongkong# passwd -d koji
root@hongkong# su - postgres
postgres@hongkong# createuser koji
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) n
Shall the new role be allowed to create more new roles?(y/n) n
postgres@hongkong# createdb -O koji koji
postgres@hongkong# logout
root@hongkong# su - koji
koji@hongkong$ psql koji koji < /usr/share/doc/koji*/docs/schema.sql
koji@hongkong$ exit

Next to be covered is editing the “/var/lib/pgsql/data/pg_hba.conf” to authorize Koji-web and Koji-Hub resources.



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: