簡體   English   中英

如何在Fedora PostgreSQL中初始化initdb

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM