Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在fedora postgresql中初始化initdb_Postgresql_Fedora - Fatal编程技术网

如何在fedora postgresql中初始化initdb

如何在fedora postgresql中初始化initdb,postgresql,fedora,Postgresql,Fedora,我是使用rpm软件包在Fedora20上安装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.

我是使用rpm软件包在Fedora20上安装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