Install PostgreSQL in Fedora 20
Install Postgres
#> sudo yum install postgresql-server postgresql-contrib#> sudo postgresql-setup initdb
#> sudo systemctl enable postgresql
#> sudo systemctl start postgresql
Install PgAdmin3
#> sudo yum install pgadmin3Change/Update Password
#> su - postgres-bash-4.2$ psql
postgres=# \password postgres
Enter new password: ****
Enter it again: ****
Create user
#> su - postgres-bash-4.2$ psql
postgres=#CREATE USER myNewUser WITH PASSWORD 'password';
Create DB
#> su - postgres-bash-4.2$ psql
postgres=# CREATE DATABASE mydbname OWNER postgres;
Update the authentication method to md5 (required to connect through pgAdmin3 tool)
#> vi /var/lib/pgsql/data/pg_hba.confChange the following from peer to md5.
#> # "local" is for Unix domain socket connections onlylocal all all md5
RESTART the postgreSQL service
Open pgAdmin3 and try to connect with a valid db username/pwd.
Restart the PostgreSQL service
#> sudo systemctl stop postgresql#> sudo systemctl start postgresql
Reference: https://fedoraproject.org/wiki/PostgreSQL
Comments
Post a Comment