Need software:
First of all, of course, the source code of PostgreSQL, this can go
Www.postgresql.org top Down, now the latest should be 8.1.3, I am currently using the 8.1.1 version; additional compilation and development package must not be less, this is obtained according to each Linux different versions (APT-GET or RPM package) Of course, in most systems have been installed by default; and DDD is also necessary. This is a graphical GDB, and the newcomer is still better from the graphic.
step:
1. Obviously, our first step is to compile the PostgreSQL source code, unpack the compressed source code, don't need me to say it, unzipped folders are postgreSQL-8.1.1. Enter the file The first thing to execute is configure to generate the Makefile file, execute the command.
./configure --enable-debug --enable-assert --without-readline --without-zlib
Note that here, INABLE-Debug, which opens the GCC -g option, used to generate symbols required by debugger, - Enbale-Cassert is used to open Assert option, which is used for debugging. As --without-readline --without-zlib, can not be added, usually do not support readline and zlib, so if configure can't go, see prompts to decide whether to add these two items.
OK, the next step is to compile, this is very simple, just type the Make command, wait for the system to compile, usually 5-10 minutes, if the system is almost time may be long.
After this step is completed, it is equally installed, it is also very simple, make install can get it.
By default, it will be installed in the / usr / local / pgsql / directory, until this, the installed task is completed.
2. See if there is a Postgres group and Postgres users, if not, you need to use a super user to create a reorganization and user, because the database needs Postgres users, pay attention to the super user does not work. Then you need to create a folder for storing data files. It is recommended to put under / usr / local / pgsql, but it is not necessary, the user and group of the folder must be Postgres.
Next, execute the command:
Initdb -d data folder
Used to initialize database templates Template0 and other database files together.
3. You can run DDD below.
DDD / USR / LOCAL / PGSQL / BIN / Postgres &
Haha, is it coming out of the window, there is an source code.
Then Program-> Run, fill in Test in Run with Arguments in the pop-up window, and then carries back.
Look at the box below, appear
PostgreSQL Stand-Alone Backend 8.1.1
Backend>
So far, our task is completed, as for the Detailed debugging process of DDD to discuss or find the help documentation yourself.