Advertisment

Database Mgmt for postgreSQL 

author-image
PCQ Bureau
New Update

Red Hat Database 2.1 (RHDB) is graphical database administration tool for the PostgreSQL server. Designed by Red Hat, it runs on Red Hat 7.3, Red Hat 8.0 and Red Hat Enterprise Linux 2.1. We tested it on a Red Hat 8.0 system.

Advertisment

To install the RHDB, you should have the above-mentioned Red Hat versions of Linux with all the updates and patches installed on your machine. To install the updates, use the tool ‘up2date’ provided in the OS. Now make sure that PostgreSQL server is not installed on your machine. If it is installed, then remove the package by using the ‘red hat-config-packages’ tool.

For this, first run the command and then deselect the ‘SQL Servers’ from the list.

To install the RHDB, first copy the iso file called ‘rhdb21-i386.iso’ to your machine from this month’s DVD and mount it like this,

Advertisment

#cp rhdb21-i386.iso /



#mkdir /rhdb


#mount —o loop rhdb21-i386.iso /rhdb

Now all the contents of iso file will be available under the /rhdb folder. Now start your Xwindow and change to this folder and run the shell script ‘Install’ from a terminal like this,

#./Install

Advertisment

This will automatically detect the Linux version and continue the process. On the dialogue box that you see, click on the ‘Install’ button and the wizard will ask to select the type of installation. The best is to select the ‘Custom installation’ and add the packages you need. From here you select all the required packages and click on ‘Next’ to precede the installation. 

After your installation is over, it is the time to start and configure your PostgreSQL server that is installed with RHDB. First, you have to make a data directory where the databases will be stored and initialized. To do so, run the commands like this

#mkdir —p /var/lib/pgsql/data



#su postgres


$initdb —D /var/lib/pgsql/data.








Now your database is initialized. But there is a little problem. By default PostgreSQL doesn’t allow local host to connect to the database. So, to set the access for local host, modify the file ‘/var/lib/pgsql/ data/pg_hda.conf’ by removing Hash ‘#’ symbols from the beginning of the following lines and save and exit

Advertisment

local all trust



host all 127.0.0.1 255.255.255.255 trust

Now everything is in its place, just run the server like this,

#su postgres



$postmaster —D /var/lib/pgsql/data

Advertisment

Now you can use the graphical-administration tool to configure (create and manage your databases, security, clusters, triggers, etc). To start the front-end, run the command ‘rhdb-admin’ from any terminal window. 

To add a new cluster (a Linux machine running at least the Core RDHB services), go to File>Add Cluster menu and click on it. It will ask you for general authentication and the path of the server. For example, to add a local server, select the ‘Unix Domain Socket’ radio button under ‘Connection Method’ and enter the username as ‘postgres’ and its password. Leave the other values as default and click on OK. It will then connect to the local postmaster. From here you can manage, add or remove any component of a database, graphically. If you have worked with MS SQL administrative tool, you will find RDHB quite similar. You can get good documentation on configuring, using and finetuning RHDB at http://sources.redhat.

com/rhdb.

Anindya Roy

Advertisment