{"id":46683,"date":"2023-12-18T12:30:00","date_gmt":"2023-12-18T18:30:00","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=46683"},"modified":"2023-11-20T09:45:20","modified_gmt":"2023-11-20T15:45:20","slug":"how-to-install-postgresql-on-debian-12","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-debian-12\/","title":{"rendered":"How to Install PostgreSQL on Debian 12"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2023\/11\/how-to-install-postgresql-on-debian-12.webp\" alt=\"how to install postgresql on debian 12\" class=\"wp-image-47372\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2023\/11\/how-to-install-postgresql-on-debian-12.webp 1024w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2023\/11\/how-to-install-postgresql-on-debian-12-300x169.webp 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2023\/11\/how-to-install-postgresql-on-debian-12-150x84.webp 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2023\/11\/how-to-install-postgresql-on-debian-12-768x432.webp 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>PostgreSQL is an open-source relational <a href=\"https:\/\/www.rosehosting.com\/database-hosting\/\">database management system<\/a> used by large companies around the globe. It is a powerful and reliable RDMS that offers an extensive data storage and management feature set. In this article, we will show you how to <a href=\"https:\/\/www.postgresql.org\/\">install PostgreSQL<\/a> on Debian 12.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>PostgreSQL is scalable, enabling users to store and handle vast quantities of data while offering strong performance and dependability. Let&#8217;s start with the installation.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69f3b20ebaff9\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69f3b20ebaff9\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-debian-12\/#Prerequisites\" >Prerequisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-debian-12\/#Step-1-Update-the-System\" >Step 1. Update the System<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-debian-12\/#Step-2-Install-PostgreSQL\" >Step 2. Install PostgreSQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-debian-12\/#Step-3-Using-PostgreSQL\" >Step 3. Using PostgreSQL<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span>Prerequisites<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A <a href=\"https:\/\/www.rosehosting.com\/debian-hosting\/\" target=\"_blank\" rel=\"noreferrer noopener\">Debian 12 VPS<\/a> with at least 4GB of RAM<\/li>\n\n\n\n<li>SSH access with sudo privileges or root access.<\/li>\n<\/ul>\n\n\n\n<p>In addition, it is recommended to have at least 2GB of SWAP memory, even if you have enough available RAM.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step-1-Update-the-System\"><\/span>Step 1. Update the System<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>First of all, we need to log in to our Debian 12 VPS through SSH:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ssh root@IP_Address -p Port_number<\/pre>\n\n\n\n<p>Replace &#8220;root&#8221; with a user that has sudo privileges or root if necessary. Additionally, replace &#8220;IP_Address&#8221; and &#8220;Port_Number&#8221; with your server&#8217;s respective IP address and SSH port number. Next, let&#8217;s make sure that we&#8217;re on Debian 12. You can do that like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># lsb_release -a<\/pre>\n\n\n\n<p>The command should return an output similar to this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">No LSB modules are available.<br>Distributor ID: Debian<br>Description: Debian GNU\/Linux 12 (bookworm)<br>Release: 12<br>Codename: bookworm<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step-2-Install-PostgreSQL\"><\/span>Step 2. Install PostgreSQL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>There are a couple of different methods to install PostgreSQL on Debian 12. One method is using the system&#8217;s default repository, another is using PostgreSQL official repository, or you can install it from the source code. In this tutorial, we will show you the two easiest methods to install PostgreSQL on Debian 12.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Method 1<\/h3>\n\n\n\n<p>The easiest way to install PostgreSQL on Debian 12 is using the Advanced Package Tool (apt). The installation is easy and straightforward. Execute the command below to install PostgreSQL.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># apt install postgresql<\/pre>\n\n\n\n<p>On the Debian 12 system, PostgreSQL will automatically run upon installation. To verify this, we can invoke this command.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># systemctl status postgresql<\/pre>\n\n\n\n<p>The command above will return an output similar to this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@debian12:~# systemctl status postgresql\n\u25cf postgresql.service - PostgreSQL RDBMS\n     Loaded: loaded (\/lib\/systemd\/system\/postgresql.service; enabled; preset: enabled)\n     Active: active (exited) since Thu 2023-08-10 18:43:42 CDT; 1min 21s ago\n   Main PID: 29458 (code=exited, status=0\/SUCCESS)\n        CPU: 2ms\n\nAug 10 18:43:42 debian12.rosehosting.net systemd[1]: Starting postgresql.service - PostgreSQL RDBMS...\nAug 10 18:43:42 debian12.rosehosting.net systemd[1]: Finished postgresql.service - PostgreSQL RDBMS.<\/pre>\n\n\n\n<p>We can also check the installed version of PostgreSQL by running this command.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># psql --version<\/pre>\n\n\n\n<p>You should see this as the output.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">psql (PostgreSQL) 15.3 (Debian 15.3-0+deb12u1)<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Method 2<\/h3>\n\n\n\n<p>Most Linux distributions ship PostgreSQL in their repository. However, the included PostgreSQL version is quite outdated in some cases. To get the most recent version of PostgreSQL or a specific version of PostgreSQL, we can use the PostgreSQL repository. This repository will integrate with your normal system and patch management and provide automatic updates for all supported versions of PostgreSQL throughout the support lifetime of PostgreSQL. In this method, we will show you how to install PostgreSQL using their official repository.<\/p>\n\n\n\n<p>First of all, we need to install the <code>gnupg<\/code> package before continuing.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># apt install gnupg2 -y<\/pre>\n\n\n\n<p>After installing it, we can add or create a file repository configuration. Let&#8217;s execute this command.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># sh -c 'echo \"deb http:\/\/apt.postgresql.org\/pub\/repos\/apt $(lsb_release -cs)-pgdg main\" &gt; \/etc\/apt\/sources.list.d\/pgdg.list'<\/pre>\n\n\n\n<p>Then, import the repository signing key. This will guarantee that the packages we install are from a reliable source. Execute the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># wget --quiet -O - https:\/\/www.postgresql.org\/media\/keys\/ACCC4CF8.asc | apt-key add -<\/pre>\n\n\n\n<p>Once completed, we need to refresh the package list on our Debian 12 system.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># apt update<\/pre>\n\n\n\n<p>Finally, install the latest version of PostgreSQL.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># apt -y install postgresql<\/pre>\n\n\n\n<p>If you want a specific version, for example, PostgreSQL 14, use &#8216;postgresql-14&#8217; instead of &#8216;postgresql&#8217; in the command above.<\/p>\n\n\n\n<p>To check the installed version, depending on the version, you can run this command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># \/usr\/lib\/postgresql\/14\/bin\/psql --version<\/pre>\n\n\n\n<p>It will return an output like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">psql (PostgreSQL) 14.9 (Debian 14.9-1.pgdg120+1)<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step-3-Using-PostgreSQL\"><\/span>Step 3. Using PostgreSQL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Once PostgreSQL is installed, a default database and user account called &#8216;postgres&#8217; will be set up during the installation. To access the database, execute the following command in your Debian 12 system to switch to user <code>postgres<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> su - postgres<\/pre>\n\n\n\n<p>After switching to the <code>postgres<\/code> user, we can run this command to get into PostgreSQL shell.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ psql<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">postgres@debian12:~$ psql\npsql (15.3 (Debian 15.3-0+deb12u1))\nType \"help\" for help.\n\npostgres=#<\/pre>\n\n\n\n<p>Run <strong><code>\\l<\/code><\/strong> to list the databases.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">postgres@debian12:~$ psql\npsql (15.3 (Debian 15.3-0+deb12u1))\nType \"help\" for help.\n\npostgres=# \\l\n                                                 List of databases\n   Name    |  Owner   | Encoding |   Collate   |    Ctype    | ICU Locale | Locale Provider |   Access privileges   \n-----------+----------+----------+-------------+-------------+------------+-----------------+-----------------------\n postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |            | libc            | \n template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |            | libc            | =c\/postgres          +\n           |          |          |             |             |            |                 | postgres=CTc\/postgres\n template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |            | libc            | =c\/postgres          +\n           |          |          |             |             |            |                 | postgres=CTc\/postgres\n(3 rows)\n\npostgres=#<\/pre>\n\n\n\n<p>To exit from the PostgreSQL shell, simply type <strong><code>\\q<\/code><\/strong>, then hit ENTER.<\/p>\n\n\n\n<p>That&#8217;s it all! You have successfully installed the PostgreSQL server on your <a href=\"https:\/\/www.rosehosting.com\/debian-hosting\/\" target=\"_blank\" rel=\"noreferrer noopener\">Debian 12 system<\/a>.<\/p>\n\n\n\n<p>Of course, if you are one of our <a href=\"https:\/\/www.rosehosting.com\/debian-hosting\/\" target=\"_blank\" rel=\"noreferrer noopener\">Debian Hosting<\/a> customers, you don\u2019t have to install PostgreSQL on Debian 12 yourself \u2013 simply ask our admins, sit back, and relax. Our admins will install PostgreSQL on Debian 12 for you immediately without any additional fee, along with many useful optimizations that we can do for you. Managing a PostgreSQL-based website is not just about the installation. We can help you with optimizing your PostgreSQL installation if you have an active VPS with us.<\/p>\n\n\n\n<p>If you liked this post about how to install PostgreSQL on Debian 12, please share it with your friends on social networks or simply leave a comment in the comments section. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PostgreSQL is an open-source relational database management system used by large companies around the globe. It is a powerful and &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Install PostgreSQL on Debian 12\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-debian-12\/#more-46683\" aria-label=\"Read more about How to Install PostgreSQL on Debian 12\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":47372,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1702,1700,2072,13],"tags":[48,434],"class_list":["post-46683","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-databases","category-debian","category-open-source","category-tutorials","tag-debian","tag-postgresql","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.5 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Install PostgreSQL on Debian 12 | RoseHosting<\/title>\n<meta name=\"description\" content=\"Wondering how to install PostgreSQL on Debian 12? Follow our in-depth tutorial and find out more about this topic.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-debian-12\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install PostgreSQL on Debian 12\" \/>\n<meta property=\"og:description\" content=\"Wondering how to install PostgreSQL on Debian 12? Follow our in-depth tutorial and find out more about this topic.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-debian-12\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2023-12-18T18:30:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2023\/11\/how-to-install-postgresql-on-debian-12.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"576\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"How to Install PostgreSQL on Debian 12\" \/>\n<meta name=\"twitter:description\" content=\"Wondering how to install PostgreSQL on Debian 12? Follow our in-depth tutorial and find out more about this topic.\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-debian-12\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-debian-12\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to Install PostgreSQL on Debian 12\",\"datePublished\":\"2023-12-18T18:30:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-debian-12\\\/\"},\"wordCount\":708,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-debian-12\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/how-to-install-postgresql-on-debian-12.webp\",\"keywords\":[\"debian\",\"PostgreSQL\"],\"articleSection\":[\"Databases\",\"Debian\",\"Open-source\",\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-debian-12\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-debian-12\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-debian-12\\\/\",\"name\":\"How to Install PostgreSQL on Debian 12 | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-debian-12\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-debian-12\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/how-to-install-postgresql-on-debian-12.webp\",\"datePublished\":\"2023-12-18T18:30:00+00:00\",\"description\":\"Wondering how to install PostgreSQL on Debian 12? Follow our in-depth tutorial and find out more about this topic.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-debian-12\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-debian-12\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-debian-12\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/how-to-install-postgresql-on-debian-12.webp\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/how-to-install-postgresql-on-debian-12.webp\",\"width\":1024,\"height\":576,\"caption\":\"how to install postgresql on debian 12\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-debian-12\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install PostgreSQL on Debian 12\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Install PostgreSQL on Debian 12 | RoseHosting","description":"Wondering how to install PostgreSQL on Debian 12? Follow our in-depth tutorial and find out more about this topic.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-debian-12\/","og_locale":"en_US","og_type":"article","og_title":"How to Install PostgreSQL on Debian 12","og_description":"Wondering how to install PostgreSQL on Debian 12? Follow our in-depth tutorial and find out more about this topic.","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-debian-12\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2023-12-18T18:30:00+00:00","og_image":[{"width":1024,"height":576,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2023\/11\/how-to-install-postgresql-on-debian-12.webp","type":"image\/webp"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_title":"How to Install PostgreSQL on Debian 12","twitter_description":"Wondering how to install PostgreSQL on Debian 12? Follow our in-depth tutorial and find out more about this topic.","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-debian-12\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-debian-12\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to Install PostgreSQL on Debian 12","datePublished":"2023-12-18T18:30:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-debian-12\/"},"wordCount":708,"commentCount":0,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-debian-12\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2023\/11\/how-to-install-postgresql-on-debian-12.webp","keywords":["debian","PostgreSQL"],"articleSection":["Databases","Debian","Open-source","Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-debian-12\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-debian-12\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-debian-12\/","name":"How to Install PostgreSQL on Debian 12 | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-debian-12\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-debian-12\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2023\/11\/how-to-install-postgresql-on-debian-12.webp","datePublished":"2023-12-18T18:30:00+00:00","description":"Wondering how to install PostgreSQL on Debian 12? Follow our in-depth tutorial and find out more about this topic.","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-debian-12\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-debian-12\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-debian-12\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2023\/11\/how-to-install-postgresql-on-debian-12.webp","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2023\/11\/how-to-install-postgresql-on-debian-12.webp","width":1024,"height":576,"caption":"how to install postgresql on debian 12"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-debian-12\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install PostgreSQL on Debian 12"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/46683","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=46683"}],"version-history":[{"count":9,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/46683\/revisions"}],"predecessor-version":[{"id":47385,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/46683\/revisions\/47385"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/47372"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=46683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=46683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=46683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}