mirror of https://github.com/tLDP/LDP
updated
This commit is contained in:
parent
47816d074c
commit
4c1dcaecff
|
@ -44,10 +44,14 @@ Revision Control System
|
|||
<author>Al Dev (Alavoor Vasudevan)
|
||||
<htmlurl url="mailto:alavoor@yahoo.com"
|
||||
name="alavoor@yahoo.com">
|
||||
<date>v16.0, 07 Jan 2001
|
||||
<date>v17.0, 20 Jan 2001
|
||||
<abstract>
|
||||
This document is a "practical guide" to very quickly setup CVS/RCS source code
|
||||
control system. This document also has custom shell scripts which are wrappers on top of CVS. These scripts provide a easy user interface for CVS. The information in this document applies to Linux and as well as to all other flavors of Unix liks Solaris, HPUX, AIX, SCO, Sinix, BSD, SCO, etc..
|
||||
control system. This document has custom shell scripts which are wrappers
|
||||
on top of CVS. These scripts provide an easy user interface for CVS.
|
||||
Several shell scripts are provided to make RCS more easy to use.
|
||||
The information in this document applies to Linux and as well as to all other
|
||||
flavors of Unix liks Solaris, HPUX, AIX, SCO, Sinix, BSD, SCO, etc.. and BeOS.
|
||||
</abstract>
|
||||
|
||||
<!-- Table of contents -->
|
||||
|
@ -115,7 +119,7 @@ See the sample korn shell scripts at <ref id="Shell Scripts">.
|
|||
|
||||
Advantages of CVS
|
||||
<itemize>
|
||||
<item> CVS is de-centralised a user checks out files/directories
|
||||
<item> CVS is de-centralised an user checks out files/directories
|
||||
from the repostitory
|
||||
and has his own separate stable source directory tree.
|
||||
<item> CVS can "STAMP" releases of entire project source tree.
|
||||
|
@ -523,11 +527,17 @@ is at <url url="http://www.emacs.org">.
|
|||
-->
|
||||
<sect> Shell Scripts <label id="Shell Scripts">
|
||||
<p>
|
||||
The following are wrappers around the basic CVS commands. The scripts are written for Korn shell since korn shell is always available on all flavors of unixes, but you can translate to bash or PERL if needed. You can customize
|
||||
The following are wrappers around the basic CVS commands. These scripts
|
||||
give you initial <bf>booster-push</bf> into the CVS system and are useful
|
||||
untill you become very familiar with the CVS commands. The scripts
|
||||
are written for Korn shell since korn shell is always available
|
||||
on all flavors of unixes, but you can translate to bash or
|
||||
PERL if needed. You can customize
|
||||
these scrips to your taste. They are basically CVS commands but features are
|
||||
added to make it site specific. For example, sedit script provides locking
|
||||
so that users will know some-one is editing the file. Of course users can
|
||||
directly use the CVS commands to by-pass these scripts. These scripts demonstrate how CVS can be customized to a great extent.
|
||||
directly use the CVS commands to by-pass these scripts. These scripts
|
||||
demonstrate how CVS can be <bf>customized</bf> to a great extent.
|
||||
|
||||
<bf>NOTE: </bf> <it>The wrapper shell scripts assume that the user's
|
||||
home directory as the root and check out the tree from cvs to build the
|
||||
|
@ -541,7 +551,7 @@ And in CVS the same directory structure is maintained (by
|
|||
variable $subdir) therefore in cvs there will be something
|
||||
like $CVSROOT/$subdir/$fname.
|
||||
In all scripts, these 4 variables $HOME, $CVSROOT, $subdir and $fname
|
||||
play a important role. For example, sample values can be like
|
||||
play an important role. For example, sample values can be like
|
||||
HOME=/home/aldev, subdir=myproject/src CVSROOT=/home/cvsroot
|
||||
and fname=foo.cpp
|
||||
</it>
|
||||
|
@ -563,7 +573,7 @@ Copy these scripts to /usr/local/bin and this should be in the user's PATH envir
|
|||
Click <ref id="scommit">
|
||||
|
||||
<item> <bf>supdate</bf> <filename/directory>
|
||||
To update a filename or to update a entire directory by
|
||||
To update a filename or to update an entire directory by
|
||||
getting the latest files from CVS
|
||||
Click <ref id="supdate">
|
||||
|
||||
|
@ -622,7 +632,6 @@ Copy these scripts to /usr/local/bin and this should be in the user's PATH envir
|
|||
|
||||
</verb></tscreen>
|
||||
<p>
|
||||
|
||||
<!--
|
||||
*******************************************
|
||||
************ End of Section ***************
|
||||
|
@ -714,6 +723,23 @@ is at <url url="http://www.cvshome.org/docs/manual/cvs.html">
|
|||
|
||||
|
||||
|
||||
<chapt> Graphical Front ends <label id="frontend">
|
||||
-->
|
||||
<sect> Graphical Front ends <label id="frontend">
|
||||
<p>
|
||||
<itemize>
|
||||
<item> TkCVS <url url="http://www.tkcvs.org"> is the Tcl/Tk GUI interface to CVS.
|
||||
<item> gCVS: A portable GUI for non-technical CVS user <url url="http://www.arachne.org/software/gcvs">
|
||||
<item> jCVS is a CVS client package written entirely in Java <url url="http://www.jcvs.org">
|
||||
</itemize>
|
||||
<!--
|
||||
*******************************************
|
||||
************ End of Section ***************
|
||||
*******************************************
|
||||
|
||||
|
||||
|
||||
|
||||
<chapt> Multi-User CVS Remote Repository <label id="multiuser">
|
||||
-->
|
||||
<sect> Multi-User CVS Remote Repository <label id="multiuser">
|
||||
|
@ -780,7 +806,7 @@ shell scripts.
|
|||
# Install the RCS programs - which gives command co, ci, rcslog
|
||||
# Create a rcs home directory where you want to put all the
|
||||
# source code repository. Call this $RCSDIR=/home/rcs_version_control
|
||||
# Setup up a environment variable RCSDIR=/home/rcs_version_control
|
||||
# Setup up an environment variable RCSDIR=/home/rcs_version_control
|
||||
# in $HOME/.profile file. Like -
|
||||
# export RCSDIR=/home/rcs_version_control
|
||||
# Create a directory structure under $RCSDIR and check in all your
|
||||
|
@ -1054,6 +1080,74 @@ for Project tracking system.
|
|||
|
||||
|
||||
|
||||
<chapt> Related sites <label id="relatedsites">
|
||||
-->
|
||||
<sect> Related sites <label id="relatedsites">
|
||||
<p>
|
||||
Related URLs are at -
|
||||
<itemize>
|
||||
<item>Linux version control and configuration management tools <url url="http://linas.org/linux/cmvc.html">
|
||||
<item> Linux goodies <url url="http://www.aldev.8m.com">
|
||||
and mirrors at
|
||||
<url url="http://aldev.webjump.com" name="webjump">,
|
||||
<url url="http://www.angelfire.com/nv/aldev" name="angelfire">,
|
||||
<url url="http://www.geocities.com/alavoor/index.html" name="geocities">,
|
||||
<url url="http://aldev.virtualave.net" name="virtualave">,
|
||||
<url url="http://aldev.bizland.com" name="bizland">,
|
||||
<url url="http://members.theglobe.com/aldev/index.html" name="theglobe">,
|
||||
<url url="http://members.spree.com/technology/aldev" name="spree">,
|
||||
<url url="http://homepages.infoseek.com/~aldev1/index.html" name="infoseek">,
|
||||
<url url="http://www3.bcity.com/aldev" name="bcity">,
|
||||
<url url="http://aldev.50megs.com" name="50megs">
|
||||
|
||||
<item> Configuration Management systems <url url="http://www.cmtoday.com/yp/commercial.html">
|
||||
<item> Configuration Management Tools <url url="http://www.iac.honeywell.com/Pub/Tech/CM/CMTools.html">
|
||||
<item> CVS Bubbles <url url="http://www.loria.fr/~molli/cvs-index.html">
|
||||
<item> CSSC (SCCS like system) <url url="ftp://alpha.gnu.org/pub/gnu/CSSC">
|
||||
<item> SCCS for linux <url url="http://www.bitmover.com/bitkeeper">
|
||||
</itemize>
|
||||
<!--
|
||||
*******************************************
|
||||
************ End of Section ***************
|
||||
*******************************************
|
||||
|
||||
|
||||
|
||||
|
||||
<chapt change> SCCS v/s CVS-RCS
|
||||
-->
|
||||
<sect> SCCS v/s CVS-RCS
|
||||
<p>
|
||||
SCCS (Source Code Control System)
|
||||
is no longer being enhanced or improved.
|
||||
The general consensus has been that this tool is clumsy and not
|
||||
suited to large numbers of users working on one project.
|
||||
Actually, SCCS interleaves
|
||||
all the versions; but it can make new development get
|
||||
<bf>progressively slower</bf>. Hence, SCCS is NOT recomended for
|
||||
new projects, it is still there to support old code base in SCCS.
|
||||
|
||||
RCS (Revision Control System) is often considered to be
|
||||
better than SCCS. One reason for this is that RCS baselines the most
|
||||
recent version and keeps deltas for earlier ones, making new
|
||||
development faster. Additional discussions concerning SCCS vs RCS
|
||||
is at <url url="http://www.faqs.org/faqs/unix-faq/faq/part7">
|
||||
|
||||
<bf>Note that RCS learned from the mistakes of SCCS... </bf>
|
||||
|
||||
CVS, which requires RCS, extends RCS
|
||||
to control concurrent editing of sources by several users
|
||||
working on releases built from a hierarchical set of
|
||||
directories. "RCS is [analogous to using] assembly language, while CVS is
|
||||
[like using] Pascal".
|
||||
<!--
|
||||
*******************************************
|
||||
************ End of Section ***************
|
||||
*******************************************
|
||||
|
||||
|
||||
|
||||
|
||||
<chapt change> Other Formats of this Document
|
||||
-->
|
||||
<sect> Other Formats of this Document
|
||||
|
@ -1203,7 +1297,7 @@ Save this file as text file and chmod a+rx on it.
|
|||
# And in CVS the same directory structure is maintained (by
|
||||
# variable $subdir) therefore in cvs we will have $CVSROOT/$subdir/$fname
|
||||
# In this program these 4 variables $HOME, $CVSROOT, $subdir and $fname
|
||||
# play a important role. For example, sample values can be like
|
||||
# play an important role. For example, sample values can be like
|
||||
# HOME=/home/aldev, subdir=myproject/src CVSROOT=/home/cvsroot
|
||||
# and fname=foo.cpp
|
||||
|
||||
|
@ -1353,7 +1447,7 @@ Save this file as text file and chmod a+rx on it.
|
|||
# And in CVS the same directory structure is maintained (by
|
||||
# variable $subdir) therefore in cvs we will have $CVSROOT/$subdir/$fname
|
||||
# In this program these 4 variables $HOME, $CVSROOT, $subdir and $fname
|
||||
# play a important role. For example, sample values can be like
|
||||
# play an important role. For example, sample values can be like
|
||||
# HOME=/home/aldev, subdir=myproject/src CVSROOT=/home/cvsroot
|
||||
# and fname=foo.cpp
|
||||
|
||||
|
@ -1599,7 +1693,7 @@ Save this file as text file and chmod a+rx on it.
|
|||
# And in CVS the same directory structure is maintained (by
|
||||
# variable $subdir) therefore in cvs we will have $CVSROOT/$subdir/$fname
|
||||
# In this program these 4 variables $HOME, $CVSROOT, $subdir and $fname
|
||||
# play a important role. For example, sample values can be like
|
||||
# play an important role. For example, sample values can be like
|
||||
# HOME=/home/aldev, subdir=myproject/src CVSROOT=/home/cvsroot
|
||||
# and fname=foo.cpp
|
||||
|
||||
|
@ -1811,7 +1905,7 @@ Save this file as text file and chmod a+rx on it.
|
|||
# And in CVS the same directory structure is maintained (by
|
||||
# variable $subdir) therefore in cvs we will have $CVSROOT/$subdir/$fname
|
||||
# In this program these 4 variables $HOME, $CVSROOT, $subdir and $fname
|
||||
# play a important role. For example, sample values can be like
|
||||
# play an important role. For example, sample values can be like
|
||||
# HOME=/home/aldev, subdir=myproject/src CVSROOT=/home/cvsroot
|
||||
# and fname=foo.cpp
|
||||
|
||||
|
@ -1906,7 +2000,7 @@ Save this file as text file and chmod a+rx on it.
|
|||
# And in CVS the same directory structure is maintained (by
|
||||
# variable $subdir) therefore in cvs we will have $CVSROOT/$subdir/$fname
|
||||
# In this program these 4 variables $HOME, $CVSROOT, $subdir and $fname
|
||||
# play a important role. For example, sample values can be like
|
||||
# play an important role. For example, sample values can be like
|
||||
# HOME=/home/aldev, subdir=myproject/src CVSROOT=/home/cvsroot
|
||||
# and fname=foo.cpp
|
||||
|
||||
|
@ -2105,7 +2199,7 @@ Save this file as text file and chmod a+rx on it.
|
|||
# And in CVS the same directory structure is maintained (by
|
||||
# variable $subdir) therefore in cvs we will have $CVSROOT/$subdir/$fname
|
||||
# In this program these 4 variables $HOME, $CVSROOT, $subdir and $fname
|
||||
# play a important role. For example, sample values can be like
|
||||
# play an important role. For example, sample values can be like
|
||||
# HOME=/home/aldev, subdir=myproject/src CVSROOT=/home/cvsroot
|
||||
# and fname=foo.cpp
|
||||
|
||||
|
@ -2232,7 +2326,7 @@ Save this file as text file and chmod a+rx on it.
|
|||
# And in CVS the same directory structure is maintained (by
|
||||
# variable $subdir) therefore in cvs we will have $CVSROOT/$subdir/$fname
|
||||
# In this program these 4 variables $HOME, $CVSROOT, $subdir and $fname
|
||||
# play a important role. For example, sample values can be like
|
||||
# play an important role. For example, sample values can be like
|
||||
# HOME=/home/aldev, subdir=myproject/src CVSROOT=/home/cvsroot
|
||||
# and fname=foo.cpp
|
||||
|
||||
|
@ -2373,7 +2467,7 @@ Save this file as text file and chmod a+rx on it.
|
|||
# And in CVS the same directory structure is maintained (by
|
||||
# variable $subdir) therefore in cvs we will have $CVSROOT/$subdir/$fname
|
||||
# In this program these 4 variables $HOME, $CVSROOT, $subdir and $fname
|
||||
# play a important role. For example, sample values can be like
|
||||
# play an important role. For example, sample values can be like
|
||||
# HOME=/home/aldev, subdir=myproject/src CVSROOT=/home/cvsroot
|
||||
# and fname=foo.cpp
|
||||
|
||||
|
@ -2483,7 +2577,7 @@ Save this file as text file and chmod a+rx on it.
|
|||
# And in CVS the same directory structure is maintained (by
|
||||
# variable $subdir) therefore in cvs we will have $CVSROOT/$subdir/$fname
|
||||
# In this program these 4 variables $HOME, $CVSROOT, $subdir and $fname
|
||||
# play a important role. For example, sample values can be like
|
||||
# play an important role. For example, sample values can be like
|
||||
# HOME=/home/aldev, subdir=myproject/src CVSROOT=/home/cvsroot
|
||||
# and fname=foo.cpp
|
||||
|
||||
|
@ -2618,7 +2712,7 @@ Save this file as text file and chmod a+rx on it.
|
|||
# And in CVS the same directory structure is maintained (by
|
||||
# variable $subdir) therefore in cvs we will have $CVSROOT/$subdir/$fname
|
||||
# In this program these 4 variables $HOME, $CVSROOT, $subdir and $fname
|
||||
# play a important role. For example, sample values can be like
|
||||
# play an important role. For example, sample values can be like
|
||||
# HOME=/home/aldev, subdir=myproject/src CVSROOT=/home/cvsroot
|
||||
# and fname=foo.cpp
|
||||
|
||||
|
@ -2783,7 +2877,7 @@ Save this file as text file and chmod a+rx on it.
|
|||
# And in CVS the same directory structure is maintained (by
|
||||
# variable $subdir) therefore in cvs we will have $CVSROOT/$subdir/$fname
|
||||
# In this program these 4 variables $HOME, $CVSROOT, $subdir and $fname
|
||||
# play a important role. For example, sample values can be like
|
||||
# play an important role. For example, sample values can be like
|
||||
# HOME=/home/aldev, subdir=myproject/src CVSROOT=/home/cvsroot
|
||||
# and fname=foo.cpp
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
<title>The Linux Kernel HOWTO
|
||||
<author>Brian Ward, <tt>bri@cs.uchicago.edu</tt>
|
||||
<date>v2.0, 03 Jan 2001
|
||||
<date>v3.0, 16 Jan 2001
|
||||
|
||||
<abstract>
|
||||
This is a detailed guide to kernel configuration, compilation, upgrades,
|
||||
|
@ -93,9 +93,8 @@ This section is written by
|
|||
<htmlurl url="mailto:alavoor@yahoo.com"
|
||||
name="Al Dev">
|
||||
|
||||
The latest version of this section is at <url url="http://www.aldev.8m.com"> and click on "
|
||||
<url name="Quick Steps to recompile linux kernel" url="http://www.aldev.8m.com/kernelcompile.html">
|
||||
". Mirror site is at <url url="http://aldev.webjump.com">.
|
||||
The latest version of this section is at <url url="http://www.aldev.8m.com"> and click on
|
||||
"Quick Steps to recompile linux kernel". Mirror site is at <url url="http://aldev.webjump.com">.
|
||||
|
||||
A copy of the above web-site is reproduced here -
|
||||
|
||||
|
@ -111,10 +110,11 @@ rpm -i kernel-headers*.rpm
|
|||
rpm -i kernel-sources*.rpm
|
||||
rpm -i bin86*.rpm
|
||||
</code>
|
||||
(This is required only for OLDER Linux systems like redhat 5.x.
|
||||
(The bin86*.rpm is required only for OLDER Linux systems like redhat 5.x.
|
||||
Install the Intel assembler 'as86' command. Get from
|
||||
<url url="http://rpmfind.net/linux/RPM/mandrake/7.1/Mandrake/RPMS/bin86-0.4-12mdk.i586.html">)
|
||||
or at <url url="http://rpmfind.net/linux/RPM/kondara/jirai/i586/bin86-0.4-8k.i586.html">
|
||||
<p>
|
||||
|
||||
<item> Start X-windows with 'startx'.
|
||||
<code>
|
||||
|
@ -125,17 +125,25 @@ The <bf>"make xconfig"</bf> brings up a user friendly GUI interface! DO NOT
|
|||
use 'make config' which is a command-line option (
|
||||
use this only if you CANNOT bring up X-window). You load
|
||||
the configuration file from <it>/usr/src/linux/arch/i386/config.in </it>
|
||||
<p>
|
||||
|
||||
<item> Enable the Loadable kernel modules support! See these man pages
|
||||
man lsmod; man insmod; man rmmod; man depmod;
|
||||
<code>
|
||||
man lsmod
|
||||
man insmod
|
||||
man rmmod
|
||||
man depmod
|
||||
</code>
|
||||
With this option you can load/unload the device drivers
|
||||
dynamically on running linux system on the fly.
|
||||
<p>
|
||||
|
||||
<item> Save and Exit "make xconfig". And now, do -
|
||||
<code>
|
||||
make dep
|
||||
make clean
|
||||
</code>
|
||||
<p>
|
||||
|
||||
<item> Read the following file (to gain some knowledge about kernel building...) -
|
||||
<code>
|
||||
|
@ -143,6 +151,7 @@ man less
|
|||
less /usr/src/linux/arch/i386/config.in
|
||||
</code>
|
||||
Type 'h' for help and to navigate press i, j, k, l, h or arrow, page up/down keys.
|
||||
<p>
|
||||
|
||||
<item> Now, give the make command -
|
||||
<code>
|
||||
|
@ -153,6 +162,7 @@ Type 'h' for help and to navigate press i, j, k, l, h or arrow, page up/down key
|
|||
This will put the kernel in /usr/src/linux/arch/i386/boot/bzImage
|
||||
man tail
|
||||
</code>
|
||||
<p>
|
||||
|
||||
<item> After bzImage is successful, copy the kernel image to /boot directory -
|
||||
<code>
|
||||
|
@ -160,7 +170,8 @@ cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage.myker
|
|||
</code>
|
||||
You must copy the new kernel image to /boot directory, otherwise the new kernel may not boot. And then read the manual page on lilo -
|
||||
<code>
|
||||
man lilo; man lilo.conf;
|
||||
man lilo
|
||||
man lilo.conf
|
||||
And edit /etc/lilo.conf file and put these lines -
|
||||
image=/boot/bzImage.myker
|
||||
label=myker
|
||||
|
@ -169,6 +180,7 @@ And edit /etc/lilo.conf file and put these lines -
|
|||
You can check device name for 'root=' with the command -
|
||||
df /boot
|
||||
</code>
|
||||
<p>
|
||||
|
||||
<item> Now give
|
||||
<code>
|
||||
|
@ -176,11 +188,13 @@ lilo ;
|
|||
lilo -q ;
|
||||
</code>
|
||||
You must re-run lilo even if entry 'myker' exists, everytime you create a new bzImage.
|
||||
<p>
|
||||
|
||||
<item> Reboot the machine and at lilo press tab key and
|
||||
type 'myker' If it boots then you did a good job! Otherwise at lilo
|
||||
select your old kernel, boot and re-try all over again. Your old kernel
|
||||
is still intact at say '/boot/vmlinuz-2.0.34-0.6'
|
||||
is still intact at say <it>/boot/vmlinuz-2.0.34-0.6</it>
|
||||
<p>
|
||||
|
||||
<item> Loadable Modules: Boot new kernel and install the loadable modules from RedHat Linux cdrom
|
||||
<code>
|
||||
|
@ -189,6 +203,7 @@ insmod pre-installed)
|
|||
man insmod
|
||||
insmod
|
||||
</code>
|
||||
<p>
|
||||
|
||||
<item> If your linux is already had loadable module enabled, then check
|
||||
for files in /lib/modules. The step given below may not be
|
||||
|
@ -198,6 +213,7 @@ cd /usr/src/linux
|
|||
make modules
|
||||
make install_modules
|
||||
</code>
|
||||
<p>
|
||||
|
||||
<item> Since the new kernel 'myker' boots, you can create the boot disk. Insert a blank floppy into floppy drive and -
|
||||
<code>
|
||||
|
|
|
@ -42,7 +42,7 @@ Covers PostgreSQL Version 6.5.3
|
|||
<author>Al Dev (Alavoor Vasudevan)
|
||||
<htmlurl url="mailto:alavoor@yahoo.com"
|
||||
name="alavoor@yahoo.com">
|
||||
<date>v42.0, 08 Jan 2001
|
||||
<date>v43.0, 20 Jan 2001
|
||||
<abstract>
|
||||
This document is a "practical guide" to very quickly setup a SQL Database
|
||||
engine and
|
||||
|
@ -88,9 +88,12 @@ which they can learn as to how a RDBMS SQL database engine is created.
|
|||
<sect>Introduction
|
||||
<p>
|
||||
The purpose of this document is to provide comprehensive list of pointers/URLs to
|
||||
quickly setup PostgreSQL and also to advocate the benefits of Open
|
||||
quickly setup PostgreSQL
|
||||
and also to advocate the benefits of Open
|
||||
Source Code system like PostgreSQL, Linux.
|
||||
|
||||
PostgreSQL is pronounced as Post-gres-cue-el (Postgres-QL) and <bf>not</bf> Postgre-es-cue-el.
|
||||
|
||||
Each and every computer system in the world needs a database to store/retrieve the information.
|
||||
The primary reason you use the computer is to store, retrieve and process information and do all these very quickly, thereby saving you time.
|
||||
At the same time, the system must be simple, robust, fast, reliable, economical and very easy to use.
|
||||
|
@ -425,6 +428,8 @@ diverse hardware platforms and Operating systems.
|
|||
The ultimate objective and the final goal of PostgreSQL is to become 100 &percnt
|
||||
compliant to ANSI/ISO SQL and also to become the number ONE open generic Database in the world.
|
||||
|
||||
PostgreSQL is pronounced as Post-gres-cue-el (Postgres-QL) and <bf>not</bf> Postgre-es-cue-el.
|
||||
|
||||
Today, PostgreSQL is the <bf>most advanced</bf> system in the world and
|
||||
it is surprising that many commercial database systems could not match
|
||||
the quality, features and
|
||||
|
@ -496,7 +501,9 @@ PostgreSQL details in nutshell:
|
|||
for the past 15 YEARS
|
||||
</itemize>
|
||||
The white paper on PostgreSQL is at
|
||||
<url url="http://www.greatbridge.com">
|
||||
<url url="http://www.greatbridge.com">.
|
||||
|
||||
PostgreSQL is pronounced as Post-gres-cue-el (Postgres-QL) and <bf>not</bf> Postgre-es-cue-el.
|
||||
<!--
|
||||
*******************************************
|
||||
************ End of Section ***************
|
||||
|
@ -579,6 +586,21 @@ MySQL is at <url url="http://www.tcx.se">
|
|||
************ End of Section ***************
|
||||
*******************************************
|
||||
|
||||
-->
|
||||
<sect1> MySQL is "NOT at all good"
|
||||
<p>
|
||||
PostgreSQL should be compared with systems like Oracle, both are really
|
||||
true ACID compliant robust systems developed over a very long time.
|
||||
It is very much wrong to compare
|
||||
MySQL with Oracle or MySQL with PostgreSQL. For more details read
|
||||
<url name="Why Not MySQL" url="http://openacs.org/philosophy/why-not-mysql.html">.
|
||||
Hence, it will be a very serious mistake to replace Oracle with MySQL!!
|
||||
If you want to replace Oracle then consider PostgreSQL.
|
||||
<!--
|
||||
*******************************************
|
||||
************ End of Section ***************
|
||||
*******************************************
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -661,6 +683,8 @@ PostgreSQL source code is also available at all the mirror sites of sunsite unc
|
|||
-->
|
||||
<sect>PostgreSQL Quick-Installation Instructions <label id="Quick-Installation">
|
||||
<p>
|
||||
PostgreSQL is pronounced as Post-gres-cue-el (Postgres-QL) and <bf>not</bf> Postgre-es-cue-el.
|
||||
|
||||
This chapter will help you to install and run the database very quickly in less than 5 minutes.
|
||||
|
||||
<sect1> Install and Test
|
||||
|
@ -698,7 +722,8 @@ bash$ export DISPLAY=<hostname>:0.0
|
|||
bash$ man pgaccess
|
||||
bash$ pgaccess mydatabase
|
||||
</code>
|
||||
Now you can start <bf>rapidly BANGING away</bf> SQL commands at psql or pgaccess !!
|
||||
Now you can start <bf>rapidly BANGING away</bf> SQL commands at psql or pgaccess.
|
||||
(babe, babe!)
|
||||
<code>
|
||||
bash$ cd /usr/doc/postgresql*
|
||||
</code>
|
||||
|
@ -1226,10 +1251,16 @@ databases in just one step.
|
|||
bash$ su - postgres
|
||||
bash$ man pd_dump
|
||||
bash$ pd_dump <database_name> > database_name.pgdump
|
||||
</code>
|
||||
and can be restored using:
|
||||
<code>
|
||||
|
||||
To dump all databases -
|
||||
bash$ man pg_dumpall
|
||||
bash$ pg_dumpall -o > db_all.out
|
||||
|
||||
To reload (restore) a database dumped with pg_dump:
|
||||
bash$ cat database_name.pgdump | psql <database_name>
|
||||
|
||||
To reload (restore) all databases dumped with pg_dumpall:
|
||||
bash$ psql -e template1 < db_all.out
|
||||
</code>
|
||||
This technique can be used to move databases to new locations, and to rename
|
||||
existing databases.
|
||||
|
@ -1244,29 +1275,19 @@ state after restoration.
|
|||
maximum file size on your system, it can be problematic to dump the table to
|
||||
a file, because the resulting file likely will be larger than the maximum
|
||||
size allowed by your system. As <bf>pg_dump</bf> writes to <bf>stdout</bf>,
|
||||
you can just use standard unix tools to work around this possible problem:
|
||||
|
||||
Use compressed dumps:
|
||||
you can just use standard unix tools to work around this possible problem -
|
||||
use compressed dumps.
|
||||
<code>
|
||||
bash$ pg_dump <database_name> | gzip > filename.dump.gz
|
||||
</code>
|
||||
reload with:
|
||||
<code>
|
||||
Reload with :
|
||||
bash$ createdb <database_name>
|
||||
bash$ gunzip -c filename.dump.gz | psql <database_name>
|
||||
</code>
|
||||
or
|
||||
<code>
|
||||
Or
|
||||
bash$ cat filename.dump.gz | gunzip | psql <database_name>
|
||||
</code>
|
||||
|
||||
Use split:
|
||||
<code>
|
||||
bash$ pg_dump <database_name> | split -b 1m - filename.dump.
|
||||
</code>
|
||||
Note: There is a dot (.) after filename.dump in the above command!! You can
|
||||
reload with:
|
||||
<code>
|
||||
Note: There is a dot (.) after filename.dump in the above command!!
|
||||
You can reload with:
|
||||
bash$ man createdb
|
||||
bash$ createdb <database_name>
|
||||
bash$ cat filename.dump.* | pgsql <database_name>
|
||||
|
@ -1276,13 +1297,42 @@ output need not match the name of the database. Also, the restored database
|
|||
can have an arbitrary new name, so this mechanism is also suitable for
|
||||
renaming databases.
|
||||
|
||||
To dump all the databases in PostgreSQL use <bf>pg_dumpall</bf>
|
||||
<bf>Backup LARGE Objects:</bf>
|
||||
Large objects are not handled by pg_dump. The directory <it>contrib/pg_dumplo </it>
|
||||
of the Postgres source tree contains a program that can do that.
|
||||
|
||||
<bf>FILESYSTEM BACKUP :</bf>
|
||||
You can use the linux OS tools and commands to backup the entire database.
|
||||
But you <bf>must completely</bf> shutdown the postgresql database server before doing backup
|
||||
or restore with this method.
|
||||
The filesystem backup or restore may be <bf>2 to 3 times faster</bf>
|
||||
than the pg_dump command, but only disadvantage is that you <bf>must completely</bf>
|
||||
shutdown the database server.
|
||||
It is very highly recommended that you use backup and restore tools
|
||||
like Arkeia, Bru which are
|
||||
given in Mic-Lin analogy list sub-heading "Backup and Restore Utility" at
|
||||
<url url="http://aldev.8m.com">
|
||||
and mirror sites are at
|
||||
<url name="webjump" url="http://aldev.webjump.com">,
|
||||
<url name="angelfire" url="http://www.angelfire.com/nv/aldev">,
|
||||
<url name="geocities" url="http://www.geocities.com/alavoor/index.html">,
|
||||
<url name="virtualnet" url="http://aldev.virtualave.net">,
|
||||
<url name="bizland" url="http://aldev.bizland.com">,
|
||||
<url name="theglobe" url="http://members.theglobe.com/aldev/index.html">,
|
||||
<url name="spree" url="http://members.spree.com/technology/aldev">,
|
||||
<url name="infoseek" url="http://homepages.infoseek.com/~aldev1/index.html">,
|
||||
<url name="bcity" url="http://www3.bcity.com/aldev">,
|
||||
<url name="50megs" url="http://aldev.50megs.com">
|
||||
.The OS commands to use are -
|
||||
<code>
|
||||
bash$ man pg_dumpall
|
||||
bash$ pg_dumpall -o > db.out
|
||||
To reload:
|
||||
bash$ psql -e template1 < db.out
|
||||
bash$ man tar
|
||||
bash$ tar -cvf backup.tar /usr/local/pgsql/data
|
||||
or using compression
|
||||
bash$ tar -zcvf backup.tgz /usr/local/pgsql/data
|
||||
</code>
|
||||
|
||||
<bf>INCREMENTAL BACKUP :</bf> This is in todo list and will appear in
|
||||
future release of PostgreSQL.
|
||||
<!--
|
||||
|
||||
|
||||
|
@ -1403,7 +1453,119 @@ More questions, read the fine manuals of PostgreSQL which are very
|
|||
extensive.
|
||||
PostgreSQL documentation is distributed with package. See the
|
||||
'User's Guide', 'Programmer's Guide', 'Administrator's Guide' and
|
||||
other manuals.
|
||||
other manuals. The release docs are
|
||||
at <url url="http://www.postgresql.org/users-lounge/docs">.
|
||||
<!--
|
||||
*******************************************
|
||||
************ End of Section ***************
|
||||
*******************************************
|
||||
|
||||
|
||||
|
||||
|
||||
<chapt> Performance Tuning of PostgreSQL server
|
||||
-->
|
||||
<sect> Performance Tuning of PostgreSQL server
|
||||
<p>
|
||||
Generally database server is standalone box connected to network.
|
||||
Since database server is the only unix process which runs on the CPU, you
|
||||
can do several optimizations to speed up the server.
|
||||
<!--
|
||||
*******************************************
|
||||
************ End of Section ***************
|
||||
*******************************************
|
||||
|
||||
-->
|
||||
<sect1> OS Tuning for Database server <label id="ostune">
|
||||
<p>
|
||||
To get more bang for a given CPU processing power, do the following:-
|
||||
<itemize>
|
||||
<item> Recompile linux kernel to make it small and lean. Remove items
|
||||
which are not used. See kernel
|
||||
howto at <url url="http://www.linuxdoc.org/HOWTO/Kernel-HOWTO.html">
|
||||
<p>
|
||||
<item> Turn off unneccessary unix processes - on linux/unix systems run chkconfig
|
||||
<code>
|
||||
bash$ su - root
|
||||
bash# man chkconfig
|
||||
bash# chkconfig --help
|
||||
bash# chkconfig --list | grep on | less
|
||||
From the above list, turn off the processes you do not want to start automatically -
|
||||
bash# chkconfig --level 0123456 <service name> off
|
||||
Next time when the machine is booted these services will not be started.
|
||||
Now, shutdown the services manually which you just turning off.
|
||||
bash# cd /etc/rc.d/init.d
|
||||
bash# ./<service name> stop
|
||||
</code>
|
||||
<p>
|
||||
<item> Do not run any other application processes which are unnecessary.
|
||||
<p>
|
||||
<item> Do not leave X-Window running unattended. Because X-window processes
|
||||
consume memory, CPU load and can be a serious security hole from outside attacks.
|
||||
The X-window managers generally used are KDE, GNOME, CDE, XDM and others.
|
||||
You must exit the X-window immediately after using and most of the time
|
||||
you should see command line console login prompt on the database server machine.
|
||||
</itemize>
|
||||
<!--
|
||||
*******************************************
|
||||
************ End of Section ***************
|
||||
*******************************************
|
||||
|
||||
-->
|
||||
<sect1> Tuning Database server process<label id="ostune">
|
||||
<p>
|
||||
General tuning tips:
|
||||
<itemize>
|
||||
<item> Indices can speed up queries. The <bf>explain</bf> command allows
|
||||
you to see how PostgreSQL is interpreting your query, and which indices
|
||||
are being used.
|
||||
<item> Use the <bf>cluster</bf> command to group data in base tables to match
|
||||
an index. See the <bf>man cluster(1)</bf> manual page for more details.
|
||||
<item> If you are doing a lot of inserts, consider doing them in a large
|
||||
batch using the <bf>copy</bf> command. This is much faster than individual inserts.
|
||||
<item> Statements not in a <bf>begin work/commit</bf> transaction block
|
||||
are considered to be in their own transaction. Consider performing several
|
||||
statements in a single transaction block. This reduces the
|
||||
transaction overhead. Also consider dropping and recreating indices when
|
||||
making large data changes.
|
||||
<item> It is suggested that you purchase the "Performance Tuning guide" and
|
||||
tuning support from <url name="PostgreSQL Corp." url="http://www.postgresql.org">.
|
||||
</itemize>
|
||||
|
||||
Specialized tuning tips:
|
||||
|
||||
<itemize>
|
||||
<item> Internal tuning of PostgreSQL is a complex topic. You need a sound
|
||||
knowledge of source code and internals of postgresql. It is strongly
|
||||
recommended that only professionals attempt specialized tuning tips given below:
|
||||
<item> You can disable <bf>fsync()</bf> by starting the
|
||||
postmaster with a <bf>-o -F</bf> option. This will prevent <bf>fsync()</bf>
|
||||
from flushing to disk after every transaction. But there is risk of losing
|
||||
data due to power/media failure.
|
||||
You can reduce the risk of losing data due to power failure by having
|
||||
the <url name="APC UPS" url="http://apc.com/products/ups.cfm">
|
||||
(Uninterrupted Power Supply) and media failures by disk RAID systems
|
||||
(<url name="Antares-Sparc-Raid" url="http://www.linuxdoc.org/HOWTO/Antares-RAID-sparcLinux-HOWTO/index.html">
|
||||
system,
|
||||
<url name="Software-Raid" url="http://www.linuxdoc.org/HOWTO/Software-RAID-HOWTO.html">
|
||||
system,
|
||||
<url name="Old-Software-Raid" url="http://www.linuxdoc.org/HOWTO/Software-RAID-0.4x-HOWTO.html">
|
||||
system,
|
||||
<url name="Root-Raid" url="http://www.linuxdoc.org/HOWTO/Root-RAID-HOWTO.html">
|
||||
system,
|
||||
<url name="Boot-Root-Raid" url="http://www.linuxdoc.org/HOWTO/Boot+Root+Raid+LILO.html">
|
||||
system)
|
||||
to gaurd against media failures.
|
||||
<item> Use the postmaster <bf>-B</bf> option to increase the number of
|
||||
shared memory buffers used by the back-end processes. If you make this
|
||||
parameter too high, the postmaster may not start up because you've exceeded your
|
||||
kernel's limit on shared memory space. Each buffer is 8K and the default is 64 buffers.
|
||||
<item> Use the back-end <bf>-S</bf> option to increase the maximum
|
||||
amount of memory used by each backend process for temporary sorts.
|
||||
The <bf>-S</bf> value is measured in kilobytes, and the default is 512 (i.e., 512K).
|
||||
It is unwise to make this value too large, or you may run out of memory when
|
||||
query invokes several concurrent sorts.
|
||||
</itemize>
|
||||
<!--
|
||||
*******************************************
|
||||
************ End of Section ***************
|
||||
|
@ -1488,10 +1650,11 @@ where
|
|||
-->
|
||||
<sect1> Replication Server
|
||||
<p>
|
||||
Replication server for large enterprises/businesses is sold commercially by
|
||||
Replication server for large enterprises/businesses is
|
||||
available at <url url="http://www.erserver.com"> and from <url url="http://www.pgsql.com">.
|
||||
The support is sold ($$$$s) commercially by
|
||||
PostgreSQL Inc. You use replication server to provide redundancy and
|
||||
high availability. Replication server is a complex, sophisticated product
|
||||
and hence costs $$$$s.
|
||||
high availability. Replication server is a complex, sophisticated product.
|
||||
<!--
|
||||
*******************************************
|
||||
************ End of Section ***************
|
||||
|
@ -4595,6 +4758,7 @@ postscript, HTML formats and unix man-pages. They are located
|
|||
in /usr/doc/postgresql* directory.
|
||||
If you have access to internet, you can find the documents listed below
|
||||
at <url url="http://www.postgresql.org/docs">
|
||||
and at <url url="http://www.postgresql.org/users-lounge/docs">.
|
||||
|
||||
<itemize>
|
||||
<item> "Installation Guide"
|
||||
|
@ -5965,6 +6129,13 @@ Geographic information:
|
|||
-->
|
||||
<sect>Technical support for PostgreSQL
|
||||
<p>
|
||||
This is the order of problem solving:
|
||||
<itemize>
|
||||
<item> Your question can be answered
|
||||
by <url name="online manuals" url="http://www.postgresql.org/users-lounge">
|
||||
<item> Enter a keyword in the <url name="search box" url="http://www.postgresql.org/search.cgi">
|
||||
<item> Post your question in the mailing list
|
||||
</itemize>
|
||||
If you have any technical question or encounter any problem you can e-mail
|
||||
to:
|
||||
<itemize>
|
||||
|
@ -6165,8 +6336,12 @@ A database system
|
|||
</itemize>
|
||||
And it just happens to be 'PostgreSQL' which satisfies all these
|
||||
conditions and is an appropriate software for this situation.
|
||||
You may say 'PostgreSQL' is a very strange name. But my argument is - why
|
||||
change the name. This world is stuck with "PostgreSQL" forever!!
|
||||
You may say 'PostgreSQL' is a very strange name (It is pronounced
|
||||
as Post-gres-cue-el and not Postgre-es-cue-el.
|
||||
It's a very unusual name and it is very hard to pronounce).
|
||||
But my argument is - why
|
||||
change the name. This world is stuck with "PostgreSQL" forever
|
||||
and people all over the world love this name!!
|
||||
<!--
|
||||
*******************************************
|
||||
************ End of Section ***************
|
||||
|
|
Loading…
Reference in New Issue