postgresql-10 - 如何为我的 PostgreSQL10 安装 pgAudit?
问题描述
我想在我的 CentOS 6 32 位上安装 pgAudit,我已经从 DBEnterprise 下载的 PostgreSQL Linux 运行安装程序安装了 PostgreSQL 10 + pgAdmin4
我按照这里的指南进行操作,以下是我遵循的步骤:
git clone https://github.com/postgres/postgres.git
cd postgres
然后进入文件夹git checkout REL_10_STABLE
./configure
在那之后make install -s
cd contrib
- 克隆 pgAudit 扩展
git clone https://github.com/pgaudit/pgaudit.git
cd pgaudit
git checkout REL_10_STABLE
make -s check
make install
我被困在第 8 步。结果如下:
[root@localhost pgaudit]# make -s check
============== creating temporary instance ==============
============== initializing database system ==============
pg_regress: initdb failed
Examine /root/postgres/contrib/pgaudit/log/initdb.log for the reason.
Command was: "initdb" -D "/root/postgres/contrib/pgaudit/./tmp_check/data" --no-clean --no-sync > "/root/postgres/contrib/pgaudit/log/initdb.log" 2>&1
make: *** [check] Error 2
/root/postgres/contrib/pgaudit/log/initdb.log
我按照它告诉我的方式打开了 initdb.log ,它说:
Running in no-clean mode. Mistakes will not be cleaned up.
initdb: cannot be run as root
Please log in (using, e.g., "su") as the (unprivileged) user that will
own the server process.
所以我在以 postgres 登录后再次尝试,结果如下:
bash-4.1$ make -s check
make[3]: stat: ../../src/include/utils/errcodes.h: Permission denied
/bin/sh: line 0: cd: utils/: Not a directory
make[3]: *** [../../src/include/utils/errcodes.h] Error 1
make[2]: *** [submake-errcodes] Error 2
make[1]: *** [submake-libpgport] Error 2
make: *** [submake] Error 2
我对 Linux 和 PostgreSQL 都很陌生,所以我不知道它为什么会失败以及解决方案是什么。提前致谢!
解决方案
推荐阅读
- list - 回车加入名单
- javascript - 更新面板中 JQUERY 数据表中的排序列
- postgresql - 使用官方 postgres 镜像运行 docker 容器,无法访问容器
- sql - 如何使用 tSQL 根据条件定义 EventStop 时间戳?
- spring-boot - 我实现了具有管理员和客户的 api 列表的客户服务
- git - Github 部署密钥允许我克隆多个私有存储库
- java - 如何在同一个 Android 应用程序中使用 Navigation Drawer 和 Bottom Navigation
- snakemake - snakemake中的“只能将输入文件指定为函数”
- sql-server - Schema Compare 和 SqlPackage 150 区分大小写问题
- python - 如何修复 Debian-RaspberryPi3 上损坏的 apt-listchanges?