The Moment of Truth: Compiling
Now it's time to compile the program. This is the step that a lot of people fear, but there is really nothing to it. First of all, you want to be in the src directory.
Then start the process with the gmake all command.
euphoria:/usr/src/pgsql/postgresql-7.0/src$ gmake all
When you do this, a lot of code will whip past your screen. This is gmake building the various dependencies that build up the PostgreSQL system. On my Pentium 166 with 64 megs of RAM the process took about 7 minutes. That is not a lot of time to wait for the productivity you will get out of this software! After that is done, you should get a message like this:
All of PostgreSQL is successfully made. Ready to install.
If that didn't happen, do a gmake clean and try again. Possible reasons for errors may be that you didn't have all the dependencies such as gmake or flex. If this is the case, please make sure they are installed properly.
Now for the good part: installing. Installing the software is quite easy. Simply use the gmake command again with the install argument.
euphoria:/usr/src/pgsql/postgresql-7.0/src$ gmake install
This goes through the source tree and copies all of the necessary files to the correct places on your machine. PostgreSQL is now installed, but your machine may not know about the necessary libraries.
Most systems follow this example. For those that do not, please check your operating system documentation. The next steps involve editing system configuration files and therefore should be performed by the root user.
Using your favorite editor (VI, right?), alter the /etc/ld.so.conf file and add the following line:
Now save the file. In order to make the system read and obey this file, you must run the ldconfig file. You should not need to reboot; however, you need to be careful if you simply run ldconfig on some UNICES because it will have adverse effects.
For FreeBSD (and possibly other UNICES):
euphoria:/usr/src/pgsql/postgresql-7.0/src$ ldconfig -m /etc/ld.so.conf
Logout from root user now. (You should be the PostgreSQL user again.)