How do I install PostgreSQL 9.1.4 on RHEL 5?

0

I specifically need version 9.1.4 --- unfortunately there are no ifs, ands, or buts. It's not my decision.

I have downloaded the .run file available from PostgreSQL's SourceForge listing, but I can't seem to be able to install it. Unlike other run files out there that I've seen, this one is a binary. Every attempt at Googling returns countless kiddie forum posts instructing OP to execute the file with bash. When I merely attempt to double-click, it responds with the error

Couldn't display "/root/postgresql-9.1.4-1-linux-x64.run".

So, I am very curious as to what this particular .run file is, but my primary goal is to install PostgreSQL 9.1.4 on RHEL 5. If an RPM is available, I would love you forever; over two hours' Googling has produced nothing.


After ensuring the file was executable, I receive this error (after a lovely PostgreSQL splash screen):

Error running /tmpprerun_checks.sh : /bin/sh: /tmp/prerun_checks.sh: /bin/sh: bad interpreter: Permission denied [OK]

Sean Allred

Posted 2013-06-14T16:57:01.093

Reputation: 910

Answers

2

Have you tried running it from the command line? Open your favorite terminal program, authenticate as root (if you haven't already), then enter the following (the # shouldn't be typed, it's just a placeholder for the prompt):

# cd /root
# chmod +x postgresql-9.1.4-1-linux-x64.run
# postgresql-9.1.4-1-linux-x64.run

EDIT

You can google the error for yourself, but there are a couple of options. One is that /tmp may be mounted as noexec. Type man mount and check the options to remount it without that option. You can also try to chown root postgresql-9.1.4-1-linux-x64.run and see if that works.

Another potential issue may be with the file's encoding. If you downloaded it in windows, then copied it to Linux, or if you downloaded it from a mis-configured Windows server, it may have CR/LF line endings instead of the Unix standard LF-only newline. There's a utility called dos2unix that may help, if the file is plain text, but make sure you make a backup before trying it, as it may contain binary data as well.


In summary:

# mount -o remount exec /tmp
# chmod +x postgresql-9.1.4-1-linux-x64.run
# ./postgresql-9.1.4-1-linux-x64.run
# mount -o remount noexec /tmp

MattDMo

Posted 2013-06-14T16:57:01.093

Reputation: 4 968

Done, see edit. – Sean Allred – 2013-06-14T17:26:54.920

please see above – MattDMo – 2013-06-14T17:41:32.877

1I just downloaded the file, and it looks like it's binary-only, so don't run dos2unix on it! – MattDMo – 2013-06-14T17:44:56.787

You jogged my memory. I had installed this before, and it was indeed that /tmp/ was mounted as noexec. I only needed to remount it as exec, run setup, and then remount as noexec. Would you mind terribly if I edited this into your answer when I solidify the process? – Sean Allred – 2013-06-14T17:45:49.147

sure, go for it... – MattDMo – 2013-06-14T17:47:37.970