
PostgreSQL 安装及配置
PostgreSQL 的安装可以有以下几种方式:
a) .run 文件安装
b) yum 安装
c) 源码安装
一、.run 文件安装
1、安装文件下载,格式如下:postgresql-9.4.1-3-linux-x64.run
将该文件拷贝到 linux 系统下目录,如/home/zhangwy 下
2、添加用户组 postgresql,用以下命令:#groupadd postgresql
3、添加用户组 postgresql 下的用户 postgres,用以下命令:
#adduser postgres –g postgresql
4、修改 postgres 用户的密码:#passwd postgres
5、切换到.run 文件目录下,查看文件权限:#cd /home/zhangwy
#ls –l
执行.run 文件:#./post*.run(貌似只能在 root 用户下安装)
开始安装 postgresql:
评论