linux 安装postgresql教程

下载软件

pgsql官网地址:https://www.postgresql.org/,进入后点击download就来到下载页,这里点击Linux下面的Other Linux选项,然后点击下方的tar.gz archive下载二进制归档,

linux 安装postgresql教程

linux 安装postgresql教程

创建文件夹

mkdir /monchickey/pgsql_data

用户授权目录访问权限

chown postgres /monchickey/pgsql_data/

文件传至文件夹下进行解压

*tar -xvzf postgresql-10.1-1-linux-x64-binaries.tar.gz

设置密码

useradd postgres
passwd postgres

配置.bash_profile

linux 安装postgresql教程

进行初始化
/monchickey/pgsql/bin/initdb -D /monchickey/pgsql_data/

linux 安装postgresql教程

启动

/monchickey/pgsql/pgsql/bin/pg_ctl -D /monchickey/pgsql_data/ -l logfile start
ps -ef | grep postgres
linux 安装postgresql教程
查看 lsof -i:5432
linux 安装postgresql教程

linux 安装postgresql教程

相关文章:

  • 2021-12-22
  • 2021-10-03
  • 2021-05-01
  • 2021-05-22
  • 2022-02-11
  • 2022-01-30
猜你喜欢
  • 2021-09-06
  • 2021-08-05
  • 2022-01-10
  • 2021-06-14
  • 2021-06-03
  • 2022-02-12
  • 2021-05-21
相关资源
相似解决方案