Re: Compiling to RPM setup/filesystem layout
От | Doug McNaught |
---|---|
Тема | Re: Compiling to RPM setup/filesystem layout |
Дата | |
Msg-id | m3lmnd6ztv.fsf@belphigor.mcnaught.org обсуждение исходный текст |
Ответ на | Compiling to RPM setup/filesystem layout (Gerald Gutierrez <gml1@coldresist.com>) |
Список | pgsql-general |
Gerald Gutierrez <gml1@coldresist.com> writes: > Unfortunately, I can't just "compile" since I need to be able to replace my > current 7.0.3 installation, installed via RPMs. How do I go about this so I > don't mess everything up (leftover files and such, in addition to the > mandatory pg_dump) ? Also, how do I ensure that when future RPMs come out, I > can just use the RPMs and upgrade a compiled version? Here's my advice: 1) Compile 7.1.2, and do "make install". This will put the binaries, libs, manpages etc in /usr/local/pgsql, which doesn't conflict with the RPMs at all. 2) Do pg_dumpall on your 7.0.3 database (after making sure all users are disconnected). Shut down the database. 3) Rename your current PG data directory, rather than blowing it away (so you can easily go back to 7.0.3 if you have trouble). This assumes, of course, that disk space is plentiful. 4) Make a new PG data directory, set ownership and mode to postgres:postgres:700. 5) Log in as 'postgres' and set the following environment variables: export PATH=/usr/local/pgsql/bin:$PATH export PGDATA=<wherever your PGDATA lives> export LD_LIBRARY_PATH=/usr/local/pgsql/lib 6) You should then be able to do 'initdb $PGDATA' and initialize the database. 7) Run 'pg_ctl start' to fire up the new postmaster. 8) Do 'psql -f <dumpfile> template1' to load the old data. 9) You'll have to either modify /etc/rc.d/init.d/postgresql to start the new binary, or disable it and roll your own. Client applications need to have LD_LIBRARY_PATH (and possibly PATH as well) set so they look in the right place for stuff; otherwise they will pick up old libs as long as the RPMs are still installed. Once this is working, you can remove the RPMs if you want, or just leave them around until you're ready to do an RPM upgrade. Upgrading to 7.1.2 RPMs *should* be relatively straightforward, and not require an initdb, unless you've done something weird when configuring the source. -Doug -- The rain man gave me two cures; he said jump right in, The first was Texas medicine--the second was just railroad gin, And like a fool I mixed them, and it strangled up my mind, Now people just get uglier, and I got no sense of time... --Dylan
В списке pgsql-general по дате отправления: