Upgrading PostgreSQL on RedHat 9
First, uninstall old version of PostgreSQL which was installed from RedHat 9 installation CDs:
rpm -e postgresql-server
rpm -e postgresql
After that, I downloaded the new version of PostgreSQL from http://www.postgresql.com. At the moment, the latest stable version is 8.1.5
I followed the installation step-by-step as described in INSTALL file, but no luck. So, I tried my own step:
1. su (this is supposed to be the third step, but I found error during make process)
2. ./configure
3. gmake
4. gmake install
After the installation was successful, a non-root user must be created, it was 'postgres' by default. So, you have to type '/usr/sbin/adduser postgres'.
By default, PostgreSQL was installed into /usr/local/pgsql/bin directory.
Create data directory manually by typing:
mkdir /usr/local/pgsql/data
and chown it:
chown postgres /usr/local/pgsql/data
Now, entering as user 'postgres': su - postgres
type '/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data'.
The command above is only done once. You don't have to repeat it everytime you start your PostgreSQL database.
Now, the database was successfully initialized and installed. Everytime you want to run the database server, just run the terminal, and type these commands:
1. su
2. su - postgres
3. /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
rpm -e postgresql-server
rpm -e postgresql
After that, I downloaded the new version of PostgreSQL from http://www.postgresql.com. At the moment, the latest stable version is 8.1.5
I followed the installation step-by-step as described in INSTALL file, but no luck. So, I tried my own step:
1. su (this is supposed to be the third step, but I found error during make process)
2. ./configure
3. gmake
4. gmake install
After the installation was successful, a non-root user must be created, it was 'postgres' by default. So, you have to type '/usr/sbin/adduser postgres'.
By default, PostgreSQL was installed into /usr/local/pgsql/bin directory.
Create data directory manually by typing:
mkdir /usr/local/pgsql/data
and chown it:
chown postgres /usr/local/pgsql/data
Now, entering as user 'postgres': su - postgres
type '/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data'.
The command above is only done once. You don't have to repeat it everytime you start your PostgreSQL database.
Now, the database was successfully initialized and installed. Everytime you want to run the database server, just run the terminal, and type these commands:
1. su
2. su - postgres
3. /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
0 Comments:
Post a Comment
<< Home