{"id":490,"date":"2025-02-21T20:14:02","date_gmt":"2025-02-22T02:14:02","guid":{"rendered":"https:\/\/bblaze.xyz\/?p=490"},"modified":"2025-12-08T16:06:46","modified_gmt":"2025-12-08T22:06:46","slug":"postgresql-virtualmin-phppgadmin","status":"publish","type":"post","link":"https:\/\/jb03.com\/index.php\/2025\/02\/21\/postgresql-virtualmin-phppgadmin\/","title":{"rendered":"PostgreSQL, Virtualmin, &amp; phpPgAdmin"},"content":{"rendered":"\n<p>Time to load PostgreSQL.<\/p>\n\n\n\n<p>For those paying attention, when we installed Virtualmin loaded the &#8220;LAMP&#8221; stack.<\/p>\n\n\n\n<p>That means we got: Linux, Apache, MySQL, and PHP.<\/p>\n\n\n\n<p>So many newer (cooler) applications no longer use MySQL but PostgreSQL instead. So now is the time to get PostgreSQL loaded onto our Virtualmin server.<\/p>\n\n\n\n<p>Naturally, there are several ways to do this. This is just &#8220;my way.&#8221;<\/p>\n\n\n\n<p>Start by going to System Settings \u2013 \u2013 Features and Plugins:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"518\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-zero-1024x518.png\" alt=\"\" class=\"wp-image-491\" srcset=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-zero-1024x518.png 1024w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-zero-300x152.png 300w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-zero-768x388.png 768w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-zero.png 1141w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>Click the checkbox next to PostgreSQL database. Then click the &#8220;Save&#8221; button.<\/p>\n\n\n\n<p>Virtualmin will take you to an error page, telling you that PostgreSQL is not installed. On that page (I forgot to get a screenshot) are the instructions to go to the Virtualmin PostgreSQL module. From there Virtualmin will ask you if you want to install PostgreSQL. Yes, yes you do.<\/p>\n\n\n\n<p>Go ahead and click on the install button.<\/p>\n\n\n\n<p>When done, you should be looking at the Virtualmin module for the PostgreSQL database server.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"591\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-one-1024x591.png\" alt=\"\" class=\"wp-image-492\" srcset=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-one-1024x591.png 1024w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-one-300x173.png 300w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-one-768x443.png 768w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-one.png 1333w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>Notice that line at the bottom.<\/p>\n\n\n\n<p>Go ahead and click on the &#8220;click here&#8221; in order to install the necessary Perl module.<\/p>\n\n\n\n<p>Awesome! Now your Virtualmin server is running PostgreSQL and has all the tools for you to avoid the command line (for the most part.)<\/p>\n\n\n\n<p><strong><span style=\"text-decoration: underline;\">Installing phpPgAdmin2<\/span><\/strong><\/p>\n\n\n\n<p>Let&#8217;s start by creating a new virtual server.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"609\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-two-1024x609.png\" alt=\"\" class=\"wp-image-493\" srcset=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-two-1024x609.png 1024w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-two-300x178.png 300w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-two-768x456.png 768w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-two.png 1213w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>Naturally, if Virtualmin is not handling your DNS records then create those first.<\/p>\n\n\n\n<p>Just like adding any other domain name to the system, we need to enter the FQDM and make any other desired changes\/additions.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>I am using Virtualmin&#8217;s DNS on the server, so that box remains checked.<\/li>\n\n\n\n<li>We are going to need Apache as the web server.<\/li>\n\n\n\n<li>And we want to have access to the PostgreSQL database.<\/li>\n<\/ul>\n\n\n\n<p>So those are the only three checkboxes needed. SAVE THE PASSWORD. Go ahead and click the Create Server button.<\/p>\n\n\n\n<p><strong>Now here&#8217;s the thing<\/strong>, up until a few months ago \u2013 or until your preferred Linux distribution upgraded to PHP 8 \u2013 we would install phpPgAdmin as one of the Virtualmin included web applications. But the original version of phpPgAdmin does not support PHP 8. Thankfully an updated version is available. And also thankfully, installation is pretty simple.<\/p>\n\n\n\n<p>So let&#8217;s install phpPgAdmin 2.<\/p>\n\n\n\n<p>NOTE: I have the original version of phpPgAdmin loaded via the &#8220;web app&#8221; process (that&#8217;s how I discovered it doesn&#8217;t work.)<\/p>\n\n\n\n<p>So in order to keep that version alive while testing another I created a subdirectory off the main directory. You don&#8217;t need to do that. But my process goes like this:<\/p>\n\n\n\n<p>Create a new directory off of the \/home\/pgphp\/public_html\/ directory.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/home\/pgphp\/public_html\nmkdir git\ncd git<\/code><\/pre>\n\n\n\n<p>Then we&#8217;re going to download the application directly from Git.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git clone https:\/\/github.com\/ReimuHakurei\/phpPgAdmin.git<\/code><\/pre>\n\n\n\n<p>If you don&#8217;t want to create the &#8220;git&#8221; directory, you can go ahead and run the above command directly in the \/home\/pgphp\/public_html directory.<\/p>\n\n\n\n<p>Now we can direct our favorite web browser to: https:\/\/pgphp.imfbsbn.com\/git\/phpPgAdmin\/ (remove &#8220;git\/&#8221; from the URL as appropriate.)<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"309\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-three-1024x309.png\" alt=\"\" class=\"wp-image-497\" srcset=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-three-1024x309.png 1024w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-three-300x91.png 300w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-three-768x232.png 768w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-three.png 1400w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>If you click on the &#8220;Servers&#8221; icon near the top right you should get this:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"745\" height=\"301\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-four.png\" alt=\"\" class=\"wp-image-499\" srcset=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-four.png 745w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-four-300x121.png 300w\" sizes=\"auto, (max-width: 745px) 100vw, 745px\" \/><\/figure>\n<\/div>\n\n\n<p>If you click on the PostgreSQL in the middle there, you will be taken to a login screen:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"613\" height=\"343\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-five.png\" alt=\"\" class=\"wp-image-500\" srcset=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-five.png 613w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-five-300x168.png 300w\" sizes=\"auto, (max-width: 613px) 100vw, 613px\" \/><\/figure>\n<\/div>\n\n\n<p>The username is the administrative username for the domain in Virtualmin.<\/p>\n\n\n\n<p>The password is the password when you created the domain in Virtualmin.<\/p>\n\n\n\n<p>When you click login you should get something like this (I&#8217;ve been creating and dropping databases all day so your screen will look a little different):<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"317\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-six-1024x317.png\" alt=\"\" class=\"wp-image-501\" srcset=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-six-1024x317.png 1024w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-six-300x93.png 300w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-six-768x238.png 768w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/02\/PG-DB-six.png 1165w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>That&#8217;s it!<\/p>\n\n\n\n<p>Now you have loaded PostgreSQL and installed an updated version of phpPgAdmin.<\/p>\n\n\n\n<p>In the next post I&#8217;ll show you how to connect to the PostgreSQL server from a docker container.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Time to load PostgreSQL. For those paying attention, when we installed Virtualmin loaded the &#8220;LAMP&#8221; stack. &hellip; <a title=\"PostgreSQL, Virtualmin, &amp; phpPgAdmin\" class=\"hm-read-more\" href=\"https:\/\/jb03.com\/index.php\/2025\/02\/21\/postgresql-virtualmin-phppgadmin\/\"><span class=\"screen-reader-text\">PostgreSQL, Virtualmin, &amp; phpPgAdmin<\/span>Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36,40,41],"tags":[],"class_list":["post-490","post","type-post","status-publish","format-standard","hentry","category-getting-started","category-postgresql","category-virtualmin"],"_links":{"self":[{"href":"https:\/\/jb03.com\/index.php\/wp-json\/wp\/v2\/posts\/490","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jb03.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jb03.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jb03.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jb03.com\/index.php\/wp-json\/wp\/v2\/comments?post=490"}],"version-history":[{"count":1,"href":"https:\/\/jb03.com\/index.php\/wp-json\/wp\/v2\/posts\/490\/revisions"}],"predecessor-version":[{"id":631,"href":"https:\/\/jb03.com\/index.php\/wp-json\/wp\/v2\/posts\/490\/revisions\/631"}],"wp:attachment":[{"href":"https:\/\/jb03.com\/index.php\/wp-json\/wp\/v2\/media?parent=490"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jb03.com\/index.php\/wp-json\/wp\/v2\/categories?post=490"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jb03.com\/index.php\/wp-json\/wp\/v2\/tags?post=490"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}