Instal Postgesql database in Ubuntu

Instal Postgress package
sudo apt-get update
sudo apt-get install postgresql postgresql-contrib
 

Set a password for the postgres user
sudo -u postgres psql

ALTER USER postgres PASSWORD 'password_here';

update Postgres to use this password. To do this we need to edit the pg_hba.conf file.

vim /etc/postgresql/9.5/main/pg_hba.conf
/opt/accessibility-tool/QWCAT-WEB-UI/qwcatweb/node_modules/react-scripts/scripts/start.js
local   all             postgres                                peer
to
local   all             postgres                                md5

Restart postgresql service
sudo service postgresql restart

Login to database
sudo -u postgres psql
or,
psql -U postgres

create database dbname;
\l
\q

Share on Google Plus

About Penguin Technology

I am a passionate cloud and DevOps professional specializing in Linux and open-source solutions. Through this blog, I share my knowledge and experience with the community, offering tips and insights on cloud technologies and DevOps practices.
    Blogger Comment

0 comments:

Post a Comment