How to install and setup PostgreSQL on Fedora Core 15

Written by Ian Carnaghan · 28 sec read >
  1. Open a new Terminal Window and then install the latest PostgreSQL Server
    sudo yum install postgresql-server
  2. Now we need to initialize the Database Cluster
    sudo service postgresql initdb
  3. Now start the server
    service postgresql start
  4. Now login with the postgres user
    sudo su -l postgres

    This user automatically gets created when the PostgresSQL server gets installed

  5. Now we create a new PostgreSQL user
    createuser --no-superuser --no-createdb --no-createrole --pwprompt testUser

    When prompted for a password just enter any password you prefer

  6. Create a new Database and assign it to the newly created user
    createdb --owner testUser Database
  7. In order to allow connections from servers to this server edit the pg_hba.conf file
    vi /var/lib/pgsql/data/pg_hba.conf
  8. Reload the postgreSQL server so that all changes can take effect
    service postgresql reload

Last Updated On April 07, 2018
Written by Ian Carnaghan
I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment. Profile

Leave a Reply

Notify of