码迷,mamicode.com
首页 > 数据库 > 详细

数据库PostgreSQL安装

时间:2015-01-12 16:06:22      阅读:169      评论:0      收藏:0      [点我收藏+]

标签:

首先,安装相关的依赖库:

1)GNU make

要求有GNU make,版本要大于等于3.76.1,检查gmake的方法下:
gmake --version

安装命令:

yum -y install make

2)zlib

PostgreSQL默认使用zlib压缩库

安装命令:

yum -y install zlib-devel

3)gcc

由于编译器要求是兼容ISO/ANSI C的编译器,遵从C89标准。

安装命令:

yum -y install gcc

4)GNU Readline

PostgreSQL默认是使用GNU Readline库支持在psql的命令行中可以使用光标键(↑↓)翻出历史命令。

安装命令:

yum -y install readline-devel

其次是数据库的安装过程:

1、安装postgresql
yum -y install postgresql
yum -y install postgresql-server
yum -y install python-psycopg2
3、数据库初始化
service postgresql initdb
4、数据库参数配置
在/var/lib/pgsql/data/pg_hba.conf中,将默认验证方法ident修改为trust(注:修改local/IPv4/IPv6三项)
5、启动数据库
service postgresql start
6、开机自启动
chkconfig --add postgresql

最后,建议执行

service postgresql restart

数据库PostgreSQL安装

标签:

原文地址:http://www.cnblogs.com/andyrobb/p/4218433.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!