cvs commit: BLFS/BOOK/introduction/welcome changelog.xml credits.xml

larry at larry at
Sat Aug 24 07:44:25 PDT 2002

larry       02/08/24 07:44:25

  Modified:    BOOK/content content.ent
               BOOK/content/databases databases.xml
               BOOK/introduction/welcome changelog.xml credits.xml
  Added:       BOOK/content/databases postgres.xml
               BOOK/content/databases/postgres postgres-config.xml
                        postgres-desc.xml postgres-exp.xml
                        postgres-inst.xml postgres-intro.xml postgres.ent
  added PostgreSQL
  Revision  Changes    Path
  1.2       +2 -0      BLFS/BOOK/content/content.ent
  Index: content.ent
  RCS file: /home/cvsroot/BLFS/BOOK/content/content.ent,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- content.ent	7 Jul 2002 20:28:47 -0000	1.1
  +++ content.ent	24 Aug 2002 14:44:24 -0000	1.2
  @@ -4,8 +4,10 @@
   <!ENTITY content-databases SYSTEM "databases/databases.xml">
   <!ENTITY % db SYSTEM "databases/db/db.ent">
   <!ENTITY % mysql SYSTEM "databases/mysql/mysql.ent">
  +<!ENTITY % postgres SYSTEM "databases/postgres/postgres.ent">
   <!-- Web server software -->
   <!ENTITY content-web SYSTEM "web/web.xml">
  1.2       +1 -0      BLFS/BOOK/content/databases/databases.xml
  Index: databases.xml
  RCS file: /home/cvsroot/BLFS/BOOK/content/databases/databases.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- databases.xml	7 Jul 2002 20:28:47 -0000	1.1
  +++ databases.xml	24 Aug 2002 14:44:24 -0000	1.2
  @@ -4,5 +4,6 @@
  1.1                  BLFS/BOOK/content/databases/postgres.xml
  Index: postgres.xml
  <sect1 id="postgres" xreflabel="Postgres-&postgres-version;">
  <?dbhtml filename="postgres.html" dir="content"?>
  1.1                  BLFS/BOOK/content/databases/postgres/postgres-config.xml
  Index: postgres-config.xml
  <title>Configuring PostgreSQL</title>
  <title>Config files</title>
  $PGDATA/pg_ident.con, $PGDATA/pg_hba.conf, $PGDATA/postgresql.conf
  <para>The PGDATA environment variable is used to distinguish database
  clusters from one another by setting it to the value of the directory
  which contains the cluster desired.  The three configuration files
  exist in every PGDATA/ directory.  Details on the format of the files
  and the options that can be set in each can be found in :</para>
  <ulink url="file:///usr/share/doc/postgresql/html/tutorial.html" />
  <para>postgres init.d script</para>
  <para>Create the postgres, boot script with the following : </para>
  cat > /etc/rc.d/init.d/postgres << "EOF"</userinput>
  # Begin $rc_base/init.d/postgres
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at
  source /etc/sysconfig/rc
  source $rc_functions
  case "$1" in
                  echo "Starting PostgreSQL daemon..."
                  su - postgres -c '/usr/bin/postmaster -D \
                      /var/pgsql/data > /var/pgsql/data/logfile 2>&1 &'
                  echo "Stopping PostgreSQL daemon..."
                  killproc postmaster
                  $0 stop
                  sleep 1
                  $0 start
                  statusproc /usr/sbin/postmaster
                  echo "Usage: $0 {start|stop|restart|status}"
                  exit 1
  # End $rc_base/init.d/
  chmod 755 /etc/rc.d/init.d/postgres</userinput></screen>
  <para>Create the symbolic links to this file in the relevant rc.d directory
  with the following commands:</para>
  cd /etc/rc.d/init.d &&
  ln -sf ../init.d/mysql ../rc0.d/K28postgres &&
  ln -sf ../init.d/postgres ../rc1.d/K28postgres &&
  ln -sf ../init.d/postgres ../rc2.d/K23postgres &&
  ln -sf ../init.d/postgres ../rc3.d/S35postgres &&
  ln -sf ../init.d/postgres ../rc4.d/S35postgres &&
  ln -sf ../init.d/postgres ../rc5.d/S35postgres &&
  ln -sf ../init.d/postgres ../rc6.d/K23postgres
  1.1                  BLFS/BOOK/content/databases/postgres/postgres-desc.xml
  Index: postgres-desc.xml
  <para>The PostgreSQL RDBMS contains
  <userinput>psql</userinput> and
  <para>createdb creates a new PostgreSQL database.</para></sect3>
  <para>createlang defines a new PostgreSQL procedural
  <para>createuser defines a new PostgreSQL user account.</para></sect3>
  <para>dropdb removes a PostgreSQL database.</para></sect3>
  <para>droplang removes a PostgreSQL procedural
  <para>dropuser removes a PostgreSQL user account.</para></sect3>
  <para>ecpg is the embedded SQL preprocessor.</para></sect3>
  <para>initdb create a new database cluster.</para></sect3>
  <para>initlocation creates a secondary database storage
  <para>ipcclean removes share memory and semaphores left over by an
  aborted database server.</para></sect3>
  <para>pg_config retrieves PostgreSQL version
  <para>pg_ctl controls stopping and starting the database
  <para>pg_dump dumps database data and metadata into scripts which are
  used to recreate the database.</para></sect3>
  <para>pg_dumpall recursively calls pg_dump for each database in a
  <para>pg_passwd is a secondary password file utility, for controlling
  access to databases.</para></sect3>
  <para>pg_restore creates databases from dump files created by
  <para>pgaccess is a graphical client for PostgreSQL, written in
  <para>pgtclsh is a tcl shell for PostgreSQL.</para></sect3>
  <para>pgtksh is a wish style shell for PostgreSQLL.</para></sect3>
  <para>postgres is a single user database server, generally used for
  <para>postmaster is the multiuser database daemon.</para></sect3>
  <para>psql is a console based database shell.</para></sect3>
  <para>vacuumdb compacts databases and generates statistics for the
  query analyzer.</para></sect3>
  1.1                  BLFS/BOOK/content/databases/postgres/postgres-exp.xml
  Index: postgres-exp.xml
  <title>Command explanations</title>
  <para><userinput>useradd -d /var/pgsql/data postgres : </userinput>
  Add an unprivileged user to run the database server.  Running the
  server as root is dangerous, and moreover simply will not work.</para>
  su - postgres -c '/usr/bin/initdb -D /var/pgsql/data' : </userinput>
  Initialize the database tablespace.  This command may not be executed
  by root.</para>
  su - postgres -c '/usr/bin/postmaster -D /var/pgsql/data > \
          /var/pgsql/data/logfile 2>&1 &' : </userinput>
  Start the database server.  User postgres must execute this command as
  createdb test, create table t1 , insert into t1 values..., select *
  from t1 : </userinput>
  Create a database, add a table to it, insert some rows into the table
  and select them to verify that the installation is working
  1.1                  BLFS/BOOK/content/databases/postgres/postgres-inst.xml
  Index: postgres-inst.xml
  <title>Installation of PostgreSQL</title>
  <para>Install PostgreSQL with the following commands: </para>
  ./configure --prefix=/usr &&
  make &&
  make install &&
  Initialize a database cluster with the following commands: </para>
  mkdir -p /var/pgsql/data &&
  useradd -d /var/pgsql/data postgres &&
  chown postgres /var/pgsql/data &&
  su - postgres -c '/usr/bin/initdb -D /var/pgsql/data'
  <para>Start the database server with the following command: </para>
  su - postgres -c '/usr/bin/postmaster -D /var/pgsql/data > \
          /var/pgsql/data/logfile 2>&1 &'
  <para>Now we can create a database and verify the installation: </para>
  su - postgres -c '/usr/bin/createdb test'
  echo "create table t1 ( name varchar(20), city varchar(20) );" \
                  | (su - postgres -c '/usr/bin/psql test ')
  echo "insert into t1 values ('billy', 'NewYork');" \
                  | (su - postgres -c '/usr/bin/psql test ')
  echo "insert into t1 values ('Evanidus', 'Quebec');" \
  	        | (su - postgres -c '/usr/bin/psql test ')
  echo "insert into t1 values ('Jesse', 'Ottowa');" \
                  | (su - postgres -c '/usr/bin/psql test ')
  echo "select * from t1;" | (su - postgres -c '/usr/bin/psql test ')
  1.1                  BLFS/BOOK/content/databases/postgres/postgres-intro.xml
  Index: postgres-intro.xml
  <title>Introduction to PostgreSQL&postgres-version;</title>
  Download location (HTTP):     <ulink url="&postgres-download-http;" />
  Version used:                   &postgres-version;
  Package size:                   &postgres-size;
  Estimated Disk space required:  &postgres-buildsize;</screen>
  <para>The PostgreSQL package contains the PostgreSQL RDBMS, client
  utilites and language bindings.</para>
  1.1                  BLFS/BOOK/content/databases/postgres/postgres.ent
  Index: postgres.ent
  <!ENTITY postgres SYSTEM "../postgres.xml">
  <!ENTITY postgres-intro SYSTEM "postgres-intro.xml">
  <!ENTITY postgres-inst SYSTEM "postgres-inst.xml">
  <!ENTITY postgres-exp SYSTEM "postgres-exp.xml">
  <!ENTITY postgres-config SYSTEM "postgres-config.xml">
  <!ENTITY postgres-desc SYSTEM "postgres-desc.xml">
  <!ENTITY postgres-version "7.2.2">
  <!ENTITY postgres-download-http
  <!ENTITY postgres-size "9.2 MB">
  <!ENTITY postgres-buildsize "54 MB">
  1.82      +3 -0      BLFS/BOOK/introduction/welcome/changelog.xml
  Index: changelog.xml
  RCS file: /home/cvsroot/BLFS/BOOK/introduction/welcome/changelog.xml,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- changelog.xml	24 Aug 2002 10:19:19 -0000	1.81
  +++ changelog.xml	24 Aug 2002 14:44:25 -0000	1.82
  @@ -10,6 +10,9 @@
  +<listitem><para>August 24th, 2002 [larry]: Content: Added
   <listitem><para>August 24th, 2002 [larry]: pst: Added
  1.36      +1 -1      BLFS/BOOK/introduction/welcome/credits.xml
  Index: credits.xml
  RCS file: /home/cvsroot/BLFS/BOOK/introduction/welcome/credits.xml,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- credits.xml	24 Aug 2002 10:19:19 -0000	1.35
  +++ credits.xml	24 Aug 2002 14:44:25 -0000	1.36
  @@ -90,7 +90,7 @@
   <listitem><para>db and lcms: <emphasis>Jeremy Jones and Mark
  -<listitem><para>bind, emacs, leafnode, libfam, pine, qmail, Samba,
  +<listitem><para>bind, emacs, leafnode, libfam, pine, qmail, PostgreSQL, Samba,
   sendmail, slrn, tex and xinetd: <emphasis>Billy O'Connor</emphasis></para></listitem>
   <listitem><para>fetchmail and wvdial: <emphasis>Paul
Unsubscribe: send email to listar at
and put 'unsubscribe blfs-book' in the subject header of the message

More information about the blfs-book mailing list