Google Plus

postgresql-bin/systemctl initdb postgresql.service Unknown operation initdb | Solved

Written by Mel Kham on . Posted in Fedora, Frequently Asked Questions

Question : I get this error when starting postgresql server on fedora 16

[pirat9@Fedora16 forum]$ sudo service postgresql initdb
Output
Redirecting to /bin/systemctl  initdb postgresql.service
Unknown operation initdb

Solution:

Use the following commands to correct the issue:

[root@Fedora16 ~]# su - postgres -c "PGDATA=/var/lib/pgsql/data initdb"
Output
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale en_US.UTF-8.
The default database encoding has accordingly been set to UTF8.
The default text search configuration will be set to "english".

fixing permissions on existing directory /var/lib/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 24MB
creating configuration files ... ok
creating template1 database in /var/lib/pgsql/data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating collations ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
loading PL/pgSQL server-side language ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.

Success. You can now start the database server using:

    postgres -D /var/lib/pgsql/data
or
    pg_ctl -D /var/lib/pgsql/data -l logfile start

[root@Fedora16 ~]#

Start the Server now

[root@Fedora16 ~]# service postgresql start
Output
Redirecting to /bin/systemctl  start postgresql.service
[root@Fedora16 ~]# ps -ef | grep sql
Output
postgres  3045     1  1 22:03 ?        00:00:00 /usr/bin/postgres -D /var/lib/pgsql/data -p 5432
postgres  3046  3045  0 22:03 ?        00:00:00 postgres: logger process                        
postgres  3048  3045  0 22:03 ?        00:00:00 postgres: writer process                        
postgres  3049  3045  0 22:03 ?        00:00:00 postgres: wal writer process                    
postgres  3050  3045  0 22:03 ?        00:00:00 postgres: autovacuum launcher process           
postgres  3051  3045  0 22:03 ?        00:00:00 postgres: stats collector process               
root      3186  2874  0 22:04 pts/0    00:00:00 grep --color=auto post

ENJOY

For questions please refer to our Q/A forum at : http://ask.unixmen.com

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.
  • patounder

     Thanks ! really thanks soo much

  • Den Kakkaew

    Thanks a lot  this really helpful

  • Amrit Rathi

    thanks! this helped a lot. :)

  • deshan

    thanks really helped

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

LinuxSytesNet

|

Yesterday watched a movie with Morgan Freeman called ‘ A long came a spider ‘ and must say that I was quite impressed how they exchanged encrypted messages hidden in pictures. Thank you for the tutorial :)

Bjarni

|

Excellent, thanx!

Ambiton

|

Thank you very much Chris :)

Lolman

|

in cmd

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .