![](/img/trans.png)
[英]Initialize PostgreSQL Container with docker-entrypoint-initdb.d script
[英]How to initialize initdb in fedora postgresql
我使用rpm软件包在fedora 20上安装了postgresql。 我手动下载了postgres所需的软件包,这些软件包如下:
libxslt-1.1.28-5.fc20.x86_64.rpm postgresql-9.3.1-2.fc20.x86_64.rpm postgresql93-9.3.4-1PGDG.f20.x86_64.rpm postgresql93-contrib-9.3.4-1PGDG.f20 .x86_64.rpm postgresql93-libs-9.3.4-1PGDG.f20.x86_64.rpm postgresql93-server-9.3.4-1PGDG.f20.x86_64.rpm postgresql-libs-9.3.1-2.fc20.x86_64.rpm uuid -1.6.2-26.el7.x86_64.rpm
我安装了像这样的软件包。
[root@fedorarpmpostgres ~]# rpm -ivh libxslt-1.1.28-5.fc20.x86_64.rpm
产量
Preparing... ################################# [100%]
package libxslt-1.1.28-5.fc20.x86_64 is already installed
so its already installed ok now i'm successfull in stalling all this packages. now how can i
install initdb
i tried like this way but i got this error.
[root@fedorarpmpostgres ~]# /usr/pgsql-9.3/bin/initdb --encoding=UTF8 --
输出:
pgdata=/var/lib/pgsql/9.3/data/
initdb: cannot be run as root
Please log in (using, e.g., "su") as the (unprivileged) user that will
own the server process.
我要通知您的一件事是,我通过yum成功安装了postgres,但是我只需要像上面的方法那样通过rpm安装postgres
任何机构都可以帮助我如何初始化initdb。
谢谢。
使用root用户,如果您尚未设置postgres用户密码(默认情况下未设置),请执行su postgres,您应该可以执行initdb。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.