Move into the new PosgreSQL directory we have untarred earlier, and then move to its subdirectory named src. Type the following commands on your terminal:
[root@deep] /# cd /var/tmp/postgresql-6.5.3
[root@deep ]/postgresql-6.5.3# cd src
CC="egcs" \
./configure \
--prefix=/usr \
--enable-locale
This tells PostgreSQL to set itself up for this particular hardware setup with:
- Enable locale support.
Edit the Makefile.global file, vi +210 Makefile.global and change the line:
The make command compiles all source files into executable binaries.
The make install command installs the binaries and any supporting files into the appropriate locations.
The mkdir will create a new directory named pgsql under the /usr/include and /usr/lib directories,
and then we move all subdirectories and files related to PostgreSQL under /usr/include and /usr/lib directories to the /usr/include/pgsql
and /usr/lib/pgsql directories respectively with the command mv.
The chown command will set the correct owner and group permission for the /var/lib/pgsql directory.
The strip command will discard all symbols from the object files. This means that our binary file will be smaller in size. This will improve the performance hit to the program since there will be fewer lines
to read by the system when it executes the binary.
The rm command will remove the global1.description and local1_template1.description files that are not needed by our PosgreSQL program.