{"id":1918,"date":"2016-06-24T17:46:34","date_gmt":"2016-06-24T08:46:34","guid":{"rendered":"http:\/\/avinton.com\/?page_id=1918"},"modified":"2024-10-03T10:45:46","modified_gmt":"2024-10-03T01:45:46","slug":"postgresql-setup","status":"publish","type":"page","link":"https:\/\/avinton.com\/en\/academy\/postgresql-setup\/","title":{"rendered":"PostgreSQL Setup"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_row][vc_column][vc_column_text]<\/p>\n<h3>Install PostgreSQL<\/h3>\n<pre class=\"\">sudo apt-get install postgresql postgresql-contrib<\/pre>\n<p>&nbsp;<\/p>\n<h3>Server Setup<\/h3>\n<p>Set Password<\/p>\n<pre class=\"\">sudo -u postgres psql postgres\r\n\\password postgres\r\n\\q\r\nexit<\/pre>\n<p>&nbsp;<\/p>\n<h3>Create DB<\/h3>\n<pre class=\"\">sudo -u postgres createdb avinton<\/pre>\n<p>&nbsp;<\/p>\n<h3>Allow Remote Access to DB<\/h3>\n<p>Edit the hba.conf file for allowing remote access &#8211; located in the folder:<\/p>\n<pre class=\"\">\/etc\/postgresql\/\/main<\/pre>\n<p>&nbsp;<\/p>\n<p>Lets allow access to our database from same network hosts only:<\/p>\n<pre class=\"\">sudo vi \/etc\/postgresql\/9.5\/main\/pg_hba.conf<\/pre>\n<p>Lets enable the posgresql server to listen for incoming connections:<\/p>\n<pre class=\"\">sudo vi \/etc\/postgresql\/9.5\/main\/postgresql.conf<\/pre>\n<p>&nbsp;<\/p>\n<h3>Restart PostgreSQL Server<\/h3>\n<pre class=\"\">service postgresql stop\r\nservice postgresql start<\/pre>\n<p>&nbsp;<\/p>\n<h3>Check if service is running:<\/h3>\n<pre class=\"\">service postgresql status<\/pre>\n<p>&nbsp;<\/p>\n<h3>Connect to DB from PGAdmin on host<\/h3>\n<p>Install PGAdmin on your host machine (PC or Mac)<\/p>\n<p><a style=\"color: #333333; background-image: initial; background-color: #e7e7e7; background-repeat: initial;\" href=\"https:\/\/www.pgadmin.org\/download\/\">https:\/\/www.pgadmin.org\/download\/<\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>Add new connection:<\/h3>\n<p>Enter connection details: (Password is what you set earlier)<\/p>\n<p>If you get some error double check you followed the steps &lt;Allow Remote Access to DB&gt;<br \/>\nAlso make sure if you are using a VM that your VM network is set to &#8220;Bridged&#8221; in VirtualBox or VMWare.<\/p>\n<p>&nbsp;<\/p>\n<h3>Open DB and SQL Editor:<\/h3>\n<p>[\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>[vc_row][vc_column][vc_column_text] Install PostgreSQL sudo apt-get install postgresql postgresql-contrib &nbsp; Server Setup Set Password sudo -u postgres psql postgres \\password postgres \\q exit &nbsp; Create DB sudo -u postgres createdb avinton &nbsp; Allow Remote Access to DB Edit the hba.conf file for allowing remote access &#8211; located in the folder: \/etc\/postgresql\/\/main &nbsp; Lets allow access to<br \/><a href=\"https:\/\/avinton.com\/en\/academy\/postgresql-setup\/\" class=\"more\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":1906,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-1918","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PostgreSQL Setup - Avinton Japan<\/title>\n<meta name=\"description\" content=\"Install PostgreSQL sudo apt-get install postgresql postgresql-contrib &nbsp; Server Setup Set Password sudo -u postgres psql postgres password postgres\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/avinton.com\/en\/academy\/postgresql-setup\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PostgreSQL Setup - Avinton Japan\" \/>\n<meta property=\"og:description\" content=\"Install PostgreSQL sudo apt-get install postgresql postgresql-contrib &nbsp; Server Setup Set Password sudo -u postgres psql postgres password postgres\" \/>\n<meta property=\"og:url\" content=\"https:\/\/avinton.com\/en\/academy\/postgresql-setup\/\" \/>\n<meta property=\"og:site_name\" content=\"Avinton Japan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Avintons\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-03T01:45:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/avinton.com\/wp-content\/uploads\/2020\/02\/avinton-japan-big-data.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@AvintonJapan\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/avinton.com\/en\/academy\/postgresql-setup\/\",\"url\":\"https:\/\/avinton.com\/en\/academy\/postgresql-setup\/\",\"name\":\"PostgreSQL Setup - Avinton Japan\",\"isPartOf\":{\"@id\":\"https:\/\/avinton.com\/en\/#website\"},\"datePublished\":\"2016-06-24T08:46:34+00:00\",\"dateModified\":\"2024-10-03T01:45:46+00:00\",\"description\":\"Install PostgreSQL sudo apt-get install postgresql postgresql-contrib &nbsp; Server Setup Set Password sudo -u postgres psql postgres \\\\password postgres\",\"breadcrumb\":{\"@id\":\"https:\/\/avinton.com\/en\/academy\/postgresql-setup\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/avinton.com\/en\/academy\/postgresql-setup\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/avinton.com\/en\/academy\/postgresql-setup\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/avinton.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Avinton Academy\",\"item\":\"https:\/\/avinton.com\/en\/academy\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"PostgreSQL Setup\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/avinton.com\/en\/#website\",\"url\":\"https:\/\/avinton.com\/en\/\",\"name\":\"Avinton Japan\",\"description\":\"Tailored Solutions and Consulting in AI and Big Data\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/avinton.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PostgreSQL Setup - Avinton Japan","description":"Install PostgreSQL sudo apt-get install postgresql postgresql-contrib &nbsp; Server Setup Set Password sudo -u postgres psql postgres password postgres","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:\/\/avinton.com\/en\/academy\/postgresql-setup\/","og_locale":"en_US","og_type":"article","og_title":"PostgreSQL Setup - Avinton Japan","og_description":"Install PostgreSQL sudo apt-get install postgresql postgresql-contrib &nbsp; Server Setup Set Password sudo -u postgres psql postgres password postgres","og_url":"https:\/\/avinton.com\/en\/academy\/postgresql-setup\/","og_site_name":"Avinton Japan","article_publisher":"https:\/\/www.facebook.com\/Avintons\/","article_modified_time":"2024-10-03T01:45:46+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/avinton.com\/wp-content\/uploads\/2020\/02\/avinton-japan-big-data.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_site":"@AvintonJapan","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/avinton.com\/en\/academy\/postgresql-setup\/","url":"https:\/\/avinton.com\/en\/academy\/postgresql-setup\/","name":"PostgreSQL Setup - Avinton Japan","isPartOf":{"@id":"https:\/\/avinton.com\/en\/#website"},"datePublished":"2016-06-24T08:46:34+00:00","dateModified":"2024-10-03T01:45:46+00:00","description":"Install PostgreSQL sudo apt-get install postgresql postgresql-contrib &nbsp; Server Setup Set Password sudo -u postgres psql postgres \\password postgres","breadcrumb":{"@id":"https:\/\/avinton.com\/en\/academy\/postgresql-setup\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/avinton.com\/en\/academy\/postgresql-setup\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/avinton.com\/en\/academy\/postgresql-setup\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/avinton.com\/en\/"},{"@type":"ListItem","position":2,"name":"Avinton Academy","item":"https:\/\/avinton.com\/en\/academy\/"},{"@type":"ListItem","position":3,"name":"PostgreSQL Setup"}]},{"@type":"WebSite","@id":"https:\/\/avinton.com\/en\/#website","url":"https:\/\/avinton.com\/en\/","name":"Avinton Japan","description":"Tailored Solutions and Consulting in AI and Big Data","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/avinton.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/avinton.com\/en\/wp-json\/wp\/v2\/pages\/1918","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/avinton.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/avinton.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/avinton.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/avinton.com\/en\/wp-json\/wp\/v2\/comments?post=1918"}],"version-history":[{"count":42,"href":"https:\/\/avinton.com\/en\/wp-json\/wp\/v2\/pages\/1918\/revisions"}],"predecessor-version":[{"id":113690,"href":"https:\/\/avinton.com\/en\/wp-json\/wp\/v2\/pages\/1918\/revisions\/113690"}],"up":[{"embeddable":true,"href":"https:\/\/avinton.com\/en\/wp-json\/wp\/v2\/pages\/1906"}],"wp:attachment":[{"href":"https:\/\/avinton.com\/en\/wp-json\/wp\/v2\/media?parent=1918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/avinton.com\/en\/wp-json\/wp\/v2\/categories?post=1918"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/avinton.com\/en\/wp-json\/wp\/v2\/tags?post=1918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}