The Nautilus application development team has shared that they are planning to deploy one newly developed application on Nautilus infra in Stratos DC. The application uses PostgreSQL database, so as a pre-requisite we need to set up PostgreSQL database server as per requirements shared below:
PostgreSQL database server is already installed on the Nautilus database server.
kodekloud_aim and set its password to your-password.kodekloud_db6 and grant full permissions to user kodekloud_aim on this database.Please do not try to restart PostgreSQL server service.
Login into Database server
ssh user@db_host
Switch to postgres user and run following commands:
sudo -i -u postgres
psql -c "CREATE DATABASE kodekloud_db6;"
psql -c "CREATE ROLE kodekloud_aim LOGIN PASSWORD 'your-password';"
psql -c "GRANT ALL PRIVILEGES ON DATABASE kodekloud_db6 TO kodekloud_aim;"
psql -c "ALTER DATABASE kodekloud_db6 OWNER TO kodekloud_aim;"
This is based on terminal, you don’t have to login inside pgsql
- It will create database
- Create user and grant all privileges for the database
Alternatively, login inside the postgres query and run the following commands:
sudo psql -U postgres
CREATE DATABASE kodekloud_db6;
CREATE ROLE kodekloud_aim LOGIN PASSWORD 'your-password';
GRANT ALL PRIVILEGES ON DATABASE kodekloud_db6 TO kodekloud_aim;
ALTER DATABASE kodekloud_db6 OWNER TO kodekloud_aim;