Cryptomask Docs
  • CRYPTOMASK SERVER
    • Installing Database
    • Installing Cryptomask Server
  • Cryptomask Wallet
    • Quickstart
    • Changing App Name
    • Changing App ID
    • Changing App Icon
    • Customize and Extend
    • Building and Releasing
Powered by GitBook
On this page
  1. CRYPTOMASK SERVER

Installing Database

This guide explains how to install PostgreSQL 15.4 on Linux using the PostgreSQL APT repository.

Update and Install Prerequisites

Open your terminal and run the following command to update your system packages and install necessary dependencies.

sudo apt update && sudo apt upgrade -y
sudo apt install -y wget gnupg lsb-release

Add PostgreSQL APT Repository

Import the PostgreSQL GPG key

wget -qO - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

Add the PostgreSQL repository to your system:

echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list

Install PostgreSQL 15.4

Update the package list again to include the PostgreSQL repository

sudo apt update

Install PostgreSQL 15.4

sudo apt install -y postgresql-15

Start and Enable PostgreSQL Service

Start the PostgreSQL service

sudo systemctl start postgresql

Enable PostgreSQL to start on boot

sudo systemctl enable postgresql

Verify the service status

sudo systemctl status postgresql

Configure PostgreSQL

  • Change postgres password in /etc/postgresql/15/main/pg_hba.conf

Restart the PostgreSQL service after making changes

sudo systemctl restart postgresql

Congratulations! PostgreSQL 15.4 is now installed and configured on your Ubuntu system.

Install Postgres using the PostgreSQL Official Installer

  1. Download the Installer:

    • Visit the PostgreSQL official website and download the installer for macOS.

  2. Run the Installer:

    • Open the .dmg file and follow the installation wizard.

    • The wizard will guide you through steps like setting the installation path, password for the postgres user, and selecting components.

  3. Start PostgreSQL:

    • Use the PostgreSQL Application Stack Builder to manage and start the PostgreSQL server.

  4. Verify the Installation:

psql -U postgres

Post-Installation Steps

Initialize and Start PostgreSQL

  1. If installed with Homebrew:

    bash brew services start postgresql
  2. Initialize the database manually (if not started):

    bash initdb /usr/local/var/postgres

Access PostgreSQL

  • To enter the PostgreSQL interactive shell:

    bash psql postgres

Create a New User and Database

  1. Create a user:

    sql CREATE USER your_user_name WITH PASSWORD 'your_password';
  2. Create a database:

    sql CREATE DATABASE your_database_name;
  3. Grant privileges:

    sql GRANT ALL PRIVILEGES ON DATABASE your_database_name TO your_user_name;

Congratulations! PostgreSQL 15.4 is now installed and configured on your MAC OS system.

Postgres installing the PostgreSQL Official Installer

  1. Download the Installer:

    • Visit the PostgreSQL official website.

    • Click on Windows and download the latest installer.

  2. Run the Installer:

    • Double-click the downloaded .exe file to start the setup wizard.

  3. Follow the Installation Steps:

    • Choose the installation directory (default: C:\Program Files\PostgreSQL\<version>).

    • Select components (ensure "pgAdmin" is checked for a graphical interface).

    • Set a password for the default postgres user (remember this password).

    • Choose a port (default: 5432).

    • Select the locale (use the default or choose your preferred one).

  4. Complete Installation:

    • The installer will install PostgreSQL and initialize the database cluster.

  5. Verify Installation:

psql -U postgres

Post-Installation Steps

Initialize and Start PostgreSQL

  1. If installed with Homebrew:

    bash brew services start postgresql
  2. Initialize the database manually (if not started):

    bash initdb /usr/local/var/postgres

Access PostgreSQL

  • To enter the PostgreSQL interactive shell:

    bash psql postgres

Create a New User and Database

  1. Create a user:

    sql CREATE USER your_user_name WITH PASSWORD 'your_password';
  2. Create a database:

    sql CREATE DATABASE your_database_name;
  3. Grant privileges:

    sql GRANT ALL PRIVILEGES ON DATABASE your_database_name TO your_user_name;

Congratulations! PostgreSQL 15.4 is now installed and configured on your MAC OS system.

NextInstalling Cryptomask Server

Last updated 7 months ago