|
| 1 | +======================================================= |
| 2 | +Frequently Asked Questions (FAQ) for PostgreSQL V6.5 |
| 3 | +Sun Solaris Specific |
| 4 | +TO BE READ IN CONJUNCTION WITH THE NORMAL FAQ |
| 5 | +======================================================= |
| 6 | +last updated: Thu Sep 2 11:40:00 CET 1999 |
| 7 | + |
| 8 | +current maintainer: Marc Liyanage (liyanage@access.ch) |
| 9 | +original author: Marc Liyanage (liyanage@access.ch) |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | +Contents: |
| 14 | + |
| 15 | +1.1) What tools do I need to build and install PostgreSQL on Solaris? |
| 16 | +1.2) What else do I have to do before building PostgreSQL? |
| 17 | +1.3) Why am I getting "IpcMemoryCreate" errors when I try |
| 18 | + to run postmaster? |
| 19 | +1.4) Why am I getting "Can't tell what username to use" errors |
| 20 | + when I try to run initdb? |
| 21 | + |
| 22 | +Notes: |
| 23 | + |
| 24 | +- The commands given here are for the bash shell. If you use |
| 25 | + a different shell, you'll have to change the commands accordingly, |
| 26 | + especially these regarding environment variables. |
| 27 | + |
| 28 | +- These instructions are written for Solaris 2.6 |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | +---------------------------------------------------------------------- |
| 33 | +Section 1: Building and Installing PostgreSQL |
| 34 | +---------------------------------------------------------------------- |
| 35 | + |
| 36 | +1.1) What tools do I need to build and install PostgreSQL on Solaris? |
| 37 | + |
| 38 | +You will need |
| 39 | + |
| 40 | +- GNU flex 2.5.4 or better (the lex included in Solaris 2.6 won't work) |
| 41 | +- GNU bison (the yacc included in Solaris 2.6 won't work) |
| 42 | +- GNU zip (gzip and especially zcat for installing the docs) |
| 43 | +- GNU make |
| 44 | +- GNU readline library |
| 45 | + |
| 46 | +We also used |
| 47 | + |
| 48 | +- GNU cc (gcc 2.8.1) |
| 49 | + |
| 50 | +If you like Solaris packages, you can find these tools here: |
| 51 | +http://www.sunfreeware.com |
| 52 | + |
| 53 | +If you prefer sources, look here: |
| 54 | +http://www.gnu.org/order/ftp.html |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | +1.2) What else do I have to do before building PostgreSQL? |
| 60 | + |
| 61 | +Shared libraries |
| 62 | +---------------- |
| 63 | + |
| 64 | +The default installation procedure puts the shared libraries |
| 65 | +into "/usr/local/pgsql/lib", but the dynamic loader won't |
| 66 | +find them there at runtime unless you use some hack like |
| 67 | +symlinking the libraries in /usr/lib or setting LD_LIBRARY_PATH |
| 68 | +for every user that will use the DB system. |
| 69 | + |
| 70 | +The first time you'll encounter this problem is usually when |
| 71 | +running "initdb". It will fail with something like |
| 72 | + |
| 73 | + ld.so.1: pg_id: fatal: libpq.so: open failed: No such file or directory |
| 74 | + |
| 75 | +We recommend that you store the path of the directory containing |
| 76 | +the libraries in the environment variable LD_RUN_PATH *before* |
| 77 | +starting the build. This will cause the linker to store this |
| 78 | +path in the binaries. |
| 79 | + |
| 80 | +Do this: |
| 81 | + |
| 82 | +# export LD_RUN_PATH=/usr/local/pgsql/lib |
| 83 | + |
| 84 | +(or wherever you choose to put the libraries) |
| 85 | + |
| 86 | +There is some good information about this here: |
| 87 | +http://www.visi.com/~barr/ldpath.html |
| 88 | + |
| 89 | + |
| 90 | +zcat |
| 91 | +---- |
| 92 | + |
| 93 | +If |
| 94 | + |
| 95 | +- both the original solaris zcat as well as the recommended |
| 96 | + GNU zcat are installed on the system (e.g. the former in /usr/bin and |
| 97 | + the latter in /usr/local/bin) and |
| 98 | +- configure (or "which zcat") finds the wrong one |
| 99 | + |
| 100 | +then configure needs to be told where GNU zcat can be found. |
| 101 | + |
| 102 | +Failure to do so will cause configure to select the wrong one |
| 103 | +and the "gmake install" command in the "doc" subdirectory |
| 104 | +(step 12 in the INSTALL file) will fail because Solaris |
| 105 | +zcat cannot handle the .gz compressed documentation files. |
| 106 | + |
| 107 | +To fix this, type |
| 108 | + |
| 109 | +# export GZCAT=/usr/local/bin/zcat |
| 110 | + |
| 111 | +(or wherever your GNU zcat lives) |
| 112 | + |
| 113 | +before running configure. |
| 114 | + |
| 115 | + |
| 116 | + |
| 117 | + |
| 118 | +1.3) Why am I getting "IpcMemoryCreate" errors when I try |
| 119 | + to run the postmaster? |
| 120 | + |
| 121 | +(See also 3.4 in the main FAQ file) |
| 122 | + |
| 123 | +Under Solaris 2.6 and probably others, the default shared memory |
| 124 | +maximum segment size kernel parameter is set too low. The solution |
| 125 | +is to put something like the following line into /etc/system and |
| 126 | +reboot the system. |
| 127 | + |
| 128 | +set shmsys:shminfo_shmmax=0xffffffff |
| 129 | + |
| 130 | +Excellent info regarding shared memory under Solaris can be found here: |
| 131 | +http://www.sunworld.com/swol-09-1997/swol-09-insidesolaris.html |
| 132 | + |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | +1.4) Why am I getting "Can't tell what username to use" errors |
| 137 | + when I try to run initdb? |
| 138 | + |
| 139 | +Put something like this into the .bash_profile startup script |
| 140 | +of the postgres user (see also step 17 in the INSTALL file): |
| 141 | + |
| 142 | +export USER=postgres |