https://blog.csdn.net/mumudaiaomuwu/article/details/107110791
https://blog.csdn.net/L_jessica7227/article/details/126019286
https://www.cnblogs.com/miracle-luna/p/17019256.html
这三个安装教程都失败了,搞不懂为何.
第一个教程
postgres@vm-ubuntu-test:/usr/lib/postgresql/10/bin/pg_ctl -D /home/postgresql/data -l logfile start
postgres@vm-ubuntu-test:/root$ /usr/lib/postgresql/10/bin/pg_ctl -D /home/postgresql/data -l logfile start
could not change directory to "/root": Permission denied
pg_ctl: another server might be running; trying to start server anyway
waiting for server to start..../bin/sh: 1: cannot create logfile: Permission denied
stopped waiting
pg_ctl: could not start server
Examine the log output.
第二个教程
第三个教程
postgres@vm-ubuntu-test:/root$ /usr/pgsql-14/bin/initdb -D /home/data/pg14/data
bash: /usr/pgsql-14/bin/initdb: No such file or directory
postgres@vm-ubuntu-test:/root$
搞不懂为何了,我的需求是,安装好pg,
然后更改默认的数据库路径,比如以后我新加装一块硬盘单独做备份等等。
还有数据库的自动备份教程也提供一下,可以备份到指定的路径。
两个需求,谢谢。
环境:ubuntu20.04