=head1 NAME B - Sets up the PostgreSQL database for xCAT to use. =head1 SYNOPSIS B {B<-h> | B<--help>} B {B<-v> | B<--version>} B {B<-i> | B<--init>} [B<-N> | B<--nostart>] [B<--listen> | B<-l> I
] [B<--access> | B<-a> I
] [B<-P> | B<--PCM>] [B<-o> | B<--odbc>] [B<-V> | B<--verbose>] B {B<-o> | B<--setupODBC>} [B<-V> | B<--verbose>] =head1 DESCRIPTION B - Sets up the PostgreSQL database for xCAT to use. The B script is run on the Management Node as root after the PostgreSQL has been installed. The B daemon will be stopped during migration. No xCAT commands should be run during the init process, because we will be migrating the xCAT database to PostgreSQL and restarting the B daemon as well as the PostgreSQL daemon. One password must be supplied for the setup, a password for the xcatadm unix id and the same password for the xcatadm database id. The password will be prompted for interactively or you can set the XCATPGPW environment variable to the password in order to avoid the prompt. =head1 OPTIONS =over 6 =item B<-h|--help> Displays the usage message. =item B<-v|--version> Displays the release version of the code. =item B<-V|--verbose> Displays verbose messages. =item B<-i|--init> The B<--init> option is used to setup an installed PostgreSQL database so that xCAT can use it. This involves creating the xcat database, the xcat admin id, allowing access to the xcatdb database by the Management Node. It customizes the postgresql.conf configuration file, adds the management server to the pg_hba.conf and starts the PostgreSQL server. It also backs up the current xCAT database and restores it into the newly setup xcatdb PostgreSQL database. It creates the /etc/xcat/cfgloc file to point the B daemon to the PostgreSQL database and restarts the B daemon using the database. On AIX, it additionally setup the xcatadm unix id and the postgres id and group. For AIX, you should be using the PostgreSQL rpms available from the xCAT website. For Linux, you should use the PostgreSQL rpms shipped with the OS. You can chose the B<-o> option, to run after the init. To add additional nodes to access the PostgreSQL server, setup on the Management Node, use the B<-a> option. For more documentation see: =item B<-N|--nostart> This option with the B<-i> flag will create the database, but will not backup and restore xCAT tables into the database. It will create the cfgloc file such that the next start of B will try and contact the database. This can be used to setup the xCAT PostgreSQL database during or before install. =item B<-l|--listen> I
This option is used to specify additional IP addresses on which the PostgreSQL database will listen. Without it, only localhost (on Linux) and the management node's main IP (on Linux and AIX) will be configured. This option can be specified multiple times. =item B<-a|--access> I
This option is used to specify additional IP addresses from which the additional nodes will connect to the PostgreSQL database, for example, service nodes IP addresses or MN HA primary/standby nodes physical IP addresses. Without it, only the management node will be configured for database access. This option can be specified multiple times. =item B<-P|--PCM> This option sets up PostgreSQL database to be used with xCAT running with PCM. =item B<-o|--odbc> This option sets up the ODBC /etc/../odbcinst.ini, /etc/../odbc.ini and the .odbc.ini file in roots home directory will be created and initialized to run off the xcatdb PostgreSQL database. =back =head1 ENVIRONMENT VARIABLES =over 4 =item B The password to be used to setup the xCAT admin id for the database. =back =head1 EXAMPLES =over 2 =item 1. To setup PostgreSQL for xCAT to run on the PostgreSQL xcatdb database : pgsqlsetup -i =item 2. To setup the ODBC for PostgreSQL xcatdb database access : pgsqlsetup -o =back