{"id":17733,"date":"2023-07-06T23:16:37","date_gmt":"2023-07-06T20:16:37","guid":{"rendered":"https:\/\/kifarunix.com\/?p=17733"},"modified":"2024-03-10T10:31:08","modified_gmt":"2024-03-10T07:31:08","slug":"install-pgadmin-4-on-debian","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-pgadmin-4-on-debian\/","title":{"rendered":"Install pgAdmin 4 on Debian 12"},"content":{"rendered":"\n<p>This tutorial will take you through how to install pgAdmin 4 on Debian 12. <a href=\"https:\/\/www.pgadmin.org\/docs\/pgadmin4\/latest\/index.html\" target=\"_blank\" rel=\"noreferrer noopener\">pgAdmin 4<\/a> is a popular graphical tool with an intuitive user interface for administering PostgreSQL databases.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#installing-pg-admin-4-on-debian-12\">Installing pgAdmin 4 on Debian 12<\/a><ul><li><a href=\"#install-postgre-sql-on-debian-12\">Install PostgreSQL on Debian 12<\/a><ul><li><a href=\"#install-pg-admin-apt-repository\">Install pgAdmin APT Repository<\/a><\/li><li><a href=\"#install-pg-admin-repository-gpg-signing-key\">Install pgAdmin Repository GPG signing Key<\/a><\/li><li><a href=\"#install-pg-admin-4\">Install pgAdmin 4<\/a><\/li><\/ul><\/li><li><a href=\"#using-pg-admin-desktop-version\">Using pgAdmin Desktop Version<\/a><\/li><li><a href=\"#using-pg-admin-web-version\">Using pgAdmin Web Version<\/a><\/li><li><a href=\"#conclusion\">Conclusion<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"installing-pg-admin-4-on-debian-12\">Installing pgAdmin 4 on Debian 12<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-postgre-sql-on-debian-12\">Install PostgreSQL on Debian 12<\/h3>\n\n\n\n<p>Since pgAdmin is a graphical PostgreSQL administration tool, you need to be already running PostgreSQL.<\/p>\n\n\n\n<p>Check the guides on the link below on how to install PostgreSQL on Linux systems.<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/?s=install+postgresql\" target=\"_blank\" rel=\"noreferrer noopener\">How to install PostgreSQL on Linux<\/a><\/p>\n\n\n\n<p>Next, you can now proceed to install pgAdmin 4 on Debian as follows;<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"install-pg-admin-apt-repository\">Install pgAdmin APT Repository<\/h4>\n\n\n\n<p>Default repos do not provide pgAdmin packages. Hence, you need to install pgAdmin repository as follows;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \\\n\"deb https:\/\/ftp.postgresql.org\/pub\/pgadmin\/pgadmin4\/apt\/$(lsb_release -cs) pgadmin4 main\" \\\n&gt; \/etc\/apt\/sources.list.d\/pgadmin4.list<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"install-pg-admin-repository-gpg-signing-key\">Install pgAdmin Repository GPG signing Key<\/h4>\n\n\n\n<p>Install the public key for the repository using the command below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install gnupg2 curl<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -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\n<h4 class=\"wp-block-heading\" id=\"install-pg-admin-4\">Install pgAdmin 4<\/h4>\n\n\n\n<p>Now, update system package cache and install pgAdmin on Debian 12;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt update<\/code><\/pre>\n\n\n\n<p>pgAdmin4 is primarily a desktop application. There also exist a web based version.<\/p>\n\n\n\n<p>Install for both desktop and web modes:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install pgadmin4<\/code><\/pre>\n\n\n\n<p>If you want, you can install for desktop mode only:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install pgadmin4-desktop<\/code><\/pre>\n\n\n\n<p>Or Install for web mode only;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install pgadmin4-web<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"using-pg-admin-desktop-version\">Using pgAdmin Desktop Version<\/h3>\n\n\n\n<p>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 class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1226\" height=\"838\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/pgadmin-desktop.png\" alt=\"\" class=\"wp-image-17736\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/pgadmin-desktop.png?v=1688672115 1226w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/pgadmin-desktop-768x525.png?v=1688672115 768w\" sizes=\"(max-width: 1226px) 100vw, 1226px\" \/><\/figure>\n\n\n\n<p>Launch it and give it a few to start.<\/p>\n\n\n\n<p>Once it started, then, pgAdmin4 desktop dashboard;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1054\" height=\"815\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/pgadmin-4-desktop.png\" alt=\"Install pgAdmin 4 on Debian 12\" class=\"wp-image-17737\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/pgadmin-4-desktop.png?v=1688672666 1054w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/pgadmin-4-desktop-768x594.png?v=1688672666 768w\" sizes=\"(max-width: 1054px) 100vw, 1054px\" \/><\/figure>\n\n\n\n<p>Click <strong>Add New Server<\/strong> under the dashboard to connect to your PostgreSQL database.<\/p>\n\n\n\n<p>Under <strong>General<\/strong> tab, enter the name of the connection.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1017\" height=\"769\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/enter-connection-name.png\" alt=\"\" class=\"wp-image-17738\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/enter-connection-name.png?v=1688673237 1017w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/enter-connection-name-768x581.png?v=1688673237 768w\" sizes=\"(max-width: 1017px) 100vw, 1017px\" \/><\/figure>\n\n\n\n<p>Under <strong>Connections<\/strong> tab, set the database connection details;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>address of the database server<\/li>\n\n\n\n<li>port<\/li>\n\n\n\n<li>credentials<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1014\" height=\"693\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/database-connection-details.png\" alt=\"\" class=\"wp-image-17739\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/database-connection-details.png?v=1688673245 1014w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/database-connection-details-768x525.png?v=1688673245 768w\" sizes=\"(max-width: 1014px) 100vw, 1014px\" \/><\/figure>\n\n\n\n<p>Save the connection.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1096\" height=\"794\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/pgadmin-database-access.png\" alt=\"\" class=\"wp-image-17740\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/pgadmin-database-access.png?v=1688673785 1096w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/pgadmin-database-access-768x556.png?v=1688673785 768w\" sizes=\"(max-width: 1096px) 100vw, 1096px\" \/><\/figure>\n\n\n\n<p>Select the database and click SQL tab to run the queries.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"using-pg-admin-web-version\">Using pgAdmin Web Version<\/h3>\n\n\n\n<p>If you want to use the pgAdmin web version, run the command below to set it up.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo \/usr\/pgadmin4\/bin\/setup-web.sh<\/code><\/pre>\n\n\n\n<p>Go through the prompts to setup the login credentials, and setup pgAdmin web server.<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>\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\n<p>You can now access your pgAdmin from the browser on the local system using the addresses provided above, <strong>http:\/\/127.0.0.1\/pgadmin4<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1269\" height=\"772\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/pgadmin-web-interface.png\" alt=\"\" class=\"wp-image-17741\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/pgadmin-web-interface.png?v=1688674247 1269w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/pgadmin-web-interface-768x467.png?v=1688674247 768w\" sizes=\"(max-width: 1269px) 100vw, 1269px\" \/><\/figure>\n\n\n\n<p>Login and follow the same procedure as above to add the server and login to the PostgreSQL database.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h3>\n\n\n\n<p>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":"<p>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}]}}