Chinaunix首页 | 论坛 | 博客
  • 博客访问: 776446
  • 博文数量: 94
  • 博客积分: 1238
  • 博客等级: 少尉
  • 技术积分: 1174
  • 用 户 组: 普通用户
  • 注册时间: 2011-08-13 19:22
个人简介

走自己的路让别人说去吧!

文章分类

全部博文(94)

文章存档

2015年(4)

2014年(3)

2013年(12)

2012年(32)

2011年(43)

分类: LINUX

2011-08-28 05:23:40

1.下载postgresql flexbison依赖包

ftp://213.130.28.62/Linux/Gentoo/distfiles/flex-2.5.4a.tar.gz

2.Bisonf的安装

#tar zxvf bison-2.5.tar.gz

#cd  bison-2.5
#./configure
#make
#make install

3.Flex的安装

#tar zxvf flex-2.5.4a.tar.gz

#cd  flex-2.5.4
#./configure

#make
     #make install

4.PostgreSQL的安装
  # useradd postgre (自动建立 postgre 组)
  # tar xvfz postgresql-8.1.4.tar.gz
  # cd postgresql-8.1.4
  # ./configure --prefix=/usr/local/pgsql
  # make
  # make install
  # chown -R postgre.postgre /usr/local/pgsql
5.配置部分:
  # vi ~postgre/.bash_profile
在文件最后添加:

PGLIB=/usr/local/pgsql/lib

PGDATA=$HOME/data

PATH=$PATH:/usr/local/pgsql/bin

MANPATH=$MANPATH:/usr/local/pgsql/man

export PGLIB PGDATA PATH MANPATH

6.以 postgres 用户登录
  # su - postgre
  建立数据库目录:
  $ mkdir data
  启动数据库引擎:
  $ /usr/local/pgsql/bin/initdb -D  /home/postgre/data

阅读(2794) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~