在Ubuntu 8.04上安装postgresql 8.3核心

我的系统是虚拟机上的ubuntu8

1。先去 http://www.postgresql.org 那里下个postgreSQL
core 8.3.
2.使用命令tar -xvf postgreSQL-8.3.3.tar.bz2   解压

3.去那个解压的文件夹,使用./configure 命令,它将自动检查系统配置

4.很不幸得是报了一个"c cannot output the executable file"

5.然后在网上找了找资料,发现没有升级libc所以使用命令:sudo apt-get install libc6-dev gcc g++

6再运行"./configure",却报了readline library is not found,如果这个错误你能解决最好,还有可能报zlib is
not found

7.不幸的是我找了2个多小时,下载了无数相关的包,最后以readline5-dev包不能正常安装告终。

8.所以没有办法,只好这样运行./configure --without-readline --without-zlib

9然后make

10下面命令是要加sudo的
make install
adduser postgres
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
到了这里,我们要创建logfile 文件然后把它拷贝到 /usr/local/pgsql/data/ (好像不拷贝也可以,大家可以试试)
然后切换用户sudo - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test

最后,你能看到sql 交互界面…大功告成…

下面是自己写的英文安装手册, 英语语法错误多多指正(非大小写)。

how to install pgSQL in ubuntu

I installed Ubuntu 8.04 in VMMachine.
1. goto the http://www.postgresql.org to
download postgreSQL core 8.3.
2. tar -xvf postgreSQL-8.3.3.tar.bz2   (I don’t know your downloaded file
name. You can change it)
3. go the unpacked folder then “./configure”
4. it will check the environment of your computer.
5. Unluck, it showed error to me. IF it report like “c cannot output the
executable file”, then "sudo apt-get install

libc6-dev gcc g++
6. The run “./configure” again. It report “readline library is not found.”.
7. ./configure --without-readline --without-zlib
8. make

sudo
make install
adduser postgres
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
create a file called logfile and copy it to /usr/local/pgsql/data/
sudo - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test