云数据库 RDS-如何安装PostgreSQL客户端:操作步骤

时间:2023-12-25 11:53:28

操作步骤

  1. 登录弹性云服务器

    1. 创建弹性云服务器时,要选择操作系统,例如CentOS 7,并为其绑定EIP(Elastic IP,弹性公网IP)。
    2. 使用远程连接工具通过绑定的EIP连接到弹性云服务器

  2. 打开客户端安装页面。
  3. 选择数据库版本、操作系统、操作系统架构,在弹性云服务器上执行以下命令安装PostgreSQL客户端。

    sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
    图1 安装客户端
    • 数据库版本,选择与RDS for PostgreSQL数据库实例一致的版本。
    • 操作系统,选择与弹性云服务器一致的操作系统。
    • 操作系统架构,选择与弹性云服务器一致的操作系统架构。
    图2 安装rpm包
    图3 客户端安装完成

  4. 连接PostgreSQL实例。

    图4 连接成功

support.huaweicloud.com/rds_faq/rds_faq_0029.html