16
PostgreSQL / PostgreSQL upgrade instructions
untar , then
Code: [Select]
./configure
make
Stop the old server
Code: [Select]
sudo /usr/local/pgsql/bin/pgsql.sh stop
Move the old server directory
Code: [Select]
mv /usr/local/pgsql /usr/local/pgsql-9.1.24
Now install the new server
Code: [Select]
make install
cd into the contrib/pg_upgrade directory.
Code: [Select]
make
make install
cd into the contrib/pg_upgrade_support directory.
Code: [Select]
make
make install
run the following, changing the directories to be the correct ones. old => new
Code: [Select]
su postgres
Create the new data directory
Code: [Select]
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
Code: [Select]
/usr/local/pgsql/bin/pg_upgrade -b /usr/local/pgsql-9.1.24/bin/ -B /usr/local/pgsql/bin/ -d /usr/local/pgsql-9.1.24/data -D /usr/local/pgsql/data
Copy the pgsql.sh file to the new bin location.
Code: [Select]
cp /usr/local/pgsql-9.1.24/bin/pgsql.sh /usr/local/pgsql/bin/
Code: [Select]
mkdir /usr/local/pgsql/log
Code: [Select]
chown postgres:postgres /usr/local/pgsql/log
edit the pg_hba.conf file and add the following to the end
Code: [Select]
# Allow any user from host 192.168.1.x to connect to
# any database if the user's password is correctly supplied.
# TYPE DATABASE USER ADDRESS METHOD
host all all 192.168.1.0/24 md5
start the server again.