【IT168 技术】系统环境:centos5.4 64bit
postgreSQL版本:8.4
psycopg2版本:2.4.1
skytools版本:2.1.12
1.安装postgresql
安装包==>postgreSQL-8.4.5-1-linux-x64.bin
在主从服务器上各自安装postgreSQL
修改*/PostgreSQL/8.4/data/pg_hba.conf文件,将主从服务器ip都设为trust
重新启动postgreSQL
2.更新python-devel
升级包==>python-2.4.3-44.el5.x86_64.rpm、python-libs-2.4.3-44.el5.x86_64.rpm、python-devel-2.4.3-44.el5.i386.rpm、python-devel-2.4.3-44.el5.x86_64.rpm
#rpm -U python-2.4.3-44.el5.x86_64.rpm -i python-libs-2.4.3-44.el5.x86_64.rpm -i python-devel-2.4.3-44.el5.i386.rpm -i python-devel-2.4.3-44.el5.x86_64.rpm
3.更新postgresql-devel至8.4
升级包==>postgresql-libs-8.4.8-1PGDG.rhel5.x86_64.rpm、postgresql-8.4.8-1PGDG.rhel5.x86_64.rpm、postgresql-devel-8.4.8-1PGDG.rhel5.x86_64.rpm
#rpm -i postgresql-libs-8.4.8-1PGDG.rhel5.x86_64.rpm -i postgresql-8.4.8-1PGDG.rhel5.x86_64.rpm -i postgresql-devel-8.4.8-1PGDG.rhel5.x86_64.rpm
4.安装psycopg2
安装包==>psycopg2-2.4.1.tar.gz
#tar -zxvf psycopg2-2.4.1.tar.gz
#cd psycopg2-2.4.1
#vi setup.cfg ==>找到# pg_config= 改为 pg_config=数据库路径/PostgreSQL/8.4/bin/pg_config
#python setup.py build_ext
#python setup.py install
5.安装skytools
安装包==>skytools-2.1.12.tar.gz
#vi ~/.bash_profile
在PATH=$PATH:$HOME/bin行下添加
PATH=$PATH:数据库路径/PostgreSQL/8.4/bin
保存后运行source ~/.bash_profile
#tar -zxvf skytools-2.1.12.tar.gz
#cd skytools-2.1.12
#./configure --with-pgconfig=数据库路径/PostgreSQL/8.4/bin/pg_config
#make
#make install
#python setup.py install