*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I tried to install and run postgreSQL 7.0.3 on two machines:
On my home machine, which is a Linux one, I succeeded.
I did not suceed, however, on a FreeBSD server, which would be the more important.
Compilation and intallation went smooth and without error messages, but when I try to connect psql to the 5432 tcp port, it cannot find the
postmaster there. ps -ax shows that postmaster is actually not running in spite that I started it as on Linux.
I am a green newbie to network configuration of servers. Could you, please advise me what to check in order that I could make postmaster running?
I do not know the details but I know that the internet side of that server is protected by a firewall. I only want to setup postgreSQL for the internal intranet network. Can the internet firewall prevent that?
I already tried -i and also -i -p 5432.
None of them worked.
One more question: If want to use ODBC only on the client machines for connecting to the server, do I have to ./configure postgreSQL with the --with-odbc option on the server?
Are you installing postgres manually or from the ports system? If you are doing in manually I would strongly suggest you remove what you have installed, then go install it from the ports system.
# cd /usr/ports/databases/postgresql7
# make install
The posts system will take care of the changes to postgresql that need to be made to both configure and to the source code (pg_passwd.c in particular) to make sure that postgresql will run properly on FreeBSD.
After you've run initdb as the pgsql user, copy /usr/local/share/postgresql.conf.sample to postgresql.conf, and change "#tcpip_socket = false" to true and uncomment it. Then run #/usr/local/etc/rc.d/010.pgsql.sh restart . You'll be able to connect to port 5432.
As for ODBC, first run /usr/local/share/postgresql/odbc.sql to prepare postgres for odbc access. If your clients are all win32 based, thats all you have to do. If your clients are unix based, you'll need to install the /usr/ports/databases/postgresql-odbc port as well.
I installed it manually.
It was because our system administrator did not install the ports system of FreeBSD (and I myself do not have a FreeBSD installation CD while our internet connection is too slow to use ftp for that).
Yet, the first time I downloaded a FreeBSD port of PostgreSQL from www.freebsd.org, and tried to install that manually but I was confused:
I found PostgreSQL 7.2.1 in the ports database at www.FreeBSD.org,, but there were two alternatives ways of downloading the port:
A) clicking on the download link, I got into an ftp directory of PostgreSQL, where there was no configure file or anything else that could be an install script, so I did not know how to use the package for instalIation
B) clicking on the source link, I could download the sources, but
-there were two tarball packages: a base and an opt package;
- I thought I also needed the opt package; but noticed that it did not contain a configure file,
- so I decided to extract both packages into the same directory and compile them in one turn (./configure, gmake, gmake install),
- compilation always stopped with errors
After some days of trying to use the ports in vain, I decided to download the sources of an older version of PostgreSQL and compile it manually.
Here I did not got error messages during compilation and installation, but it is not operable.
As for using a port, you don't have to run configure or anything. All you do is cd into the directory of the port you want to install and type # make install and it will do everything for you. Namely, it will:
a) fetch the sources for the port you want
b) extract the sources
c) patch the sources
d) configure
e) make
f) install the files in the appropriate places
And if there's anything that the port you are installing needs to build or run, it pauses and goes and does a "make install" on the required port, then comes back and continues.
And you can also use tools like cvsup to download changes to the ports tree as they occur (like when ports are upgraded) without being bandwidth intensive, and portupgrade to automatically upgrade ports to their latest versions without breaking dependencies.
As I said, its only 16 megs, and it will make your like much easier.
If you manually install PostgreSQL, you need to initialize the database. The full installation instructions are in a text file that comes with the source code.
If you're a newbie at this, I'd suggest installing a FreeBSD prebuilt package at FreeBSD's ftp site using pkg_add. pkg_add will take care of any dependencies, just as the port system does. For PostgreSQL 7.2.1, execute:
I uninstalled postgresql version 7.0.3, downloaded the FreeBSD ports tree and started the downloading and installation of postgresql via the ports tree (using 'make install').
Downloading of postgresql 7.2.1 seemed to be OK, but the compilation stopped again. Here are the last error messages:
access/SUBSYS.o: In function 'heap-update':
access/SUBSYS.ol.text+0xa792: undefined reference to 'GetCurrentCommandId'
gmake[3]: ***[postgres] Error 1
gmake[3]: Leaving directory '/usr/ports/databases/postgresql7/work/postgresql-7.2.1/src/backend'
gmake[2]: Leaving directory '/usr/ports/databases/postgresql7/work/postgresql-7.2.1/src
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory '/usr/ports/databases/postgresql7/work/work/postgresql-7.2.1
gmake: *** [all] Error 2
*** Error code 2
stop in /usr/ports/databases/postgresql7
*** Error code 1
stop in /usr/ports/databases/postgresql7
And compilation died.
It seems that I cannot compile postgresql 7.2.1 on this FreeBSD system. Should not I try 7.0.3 again?
I've never had a ports compilation of PostgreSQL fail.
I note that your first attempt was to install PostgreSQL 7.0.3. This begs the question as to which version of FreeBSD you are running. If your version of FreeBSD is old enough, you may have to update the os to be compatible with the newer ports.
It is a FreeBSD 4.4-stable system - a bit old, but since I am not the system administrator, I cannot easily manage a system update.
I would rather use an old version of postgresql (7.0.3 for example). Is it possible to find ancient ports for ancient FreeBSD systems?
Yes, there should be a CRC check before the sources are extracted. An MD5 checksum is taken of the sources and compared to the MD5 checksum recorded in the file distinfo. If the checksums don't match, make install will stop and warn you.
The "typo" of GetCqrrentCommandId in heap.c is very very strange.
I've also never had a compilation of Postgresql on FreeBSD fail...
What signal does the core dump give you? If it is a signal 11, that is usually indicative of a hardware problem (memory, most likely).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.