Guide – How To Start – PostgreSQL 17 on Rocky 8 on Amazon

PostgreSQL 17 on Rocky 8 delivers a powerful and stable SQL database, optimized for enterprise deployments with Rocky Linux 8.

This is a quick deployment and ready-to-run image.
Simple and rapid installation. Easy to maintain.

Connecting and configuring PostgreSQL 17 on Rocky 8 using pgAdmin 4 through SSH Tunnel

When starting the VM, the server starts automatically.

Getting the password to the database

  1. To manage the PostgreSQL server manually, you should connect to a VM. 
  • Run PowerShell
  • Enter the command ssh -i “path to .pem file” rocky@VM_IP, where: 

“path to .pem file” is the path to the file from subparagraph a) of this paragraph

VM_IP is the IP address of your virtual machine.

  • Confirm connection
  1. To get the password enter the command:

$ sudo cat /root/postgres_credentials

Save the password

  1. To check the server version enter

$ psql -V

Connecting to the Postgresql server

  1. Go to the pgAdmin download page – Download, select the desired version, download, and install it
  1. Run pgAdmin. By default, you will be asked to set a master password

Set the password and click “OK”.

  1. Click “Add New Server” on the main page
  1. In the pop-up window, enter the name of your connection in the Name field.
  1. Go to the Connection tab. Enter “127.0.0.1” in the Host name/address field (1), enter the password from step 2 of the previous chapter in the Password field (2), and enable Save password (3)
  1. Go to the SSH Tunnel tab and click the Use SSH tunneling switch (1), in the Tunnel host field enter the address of the virtual machine (2), in the Username field type rocky (3), select Identity file (4) and enter the path to your .pem file in the Identity file field (5). Click Save (6) to confirm the changes and establish the connection
  1. Your connection is ready

More information – 17: PostgreSQL 17.2 Documentation 

Website Built with WordPress.com.

Up ↑