How to install PostgreSQL on Linux<\/a><\/p>\n\n\n\nNext, you can now proceed to install pgAdmin 4 on Debian as follows;<\/p>\n\n\n\n
Install pgAdmin APT Repository<\/h4>\n\n\n\n
Default repos do not provide pgAdmin packages. Hence, you need to install pgAdmin repository as follows;<\/p>\n\n\n\n
echo \\\n\"deb https:\/\/ftp.postgresql.org\/pub\/pgadmin\/pgadmin4\/apt\/$(lsb_release -cs) pgadmin4 main\" \\\n> \/etc\/apt\/sources.list.d\/pgadmin4.list<\/code><\/pre>\n\n\n\nInstall pgAdmin Repository GPG signing Key<\/h4>\n\n\n\n
Install the public key for the repository using the command below;<\/p>\n\n\n\n
apt install gnupg2 curl<\/code><\/pre>\n\n\n\ncurl -fsS https:\/\/www.pgadmin.org\/static\/packages_pgadmin_org.pub \\\n| sudo gpg --dearmor -o \/etc\/apt\/trusted.gpg.d\/packages-pgadmin-org.gpg<\/code><\/pre>\n\n\n\nInstall pgAdmin 4<\/h4>\n\n\n\n
Now, update system package cache and install pgAdmin on Debian 12;<\/p>\n\n\n\n
apt update<\/code><\/pre>\n\n\n\npgAdmin4 is primarily a desktop application. There also exist a web based version.<\/p>\n\n\n\n
Install for both desktop and web modes:<\/p>\n\n\n\n
apt install pgadmin4<\/code><\/pre>\n\n\n\nIf you want, you can install for desktop mode only:<\/p>\n\n\n\n
apt install pgadmin4-desktop<\/code><\/pre>\n\n\n\nOr Install for web mode only;<\/p>\n\n\n\n
apt install pgadmin4-web<\/code><\/pre>\n\n\n\nUsing pgAdmin Desktop Version<\/h3>\n\n\n\n
If you installed the desktop app version, then you should be able to launch it from the applications menu;<\/p>\n\n\n\n
<\/figure>\n\n\n\nLaunch it and give it a few to start.<\/p>\n\n\n\n
Once it started, then, pgAdmin4 desktop dashboard;<\/p>\n\n\n\n
<\/figure>\n\n\n\nClick Add New Server<\/strong> under the dashboard to connect to your PostgreSQL database.<\/p>\n\n\n\nUnder General<\/strong> tab, enter the name of the connection.<\/p>\n\n\n\n
<\/figure>\n\n\n\nUnder Connections<\/strong> tab, set the database connection details;<\/p>\n\n\n\n\n- address of the database server<\/li>\n\n\n\n
- port<\/li>\n\n\n\n
- credentials<\/li>\n<\/ul>\n\n\n\n
<\/figure>\n\n\n\nSave the connection.<\/p>\n\n\n\n
<\/figure>\n\n\n\nSelect the database and click SQL tab to run the queries.<\/p>\n\n\n\n
Using pgAdmin Web Version<\/h3>\n\n\n\n
If you want to use the pgAdmin web version, run the command below to set it up.<\/p>\n\n\n\n
sudo \/usr\/pgadmin4\/bin\/setup-web.sh<\/code><\/pre>\n\n\n\nGo through the prompts to setup the login credentials, and setup pgAdmin web server.<\/p>\n\n\n\n
\nSetting up pgAdmin 4 in web mode on a Debian based platform...\nCreating configuration database...\nNOTE: Configuring authentication for SERVER mode.\n\nEnter the email address and password to use for the initial pgAdmin user account:\n\nEmail address: admin@kifarunix.com\nPassword: \nRetype password:\npgAdmin 4 - Application Initialisation\n======================================\n\nCreating storage and log directories...\nWe can now configure the Apache Web server for you. This involves enabling the wsgi module and configuring the pgAdmin 4 application to mount at \/pgadmin4. Do you wish to continue (y\/n)? y\nThe Apache web server is running and must be restarted for the pgAdmin 4 installation to complete. Continue (y\/n)? y\nApache successfully restarted. You can now start using pgAdmin 4 in web mode at http:\/\/127.0.0.1\/pgadmin4\n\n<\/pre><\/code>\n\n\n\nYou can now access your pgAdmin from the browser on the local system using the addresses provided above, http:\/\/127.0.0.1\/pgadmin4<\/strong>.<\/p>\n\n\n\n
<\/figure>\n\n\n\nLogin and follow the same procedure as above to add the server and login to the PostgreSQL database.<\/p>\n\n\n\n
Conclusion<\/h3>\n\n\n\n
That concludes our guide on how to install pgAdmin 4 on Debian 12. You can now administer PostgreSQL with ease.<\/p>\n","protected":false},"excerpt":{"rendered":"
This tutorial will take you through how to install pgAdmin 4 on Debian 12. pgAdmin 4 is a popular graphical tool with an intuitive user<\/p>\n","protected":false},"author":10,"featured_media":17741,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,299],"tags":[7012,7011,7014,7013,7015,7016],"class_list":["post-17733","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-database","tag-debian-12-pgadmin-4","tag-install-pgadmin-4-debian-linux","tag-install-pgadmin-debian-web-version","tag-install-pgadmin-desktop-on-debian-12","tag-pgadmin-4","tag-pgadmin4","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/17733"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=17733"}],"version-history":[{"count":4,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/17733\/revisions"}],"predecessor-version":[{"id":20823,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/17733\/revisions\/20823"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/17741"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=17733"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=17733"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=17733"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}