First, the scene
There may be a problem with the configuration when installing PostgreSQL "The problem is that I changed the pg_hba.conf in the local column ident to peer will be wrong" cause the service does not come, error is as follows:
[[Email protected] ~] # /etc/init.d/postgresql Restart stopping PostgreSQL service: [ OK ]starting PostgreSQL service: [FAILED]
So I reinstalled postgresql-server with yum Remove and yum install.
Execute Command # service PostgreSQL INITDB Error following installation is complete:
[[Email protected] ~] # Service PostgreSQL Initdb is not empty! [FAILED]
Ii. Solutions
The web says this command executes only once and does not need to be executed a second time. Said is equal not to say.
Look again at the error message, the data directory is not empty.
My idea is to
[[Email protected] ~] # Cd/var/lib/pgsql [[Email protected] ~] # move Data datatemp
Then execute # service PostgreSQL initdb OK again.
[[email protected] pgsql] # lsbackups data datatemp Pgstartup.log
Then I will be OK to serve again.
[[Email protected] ~] # /etc/init.d/postgresql Start Starting PostgreSQL service: [ OK ]
The author starof, because the knowledge itself in the change, the author is also constantly learning and growth, the content of the article is not updated regularly, in order to avoid misleading readers, convenient tracing, please reprint annotated source: http://www.cnblogs.com/starof/p/4773364. HTML has a problem welcome to discuss with me, common progress.
Service PostgreSQL Initdb [FAILED]