to match that of your own instance.
:80
PGAdmin4
pgAdmin is designed to monitor and manage multiple PostgreSQL and EDB Advanced Server
database servers, both local and remote, through a single graphical interface that allows the
easy creation and management of database objects, as well as a number of other tools for
managing your databases.
Upon initial use of the image, run the below script as the root user to configure the
credentials required to access the PGAdmin4 Console running locally on the target server.
/usr/pgadmin4/bin/setup-web.shOUTPUT & RESPOND
[root@ip-172-31-93-13 ~]# /usr/pgadmin4/bin/setup-web.sh
Setting up pgAdmin 4 in web mode on a Redhat based platform...
Creating configuration database...
NOTE: Configuring authentication for SERVER mode.
Enter the email address and password to use for the initial pgAdmin user account:
Email address: example@cloudimg.co.uk (This is an example, enter an email address of choice)
Password: (Enter a password of choice)
Retype password: (Enter a password of choice)
pgAdmin 4 - Application Initialisation
======================================
Creating storage and log directories...
Configuring SELinux...
setsebool: SELinux is disabled.
setsebool: SELinux is disabled.
The Apache web server is running and must be restarted for the pgAdmin 4 installation to
complete. Continue (y/n)? y (Enter y to restart Apache)
Apache successfully restarted. You can now start using pgAdmin 4 in web mode at
http://127.0.0.1/pgadmin4
[root@ip-172-31-93-13 ~]#
You will now be able to access the PGAdmin4 Front End via the below URL exchanging the
values between the <> to match that of your instance.
/pgadmin4
Enter the credentials created in the above usr/pgadmin4/bin/setup-web.sh script.Click Login
Select Add New Server to connect to the Postgres Database.Enter a name for the connection, this example will use ‘EXAMPLE CONNECTION’
Select Connection
Enter in the Host field the IP address of your instance.
Enter Username: postgresFor Password enter the value found in the /stage/scripts/
postgresql_root_database_password.log file located on the instance.
Click Save
You will now have a remote connection to the Postgres database running on the instance.
Postgres Database Engine
For local administration and access to the postgres database, follow the below commands
for checking the service, stopping the service & starting the service along with how to log
into the database from the instance command line interface.
As the root user, run the below commands to check, stop or start the postgres database
service. By default, the service is configured to start on boot.
#Check the postgres server status
systemctl status postgresql-15
#Stop the postgres database engine
systemctl stop postgresql-15
#Start the postgres database enginesystemctl start postgresql-15
Run the below commands as the root user to switch to the postgres OS user for accessing
the postgres database engine command line interface from the instance locally.
sudo su – postgres
psql">