Mac 下安装PostgreSQL经验

使用homebrew终端软件管理器去安装PostgreSQL

如果没有安装brew命令执行以下命令

复制代码
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

沙果开源物联网系统 SagooIoT | SagooIoT

1.使用命令安装postgreSQL

复制代码
brew install postgresql

安装完成后显示:

校验一下postgreSQL 版本号

复制代码
brew list

起动postgreSQL

复制代码
brew services start postgresql


brew services list

将得到postgresql status -> srarted

此时 postgreSQL就安装完毕,使用客户端工具免密登录

初始化:

initdb /usr/local/postgresql -E utf8

创建postgres 用户角色

复制代码
CREATE ROLE postgres WITH LOGIN SUPERUSER;

完成后登录postgresql

复制代码
psql -U postgres

#退出
quit

创建用户 并设置密码

复制代码
psql -U postgres ;

ALTER USER postgres WITH PASSWORD 'postgres';

PostgreSQL 目前在学习的IOT物联网平台 沙果开源物联网系统 SagooIoT | SagooIoT 项目中使用到

沙果开源物联网系统 SagooIoT | SagooIoT

相关推荐
道可到7 小时前
别再瞎拼技术栈!Postgres 已经能干 Redis 的活了
redis·后端·postgresql
Java 码农1 天前
CentOS 7 上安装 PostgreSQL
linux·postgresql·centos
RestCloud1 天前
在制造业数字化转型浪潮中,数据已成为核心生产要素。然而,系统割裂、数据滞后、开发运维成本高等问题,却像顽固的 “数据枷锁”,阻碍着企业发展。ETLCloud与
数据库·postgresql
problc1 天前
PostgreSQL + Redis + Elasticsearch 实时同步方案实践:从触发器到高性能搜索
redis·elasticsearch·postgresql
EnCi Zheng2 天前
SpringBoot + PostgreSQL 密码认证失败 Windows 系统解决方案
windows·spring boot·postgresql
IT 小阿姨(数据库)3 天前
PostgreSQL通过pg_basebackup物理备份搭建流复制备库(Streaming Replication Standby)
运维·服务器·数据库·sql·postgresql·centos
EnCi Zheng3 天前
JPA 连接 PostgreSQL 数据库完全指南
java·数据库·spring boot·后端·postgresql
做运维的阿瑞3 天前
PostgreSQL 从入门到精通:Windows 环境下安装与使用指南
数据库·windows·postgresql
matlab的学徒4 天前
PostgreSQL 安装与操作指南
数据库·postgresql
启明真纳4 天前
PostgreSQL 单库备份
数据库·postgresql