简单的 openGauss 安装方法
安装
1. 安装 PostgreSQL
Debian/Ubuntu (docs):
sudo apt-get install postgresql
Arch Linux (ArchWiki):
sudo pacman -S postgresql
sudo -u postgres initdb -D /var/lib/postgres/data
2. 启用 PostgreSQL 服务
sudo systemctl enable --now postgresql
3. 安装 opengauss
给你的 shell 增加一个 alias. 如果用 Bash,添加这行代码到 ~/.bashrc
:
alias my-gsql="sudo -u postgres psql"
使用
使用文字界面客户端执行 SQL 查询:
my-gsql
也可以使用任何兼容 PostgreSQL 的图形界面客户端。