MacLochlainns Weblog

Michael McLaughlin's Technical Blog

Site Admin

pgAdmin4 on Ubuntu

without comments

Installing pgAdmin4 is qualified by the pgAdmin4 (APT) web page, which relies on the curl utility. Ubuntu doesn’t install curl by default, so you need to install it before you can download and install pgAdmin4:

  1. Download and install curl utility

    sudo apt-get install -y curl

  2. Download and install the public key for the repository (if not done previously):

    sudo curl -fsS https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo gpg --dearmor -o /usr/share/keyrings/packages-pgadmin-org.gpg

    It may find an existing key and require you to confirm its replacement:

    File '/usr/share/keyrings/packages-pgadmin-org.gpg' exists. Overwrite? (y/N) y
  3. Create the repository configuration file:

    sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/packages-pgadmin-org.gpg] https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'

  4. Install the pgadmin4 Desktop:

    sudo apt install pgadmin4-desktop

  5. You can launch your pgadmin4 program file or by clicking the pgAdmin4 icon in the other applications menu:

  6. It takes a couple moments to launch the pgadmin4 desktop. The initial screen will look like:

  7. After pgadmin4 launches, you’re prompted for a master password. Enter the password and click the OK button to proceed or simply let it sit for a couple minutes to avoid entering a password.

  8. After entering the password or skipping its entry you arrive at the base dialog, as shown.

  9. Click the Add New Server link, which prompts you to register your database. Enter videodb in the Name field and click the Connection tab to the right of the General tab.

  10. In the Connection dialog, enter the following values:

    • Host name/address: localhost
    • Port: 5432
    • Maintenance database: postgres
    • Username: student
    • Password: student

    Enter a name for your database. In this example, videodb is the Server Name. Click the Save button to proceed.

  11. Having completed the configuration, you now see the home page.

This completes the instructions for installing, configuring, and using PostgreSQL on AlmaLinux. As always, I hope it helps those looking for instructions.

Written by maclochlainn

December 7th, 2023 at 10:36 pm

Posted in Linux,Ubuntu