创建数据目录并授权

创建数据目录以存储PostgreSQL的数据文件。

  1. 创建数据目录。

    1
    mkdir /data
    

  2. 修改目录权限。

    1
    chown -R postgres:postgres /data/