# Postgres Database Server Setup

This document provides step-by-step instructions to help you set up Postgres database Server. We'll walk you through the necessary configurations to ensure a smooth and secure connection to your database.

# Introduction

Postgres database Server setup involves configuring connection parameters correctly. This guide will help you set up and verify these configurations, ensuring your application can communicate with the Postgres database server.

# Step 1: Set up PostgresSQL database

    # Step 2: Access PostgreSQL

    1. By default, PostgreSQL uses the postgres role for administrative tasks. To switch to the postgres user:
    sudo -i -u postgres
    
    1
    1. Now, you can access the PostgreSQL command line interface (CLI) by typing:
    psql
    
    1

    # Step 3: Create Database

    1. It is necessary to create a database for functionalities to work. You can create a database name "ycrash" in the command line
    CREATE DATABASE ycrash;
    
    1
    1. By default, the username and password are postgres and postgres

    Note: This step is common to all platforms (Linux and Windows)

    # Step 4: Modify the database configuration file

    After the above step, create connector-postgres.xml file, which should contain the Postgres DB connectivity details as shown below:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
    <properties>
    	<comment>This is easy!</comment>
    	<entry key="JDBC_URL">jdbc:postgresql://localhost:5432/ycrash</entry>
    	<entry key="JDBC_USER">username</entry>
    	<entry key="JDBC_PASSWORD">password</entry>
    </properties>
    
    1
    2
    3
    4
    5
    6
    7
    8

    Place this file in the Upload Directory of yCrash server.

    With the above configurations, restart the yCrash server so that the application now will be configured to use the postgres database.