Skip to main content

Fedora Package Database Installation - From Beginning to as far as I got

1.      Get the package database:

·         git clone

2.      Install the needed packages:

·         yum -y install python-genshi TurboGears python-turbojson postgresql-server \
        postgresql-contrib python-TurboMail python-bugzilla python-fedora \
        python-psycopg2 python-sqlalchemy python-feedparser koji mod_wsgi \
        python-paver httpd mod_ssl babel python-cpio xz python-argparse \
        python-mako python-memcached py
NOTE: if you are running on fedora install python-fedora-turbogears by issuing command “yum install python-fedora-turbogears”

3.      go to packaged “cd packagedb”

·         python egg_info (you will get a few warnings ignore them)
           NOTE:please do a yum update before doing this.

4.     Copy paver to your current directory and renaming  it to paver.local
·         cp /usr/bin/paver paver.local

5.      Run this complicated command (copy/paste it carefully so only the code gets copied)
·         sed 's/__requires__ = .*/__requires__ = ["Paver", "CherryPy < 3.0"]/' < paver.local > paver

6.       Build the package:
·         paver build --install-conf=`pwd` --install-data=`pwd` --install-sbin=`pwd`

7.      start the postgresql service if it is not already started by issuing
·         service postgresql initdb
·         start the service using "service postgresql start"

8.      Create postgresql users: 

sudo -u postgres createuser -SDRPE pkgdbadmin
        Enter password for new role: <password>
        Enter it again: <password>
        sudo -u postgres createuser -SDRPE pkgdbreadonly
        Enter password for new role: <password>
        Enter it again: <password>

Get the most recent dump from the same website you grabbed fedora package from. so go to and download the most recent ".dump.xz" file

then run this command to import it all to the database:

xzcat pkgdb-20100318.dump.xz | sudo -u postgres psql
NOTE: this can take a while, no, rather this will take a while - give it about 3-4 hours if you are running it on a virtual machine.

9.       Run this command
·            sudo -u postgres psql pkgdb < update-schema/03_add_gitbranchname.sql

10.     Memcached is an optional daemon that can be run to speed up the server.  It functions by caching certain data that is read many times so that we don't have to access the database as frequently.  To use it you need to install and start it

·               su -c yum install memcached
·               su -c /etc/init.d/memcached start

11.      Move pkgdb.cfg.sample to pkgdb.cfg
·               mv pkgdb.cfg.sample pkgdb.cfg

12.      Modify the pkgdb.cfg file
·                  sqlalchemy.dburi="postgres://pkgdbadmin:(password)@localhost/pkgdb"
·            server.static_media_dir="(the path to packagedb directory e.g /home/hitman/packaged)"

13.      Modify /etc/httpd/conf/httpd.conf
·          vi /etc/httpd/conf/httpd.conf
        <Directory "/home/hitman/packagedb">
            AllowOverride None
            Options None
            Order allow,deny
            Allow from all

14.    Turn SELINUX in permissive mode (just to check)
·      setenforce 0

15. Copy the httpd-pkgdb.conf file to your apache conf.d directory

·      sudo cp httpd-pkgdb.conf /etc/httpd/conf.d/

16.    Restart httpd server
·      service httpd restart

17.    ATTEMPT to access the Fedora Package Database Webpage
·         https://localhost/pkgdb/

18. Get the errors from the error log and try to resolve them.
·         tail /etc/httpd/logs/ssl_error_log

[Tue Nov 19 23:09:07.816671 2013] [:error] [pid 2494] [remote ::1:6073] mod_wsgi (pid=2494): Target WSGI script '/home/hitman/Public/packagedb/pkgdb.wsgi' cannot be loaded as Python module.
[Tue Nov 19 23:09:07.816714 2013] [:error] [pid 2494] [remote ::1:6073] mod_wsgi (pid=2494): Exception occurred processing WSGI script '/home/hitman/Public/packagedb/pkgdb.wsgi'.
[Tue Nov 19 23:09:07.816733 2013] [:error] [pid 2494] [remote ::1:6073] Traceback (most recent call last):
[Tue Nov 19 23:09:07.816757 2013] [:error] [pid 2494] [remote ::1:6073] File "/home/hitman/Public/packagedb/pkgdb.wsgi", line 24, in
[Tue Nov 19 23:09:07.816809 2013] [:error] [pid 2494] [remote ::1:6073] modulename="pkgdb.config")
[Tue Nov 19 23:09:07.816821 2013] [:error] [pid 2494] [remote ::1:6073] File "/usr/lib/python2.7/site-packages/turbogears/", line 219, in update_config
[Tue Nov 19 23:09:07.816892 2013] [:error] [pid 2494] [remote ::1:6073] configdict = config_obj(configfile, modulename).dict()
[Tue Nov 19 23:09:07.816904 2013] [:error] [pid 2494] [remote ::1:6073] File "/usr/lib/python2.7/site-packages/turbogears/", line 174, in config_obj
[Tue Nov 19 23:09:07.816923 2013] [:error] [pid 2494] [remote ::1:6073] modname + '.cfg')
[Tue Nov 19 23:09:07.816933 2013] [:error] [pid 2494] [remote ::1:6073] File "/usr/lib/python2.7/site-packages/", line 862, in resource_filename
[Tue Nov 19 23:09:07.817317 2013] [:error] [pid 2494] [remote ::1:6073] return get_provider(package_or_requirement).get_resource_filename(
[Tue Nov 19 23:09:07.817329 2013] [:error] [pid 2494] [remote ::1:6073] File "/usr/lib/python2.7/site-packages/", line 180, in get_provider
[Tue Nov 19 23:09:07.817345 2013] [:error] [pid 2494] [remote ::1:6073] import(moduleOrReq)
[Tue Nov 19 23:09:07.817360 2013] [:error] [pid 2494] [remote ::1:6073] ImportError: No module named pkgdb

This is how far I got when installing Fedora Package Datbase.


Popular posts from this blog

ASUS RT N16 + OpenWRT + nodogsplash = WiFi Hotspot (For beginners)

1.Make sure you are directly connected to the router through a cable ·Take an ethernet cable from your ASUS modem and plug it into your pc/laptop
2.Now access your modem by going into the browser and typing: ·Go to administration tab and click on Firmware upgrade/update NOTE: Please use internet explorer for all of these configurations. There are some issues reported in other browsers. 3.You will have to load a DD-WRT basic image first to load the openWRT image. You cannot directly load openWRT image for some reason I dont know of ·Download the image by clicking on the link:
4.Once the image is downloaded just click on browse on the ASUS firmware upgrade page and browse to the DDWRT image and upload it

How to Install GTK-RecordMyDesktop on RHEL 7 (best screen recording software imo)

If you want to record your screen to make tutorials or something else, GTK-recordmydesktop is capable of doing it. Most of the screen-recording programs that I have come across requires you to record your audio separately, however this software is also capable of recording audio without any extra step. It can also work with JACK audio server.

PART 1 - Install EPL repository for RHEL 7:
Open a terminalInstall epel using the following command: yum -y install epel-release.Refresh repo by typing the following commad: yum repolist.PART 2 - Install GTK-RecordMyDesktop: yum install gtk-recordmydesktop That's it, it should work right away. If it doesn't, it is possible that you might be missing some codecs as I installed them from nux and epel repos earlier.

Create isolated network on Virtual Machine Manager - Centos 6.5

Since most of the Linux administration practice is done in a virtual environment, I thought I should create a video about it, as I am aware that some students at my college struggle with it in their labs. Please let me know if I missed anything or did not explain anything clearly.