{"id":1610,"date":"2016-08-03T17:15:09","date_gmt":"2016-08-03T14:15:09","guid":{"rendered":"http:\/\/www.systemcodegeeks.com\/?p=1610"},"modified":"2017-12-04T16:04:23","modified_gmt":"2017-12-04T14:04:23","slug":"postgresql-introduction-installation","status":"publish","type":"post","link":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/","title":{"rendered":"PostgreSQL: Introduction and installation tutorial"},"content":{"rendered":"<p><em>This article is part of our Academy Course titled <a href=\"http:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-database-tutorial\/\">PostgreSQL Database Tutorial<\/a>.<\/p>\n<p>In this course, we provide a compilation of PostgreSQL tutorials that will help you set up and run your own database management system. We cover a wide range of topics, from installation and configuration, to custom commands and datatypes. With our straightforward tutorials, you will be able to get your own projects up and running in minimum time. Check it out <a href=\"http:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-database-tutorial\/\">here<\/a>!<\/em><\/p>\n<p>With all the Relational Database Management Systems (RDBMs) out there, it may be somewhat difficult to identify the best solution for your needs and to take an informed decision as to which one to choose. Thus, in this series we will provide an introduction to PostgreSQL and share some of the reasons why you may want to consider this solution when exploring the available technologies for a database implementation.<\/p>\n<h2>What\u2019s PostgreSQL?<\/h2>\n<p>PostgreSQL, also known by its alias Postgres, is a cross-platform object-relational database management system (ORDBMs for short). Its development started in the University of California at Berkeley in the mid \u201880s with a project they named simply <strong>POSTGRES<\/strong>, which did not feature SQL as query language at first. In the mid \u201890s, two students added SQL to the code inherited from the university, and PostgreSQL was born as an open-source project. Today, PostgreSQL has been long known (and has a strong reputation for) for being able to handle significant workloads with a large number of concurrent users. In addition, it provides bindings for many programming languages, making it an ideal solution for a client-server environment.<br \/>\n[ulp id=&#8217;mezv5fambxsNcQw8&#8242;]<\/p>\n<h2>Installing PostgreSQL<\/h2>\n<p>In this article we will explain how to install a PostgreSQL server in Ubuntu Server 16.04 (IP address 192.168.0.54), how to load a sample database, and how to install a client application (which will serve as an administrative tool) for Linux and Windows.<\/p>\n<p><b>Step 1 &#8211;<\/b> Launch a terminal and install the server and the web-based administration tool:<\/p>\n<pre class=\"brush:bash\">sudo aptitude install postgresql phppgadmin<\/pre>\n<p><b>Step 2 &#8211;<\/b> Verify that the database service is running and listening on port 5432:<\/p>\n<pre class=\"brush:bash\">systemctl is-active postgresql\r\nsudo netstat -npltu | grep postgres<\/pre>\n<p>The first command should indicate that unit postgresql is Active, and the second command should show that the service is listening on the right port, as shown in Fig. 1:<\/p>\n<figure id=\"attachment_1612\" aria-describedby=\"caption-attachment-1612\" style=\"width: 851px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/01postgres.png\"><img decoding=\"async\" class=\"size-full wp-image-1612\" src=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/01postgres.png\" alt=\"Verifying that PostgreSQL is running and listening on port 5432\" width=\"851\" height=\"122\" srcset=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/01postgres.png 851w, https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/01postgres-300x43.png 300w, https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/01postgres-768x110.png 768w\" sizes=\"(max-width: 851px) 100vw, 851px\" \/><\/a><figcaption id=\"caption-attachment-1612\" class=\"wp-caption-text\">Figure 1: Verifying that PostgreSQL is running and listening on port 5432<\/figcaption><\/figure>\n<p><b>Step 3 &#8211;<\/b> Switch to the postgres Linux account and create a new role for queries:<\/p>\n<p>The installation process created a new Linux account named postgres. By default, this is the only account with permissions to access the database prompt initially.<\/p>\n<p>To switch to the postgres account, do<\/p>\n<pre class=\"brush:bash\">sudo -i -u postgres<\/pre>\n<p>And run the following command to create a new database role named gacanepa (enter the password twice when you&#8217;re prompted to do so):<\/p>\n<pre class=\"brush:bash\">createuser gacanepa --no-createdb --no-superuser --no-createrole --pwprompt<\/pre>\n<p>Although the options in the above command are self-explanatory, let\u2019s just say that this particular role will not be allowed to create databases or roles, and will not have superuser privileges. Other options for the createuser command are available in its man page (which you can access from the Linux command prompt as <code>man createuser<\/code>).<\/p>\n<p><b>Step 4 &#8211;<\/b> Create a new database<\/p>\n<p>While you\u2019re still logged on as postgres, create a database:<\/p>\n<pre class=\"brush:bash\">createdb World_db<\/pre>\n<h2>Populating the database with data<\/h2>\n<p>Once we have created the database, it&#8217;s time to populate it with actual data we can later query:<\/p>\n<p><b>Step 5 &#8211;<\/b> Download a sample database<\/p>\n<p>The <a href=\"https:\/\/wiki.postgresql.org\/wiki\/Sample_Databases\">wiki<\/a> links to several sample databases that we can download and use. For this example, we will download and install the world database, which contains countries, cities, and spoken languages, among other data.<\/p>\n<pre class=\"brush:bash\">wget <a href=\"http:\/\/pgfoundry.org\/frs\/download.php\/527\/world-1.0.tar.gz\">http:\/\/pgfoundry.org\/frs\/download.php\/527\/world-1.0.tar.gz<\/a>\r\ntar xzf world-1.0.tar.gz<\/pre>\n<p><b>Step 6 &#8211;<\/b> Restore the database dump:<\/p>\n<p>The database dump file is located at dbsamples-01\/world inside the current working directory, as shown in Fig. 2:<\/p>\n<pre class=\"brush:bash\">cd dbsamples-0.1\/world\r\npsql World_db &lt; world.sql<\/pre>\n<figure id=\"attachment_1613\" aria-describedby=\"caption-attachment-1613\" style=\"width: 397px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/02postgres.png\"><img decoding=\"async\" class=\"size-full wp-image-1613\" src=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/02postgres.png\" alt=\"Locating the database dump file to restore\" width=\"397\" height=\"190\" srcset=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/02postgres.png 397w, https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/02postgres-300x144.png 300w\" sizes=\"(max-width: 397px) 100vw, 397px\" \/><\/a><figcaption id=\"caption-attachment-1613\" class=\"wp-caption-text\">Figure 2: Locating the database dump file to restore<\/figcaption><\/figure>\n<p>As the tables are created and populated with data, the output should be similar to Fig. 3:<\/p>\n<figure id=\"attachment_1614\" aria-describedby=\"caption-attachment-1614\" style=\"width: 587px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/03postgres.png\"><img decoding=\"async\" class=\"size-full wp-image-1614\" src=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/03postgres.png\" alt=\"Restoring the database contents from the dump file\" width=\"587\" height=\"256\" srcset=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/03postgres.png 587w, https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/03postgres-300x131.png 300w\" sizes=\"(max-width: 587px) 100vw, 587px\" \/><\/a><figcaption id=\"caption-attachment-1614\" class=\"wp-caption-text\">Figure 3: Restoring the database contents from the dump file<\/figcaption><\/figure>\n<p>After completing the above 6 steps, we now have a fully-setup PostgreSQL database.<\/p>\n<h2>Configuring phppgadmin in Linux<\/h2>\n<p>In order to allow remote (LAN) access to the web-based administration tool, follow these steps:<\/p>\n<p><b>Step 7 &#8211;<\/b> Integrate phppgadmin with Apache<\/p>\n<p>Open \/etc\/apache2\/conf-enabled\/phppgadmin.conf, and comment out the following line:<\/p>\n<pre class=\"brush:bash\">Require local<\/pre>\n<p>then add<\/p>\n<pre class=\"brush:bash\">Require all granted<\/pre>\n<p>just below (see Fig. 4 for details)<\/p>\n<figure id=\"attachment_1615\" aria-describedby=\"caption-attachment-1615\" style=\"width: 376px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/04postgres.png\"><img decoding=\"async\" class=\"size-full wp-image-1615\" src=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/04postgres.png\" alt=\"Configuring access permissions for phppgadmin\" width=\"376\" height=\"262\" srcset=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/04postgres.png 376w, https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/04postgres-300x209.png 300w\" sizes=\"(max-width: 376px) 100vw, 376px\" \/><\/a><figcaption id=\"caption-attachment-1615\" class=\"wp-caption-text\">Figure 4: Configuring access permissions for phppgadmin<\/figcaption><\/figure>\n<p><b>Step 8 &#8211; <\/b>Grant SELECT permissions on World_db<\/p>\n<p>Switch to the postgres Linux account and open the database prompt by typing<\/p>\n<pre class=\"brush:bash\">psql<\/pre>\n<p>Then connect to the World_db database:<\/p>\n<pre class=\"brush:bash\">\\c World_db;<\/pre>\n<p>Finally, grant SELECT permissions to role gacanepa, and exit (<code>\\q<\/code>) the database prompt:<\/p>\n<pre class=\"brush:bash\">GRANT SELECT ON ALL TABLES IN SCHEMA public TO gacanepa;\r\n\\q\r\n<\/pre>\n<p>See Fig. 5 for details:<\/p>\n<figure id=\"attachment_1616\" aria-describedby=\"caption-attachment-1616\" style=\"width: 617px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/05postgres.png\"><img decoding=\"async\" class=\"size-full wp-image-1616\" src=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/05postgres.png\" alt=\"Connecting to a database and granting SELECT permissions to a role\" width=\"617\" height=\"116\" srcset=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/05postgres.png 617w, https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/05postgres-300x56.png 300w\" sizes=\"(max-width: 617px) 100vw, 617px\" \/><\/a><figcaption id=\"caption-attachment-1616\" class=\"wp-caption-text\">Figure 5: Connecting to a database and granting SELECT permissions to a role<\/figcaption><\/figure>\n<p><b>Step 9 &#8211; <\/b>Restart Apache and PostgreSQL<\/p>\n<p>We are almost there. Let\u2019s restart Apache and PostgreSQL:<\/p>\n<pre class=\"brush:bash\">systemctl restart {apache2,postgresql}<\/pre>\n<p><b>Step 10 &#8211;<\/b> Login to phppgadmin<\/p>\n<p>Point your web browser to 192.168.0.54\/phppgadmin and click on PostgreSQL in the left hand section. Next, enter the role and password you created in Step 3 above, as shown in Fig. 6:<\/p>\n<figure id=\"attachment_1617\" aria-describedby=\"caption-attachment-1617\" style=\"width: 478px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/06postgres.png\"><img decoding=\"async\" class=\"size-full wp-image-1617\" src=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/06postgres.png\" alt=\"Logging on to phppgadmin\" width=\"478\" height=\"278\" srcset=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/06postgres.png 478w, https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/06postgres-300x174.png 300w\" sizes=\"(max-width: 478px) 100vw, 478px\" \/><\/a><figcaption id=\"caption-attachment-1617\" class=\"wp-caption-text\">Figure 6: Logging on to phppgadmin<\/figcaption><\/figure>\n<p>Once there, click on the World_db database and then enter a SQL query of your choice (see Fig. 7):<\/p>\n<pre class=\"brush:xml\">SELECT A.name \"City\", A.district \"District\",\r\nB.name \"Country\", C.language \"Language\"\r\nFROM city A JOIN country B ON A.countrycode=B.code\r\nJOIN countrylanguage C ON A.countrycode=C.countrycode\r\nWHERE A.name='Rosario' AND C.isofficial='TRUE';\r\n<\/pre>\n<figure id=\"attachment_1618\" aria-describedby=\"caption-attachment-1618\" style=\"width: 732px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/07postgres.png\"><img decoding=\"async\" class=\"size-full wp-image-1618\" src=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/07postgres.png\" alt=\"Our first query to the PostgreSQL database through phppgadmin\" width=\"732\" height=\"265\" srcset=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/07postgres.png 732w, https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/07postgres-300x109.png 300w\" sizes=\"(max-width: 732px) 100vw, 732px\" \/><\/a><figcaption id=\"caption-attachment-1618\" class=\"wp-caption-text\">Figure 7: Our first query to the PostgreSQL database through phppgadmin<\/figcaption><\/figure>\n<p>Click <strong>Execute<\/strong> at the bottom. The results should be as shown in Fig. 8:<\/p>\n<figure id=\"attachment_1619\" aria-describedby=\"caption-attachment-1619\" style=\"width: 425px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/08postgres.png\"><img decoding=\"async\" class=\"size-full wp-image-1619\" src=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/08postgres.png\" alt=\"The results of our first query\" width=\"425\" height=\"151\" srcset=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/08postgres.png 425w, https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/08postgres-300x107.png 300w\" sizes=\"(max-width: 425px) 100vw, 425px\" \/><\/a><figcaption id=\"caption-attachment-1619\" class=\"wp-caption-text\">Figure 8: The results of our first query<\/figcaption><\/figure>\n<h2>PostgreSQL Windows client<\/h2>\n<p>If you are using Microsoft Windows, in addition to phppgadmin (which you can access through a web browser), you can also install a client application named pgAdmin in order to connect to the database server. You can download it from the pgAdmin PostgreSQL tools page at <a href=\"https:\/\/www.pgadmin.org\/download\/windows.php\">https:\/\/www.pgadmin.org\/download\/windows.php<\/a>. The installation will only take a few clicks.<\/p>\n<div class=\"tip\">Although it is better known in Windows environments, pgAdmin is also available for Mac OS X as well.<\/div>\n<p>When you\u2019re done with the installation, make sure the following lines are present in the configuration files. Otherwise, you will NOT be able to connect to the database server from a machine other than where you installed and running.<\/p>\n<p>In \/etc\/postgresql\/9.5\/main\/postgresql.conf:<\/p>\n<pre class=\"brush:bash\">listen_addresses = '*'<\/pre>\n<p>will ensure the database server is listening on all interfaces, and because of the following line in \/etc\/postgresql\/9.5\/main\/pg_hba.conf:<\/p>\n<pre class=\"brush:bash\">host    all             all             192.168.0.0\/24          md5<\/pre>\n<p>you can now connect to the database server from any machine in the 192.168.0.0\/24 network.<\/p>\n<p>Once you added the above lines, open pgAdmin from Start \u2192 All programs \u2192 pgAdmin III. Then click on File \u2192 Add server and fill the connection details (see Fig. 9). If you fill the password box as shown below, the credentials will be saved in plain text in your user profile. If you are using a shared computer that is probably not a good idea, so you may want to leave that field blank if that\u2019s the case:<\/p>\n<figure id=\"attachment_1620\" aria-describedby=\"caption-attachment-1620\" style=\"width: 370px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/09postgres.png\"><img decoding=\"async\" class=\"size-full wp-image-1620\" src=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/09postgres.png\" alt=\"Configuring access to our database server through pgAdmin\" width=\"370\" height=\"459\" srcset=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/09postgres.png 370w, https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/08\/09postgres-242x300.png 242w\" sizes=\"(max-width: 370px) 100vw, 370px\" \/><\/a><figcaption id=\"caption-attachment-1620\" class=\"wp-caption-text\">Figure 9: Configuring access to our database server through pgAdmin<\/figcaption><\/figure>\n<p>Congratulations! You have successfully installed a PostgreSQL database server and are now able to access it both from a web interface and using a client application.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article is part of our Academy Course titled PostgreSQL Database Tutorial. In this course, we provide a compilation of PostgreSQL tutorials that will help you set up and run your own database management system. We cover a wide range of topics, from installation and configuration, to custom commands and datatypes. With our straightforward tutorials, &hellip;<\/p>\n","protected":false},"author":15,"featured_media":198,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[],"class_list":["post-1610","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-postgresql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PostgreSQL: Introduction and installation tutorial - System Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"This article is part of our Academy Course titled PostgreSQL Database Tutorial. In this course, we provide a compilation of PostgreSQL tutorials that will\" \/>\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.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PostgreSQL: Introduction and installation tutorial - System Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"This article is part of our Academy Course titled PostgreSQL Database Tutorial. In this course, we provide a compilation of PostgreSQL tutorials that will\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/\" \/>\n<meta property=\"og:site_name\" content=\"System Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/systemcodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/gacanepa\" \/>\n<meta property=\"article:published_time\" content=\"2016-08-03T14:15:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-12-04T14:04:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/postgresql-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Gabriel Canepa\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@gacanepa\" \/>\n<meta name=\"twitter:site\" content=\"@systemcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Gabriel Canepa\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/\"},\"author\":{\"name\":\"Gabriel Canepa\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/967da353d0f1a1de21c9504942625a5f\"},\"headline\":\"PostgreSQL: Introduction and installation tutorial\",\"datePublished\":\"2016-08-03T14:15:09+00:00\",\"dateModified\":\"2017-12-04T14:04:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/\"},\"wordCount\":1205,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/postgresql-logo.jpg\",\"articleSection\":[\"PostgreSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/\",\"url\":\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/\",\"name\":\"PostgreSQL: Introduction and installation tutorial - System Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/postgresql-logo.jpg\",\"datePublished\":\"2016-08-03T14:15:09+00:00\",\"dateModified\":\"2017-12-04T14:04:23+00:00\",\"description\":\"This article is part of our Academy Course titled PostgreSQL Database Tutorial. In this course, we provide a compilation of PostgreSQL tutorials that will\",\"breadcrumb\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/#primaryimage\",\"url\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/postgresql-logo.jpg\",\"contentUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/postgresql-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.systemcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Databases\",\"item\":\"https:\/\/www.systemcodegeeks.com\/category\/databases\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"PostgreSQL\",\"item\":\"https:\/\/www.systemcodegeeks.com\/category\/databases\/postgresql\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"PostgreSQL: Introduction and installation tutorial\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#website\",\"url\":\"https:\/\/www.systemcodegeeks.com\/\",\"name\":\"System Code Geeks\",\"description\":\"Operating System Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.systemcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.systemcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/systemcodegeeks\",\"https:\/\/x.com\/systemcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/967da353d0f1a1de21c9504942625a5f\",\"name\":\"Gabriel Canepa\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/27b3ea2a3fb1de4ed1c8694a1465c099a86586d8b833a0d852a26d76d750df9f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/27b3ea2a3fb1de4ed1c8694a1465c099a86586d8b833a0d852a26d76d750df9f?s=96&d=mm&r=g\",\"caption\":\"Gabriel Canepa\"},\"description\":\"Gabriel Canepa is a Linux Foundation Certified System Administrator (LFCS-1500-0576-0100) and web developer from Villa Mercedes, San Luis, Argentina. He works for a worldwide leading consumer product company and takes great pleasure in using FOSS tools to increase productivity in all areas of his daily work. When he's not typing commands or writing code or articles, he enjoys telling bedtime stories with his wife to his two little daughters and playing with them, the great pleasure of his life.\",\"sameAs\":[\"http:\/\/www.gabrielcanepa.com.ar\/\",\"https:\/\/www.facebook.com\/gacanepa\",\"https:\/\/ar.linkedin.com\/in\/gacanepa\",\"https:\/\/x.com\/gacanepa\"],\"url\":\"https:\/\/www.systemcodegeeks.com\/author\/gabriel-canepa\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PostgreSQL: Introduction and installation tutorial - System Code Geeks - 2026","description":"This article is part of our Academy Course titled PostgreSQL Database Tutorial. In this course, we provide a compilation of PostgreSQL tutorials that will","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.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/","og_locale":"en_US","og_type":"article","og_title":"PostgreSQL: Introduction and installation tutorial - System Code Geeks - 2026","og_description":"This article is part of our Academy Course titled PostgreSQL Database Tutorial. In this course, we provide a compilation of PostgreSQL tutorials that will","og_url":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/","og_site_name":"System Code Geeks","article_publisher":"https:\/\/www.facebook.com\/systemcodegeeks","article_author":"https:\/\/www.facebook.com\/gacanepa","article_published_time":"2016-08-03T14:15:09+00:00","article_modified_time":"2017-12-04T14:04:23+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/postgresql-logo.jpg","type":"image\/jpeg"}],"author":"Gabriel Canepa","twitter_card":"summary_large_image","twitter_creator":"@gacanepa","twitter_site":"@systemcodegeeks","twitter_misc":{"Written by":"Gabriel Canepa","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/#article","isPartOf":{"@id":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/"},"author":{"name":"Gabriel Canepa","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/967da353d0f1a1de21c9504942625a5f"},"headline":"PostgreSQL: Introduction and installation tutorial","datePublished":"2016-08-03T14:15:09+00:00","dateModified":"2017-12-04T14:04:23+00:00","mainEntityOfPage":{"@id":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/"},"wordCount":1205,"commentCount":0,"publisher":{"@id":"https:\/\/www.systemcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/#primaryimage"},"thumbnailUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/postgresql-logo.jpg","articleSection":["PostgreSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/","url":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/","name":"PostgreSQL: Introduction and installation tutorial - System Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.systemcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/#primaryimage"},"image":{"@id":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/#primaryimage"},"thumbnailUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/postgresql-logo.jpg","datePublished":"2016-08-03T14:15:09+00:00","dateModified":"2017-12-04T14:04:23+00:00","description":"This article is part of our Academy Course titled PostgreSQL Database Tutorial. In this course, we provide a compilation of PostgreSQL tutorials that will","breadcrumb":{"@id":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/#primaryimage","url":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/postgresql-logo.jpg","contentUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/postgresql-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/postgresql-introduction-installation\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.systemcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Databases","item":"https:\/\/www.systemcodegeeks.com\/category\/databases\/"},{"@type":"ListItem","position":3,"name":"PostgreSQL","item":"https:\/\/www.systemcodegeeks.com\/category\/databases\/postgresql\/"},{"@type":"ListItem","position":4,"name":"PostgreSQL: Introduction and installation tutorial"}]},{"@type":"WebSite","@id":"https:\/\/www.systemcodegeeks.com\/#website","url":"https:\/\/www.systemcodegeeks.com\/","name":"System Code Geeks","description":"Operating System Developers Resource Center","publisher":{"@id":"https:\/\/www.systemcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.systemcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.systemcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.systemcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/systemcodegeeks","https:\/\/x.com\/systemcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/967da353d0f1a1de21c9504942625a5f","name":"Gabriel Canepa","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/27b3ea2a3fb1de4ed1c8694a1465c099a86586d8b833a0d852a26d76d750df9f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/27b3ea2a3fb1de4ed1c8694a1465c099a86586d8b833a0d852a26d76d750df9f?s=96&d=mm&r=g","caption":"Gabriel Canepa"},"description":"Gabriel Canepa is a Linux Foundation Certified System Administrator (LFCS-1500-0576-0100) and web developer from Villa Mercedes, San Luis, Argentina. He works for a worldwide leading consumer product company and takes great pleasure in using FOSS tools to increase productivity in all areas of his daily work. When he's not typing commands or writing code or articles, he enjoys telling bedtime stories with his wife to his two little daughters and playing with them, the great pleasure of his life.","sameAs":["http:\/\/www.gabrielcanepa.com.ar\/","https:\/\/www.facebook.com\/gacanepa","https:\/\/ar.linkedin.com\/in\/gacanepa","https:\/\/x.com\/gacanepa"],"url":"https:\/\/www.systemcodegeeks.com\/author\/gabriel-canepa\/"}]}},"_links":{"self":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/posts\/1610","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/comments?post=1610"}],"version-history":[{"count":0,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/posts\/1610\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/media\/198"}],"wp:attachment":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/media?parent=1610"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/categories?post=1610"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/tags?post=1610"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}