PgHero is an open-source performance dashboard for Postgres database server. It shows system metrics such as resource usage and health checks, among other features. This article explains how to install PgHero on Ubuntu 20.04.
Install PostgreSQL database server.
Enable the database server to start automatically on system startup.
Start the database server.
Secure PostgreSQL by changing the default PostgreSQL password.
Switch to the postgres user.
Create a new database user named dbuser.
Log in to the PostgreSQL instance.
Set a secure password for the user.
Create a database named dbname and set the owner to dbuser.
Grant all the privileges on the database to the user.
Exit PostgreSQL instance.
Return to your non-root sudo user account.
Update the system packages.
Download and add the PgHero GPG key.
Add the downloaded repository.
Update the system packages.
Install PgHero.
Add your database. Change the values dbuser, SecurePassword, localhost, and dbname with your preferred database credentials.
Set up PgHero web server.
Start the PgHero service.
Verify the status of PgHero service.
Enable the PgHero service to run on system startup.
Allow associated ports.
Test the web interface, go to your browser and visit http://Server_IP:3001. For example:
Install Nginx server.
Unlink Nginx default configuration file.
Create a new Nginx configuration file named pghero.conf.
Add the following code to the file. Save and close the file.
Enable the new configuration file.
Restart the Nginx service.
You can now access the web interface directly without using a port. Go to your browser and visit http://Server_IP. For example:
0 Comments
Be the first to comment and share your perspective with the community.