首页 > 其他 > 详细

postgres安装

时间:2021-08-15 11:54:29      阅读:46      评论:0      收藏:0      [点我收藏+]

软件下载地址

http://www.postgres.cn/v2/download

软件安装参考文档

http://www.postgres.cn/docs

安装过程

将安装包解压到opt/postgresql-12.2目录中

# cd postgresql-12.2

 检查安装环境信息

# ./configure

 需要额外安装的包

# yum -y install gcc
# yum -y install gcc-c++
# yum -y install python
# yum -y install python-devel
# yum -y install readline-devel
# yum -y install bison
# yum -y install flex

 开始编译

make
make all
make world
检查编译内容
make check
make install
安装文档,可以不选
make install-docs
make install-world

设置环境变量

# vi /etc/profile
i

PATH=/usr/local/pgsql/bin:$PATH export PATH LD_LIBRARY_PATH=/usr/local/pgsql/lib export LD_LIBRARY_PATH MANPATH=/usr/local/pgsql/share/man:$MANPATH export MANPATH

:wq
# source /etc/profile

#echo $LD_LIBRARY_PATH
#echo $MANPATH
#echo $PATH

 创建文件目录

# cd /usr/local/pgsql
# mkdir data
# adduser postgres
# passwd postgres # chown postgres
/usr/local/pgsql/data # su - postgres # initdb -D /usr/local/pgsql/data # pg_ctl -D /usr/local/pgsql/data -l logfile start # createdb test # psql test

 

postgres安装

原文:https://www.cnblogs.com/MiMiJiaDeDaiXiaoGua/p/15141591.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!