Postgres windows server 2019

Краткое руководство по установке и первоначальной настройке системы управления базами данных PostgreSQL на ОС Windows Server 2019 Core.

В первую очередь запускаем PowerShell и подключаем модуль BitsTransfer для скачивания файлов

Import-Module -Name BitsTransfer

После этого на диске C создадим каталог Distr и перейдём в него

cd \
mkdir Distr
cd \Distr

Затем получаем ссылку для скачивания дистрибутива со страницы https://enterprisedb.com/software-downloads-postgres

и скачиваем с помощью команды

Start-BitsTransfer -Source https://get.enterprisedb.com/postgresql/postgresql-14.1-1-windows-x64.exe

Запускаем установщик

postgresql-14.1-1-windows-x64.exe

выбираем директорию, в которую будет установлена СУБД

выбираем компоненты, которые будут установлены

выбираем директорию, где будут храниться базы данных

задаём пароль пользователю postgres

оставляем порт по умолчанию — 5432

выбираем локаль: Russian, Russia

проверяем заданные для установки параметры и компоненты

должно быть всё готово для установки

и после клика по кнопки Next начнётся установка

также по желанию можно установить Stack Builder (но не обязательно)

После установки можно запустить Диспетчер задач

taskmgr

перейти во вкладку Службы и появится служба postgresql-x64-14

Для запуска консоли PostgreSQL необходимо перейти в каталог C:\Program Files\PostgreSQL\14\bin и в нём запустить утилиту psql с функцией DBA:

C:\Program Files\PostgreSQL\14\bin > psql -U postgres

Для того, чтобы иметь возможность подключаться к серверу БД удалённо, необходимо перейти в каталог и в нём открыть файл pg_hba.conf

C:\Program Files\PostgreSQL\14\data > notepad pg_hba.conf

здесь необходимо будет добавить строчку:

host		all		all		all		md5

Ещё на всякий случай в файле postgresql.conf, который находится там же,где и pg_hba.conf, проверим наличие строчки:

listen_addresses = "*"

если в отличии от звёздочки стоит другое значение, значит исправляем на звёздочку.

Для удалённого подключения к серверу в брандмауэре с помощью консоли необходимо открыть порт 5432/TCP для входящих соединений

# netsh advfirewall firewall add rule name="PostgreSQL" protocol=TCP localport=5432 dir=IN action=allow

Чтобы новые параметры вступили в силу, необходимо перезапустить службу postgresql-x64-14, либо перезагрузить машину.

PostgreSQL is an open-source database management software that combines the capabilities of object-oriented and relational approaches to data storage. It has high power and scalability, and supports many features such as transactions, stored procedures and triggers, full-text search, geospatial data, JSON, and other. It also provides high performance,reliability and multithreading technologies. It is not a difficult task to install it and by few steps below, you can successfully install it yourself.

Download distribution kit

The initial step would be to download the installation files. The appropriate version of the installation file for our operating system can be downloaded from the official site «http://www.postgresql.org/download/windows».

Begin the installation process

Following that finish download process we run it. After starting the installation, a welcome window will appear, and we need to click the «Next» button.

Screenshot-01

Screenshot №1. Starting installation

Choosing the installation location

n the following screen, we have to select a directory for the installation of PostgreSQL. The installation directory is usually set to «C:\Program Files\PostgreSQL\» by default, however, it is possible to specify a different directory.

Screenshot-02

Screenshot №2. Choosing installation folder

Choosing components

In the following screen, there is an option to choose the components to install. By default, all components are selected; however, we can customize this selection based on our requirements. For this particular installation, we will only choose the essential components:

  • The DBMS itself
  • The pgAdmin 4 graphical administration utility
  • Command line administration utilities
Screenshot-03

Screenshot №3.Choosing components

Setting parameters

In the upcoming screen, you will be required to create a password for the default PostgreSQL account. This password will enable you to access the PostgreSQL database.
Aside from the password, during the installation process, you will be prompted to specify the port on which the application will run, as well as the locale. We will keep the default settings for both.

Screenshot-05

Screenshot №4. Setting DBA password
Screenshot-06

Screenshot №5. Selecting application port
Screenshot-07

Screenshot №6. Choosing locale

Initiating installation process

After we have entered all the necessary parameters, tap «Next» button. PostgreSQL’s installation may take some time, depending on the server’s technical specifications.

Screenshot-08

Screenshot №7. Starting Install

Finishing up the installation process

Once the installation is finished, a window will appear indicating that PostgreSQL has been successfully installed. Click on the «Finish» button to close the installer.

Screenshot-09

Screenshot №8. Finish installation

Checking functionality

To ensure that PostgreSQL has been installed and is functioning correctly, you can launch the graphical utility, PgAdmin 4, after installation. From the list, select the server and enter the administrator user’s password that was created during installation. Assuming everything has been set up accurately, a list of objects on the local server will appear. You can now generate an SQL query to display the installed version. To do this, right-click on the «postgres» database and choose the «Query Tool» option. In the right part of the screen in the «Query» field, enter:

SELECT version();

And click «Run». As a result, you will get something similar to the screenshot below:
By doing so, you can verify that the database is correctly functioning and available for use in your projects and applications.

Screenshot-11

Screenshot №9. Start PgAdmin 4
Screenshot-12

Screenshot №10. Connecting default local database
Screenshot-10

Screenshot №11. Verify version

Conclusion
By following the instructions provided, you can easily install PostgreSQL and use it for your projects and applications. Don’t forget to regularly update PostgreSQL and keep an eye on the security of your database.

1101
CT Amsterdam
The Netherlands, Herikerbergweg 292

+31 20 262-58-98

700
300

ITGLOBAL.COM NL

1101
CT Amsterdam
The Netherlands, Herikerbergweg 292

+31 20 262-58-98

700
300

ITGLOBAL.COM NL

Загрузка

Установить PostgreSQL можно с официального сайта перейдя в раздел Download и выбрав WIndows ОС, кликнете по активной ссылке Download the installer.

Windows PostgreSQL

Далее выберете нужную вам версию PostgreSQL и установите его, файл будет весить около 200 мб.

Windows PostgreSQL

Установка PostgreSQL

Сначала выбираем Next, на втором шаге оставляем стандартный путь для установки.

Windows PostgreSQL

Далее оставляем все параметр, которые будут установлены на ваш сервер.

Windows PostgreSQL

На следующем шаге оставляем путь для хранения дынных, либо же, если у вас недостаточно места на диске C, то стоит выбрать иной путь предварительно создав папку.

Windows PostgreSQL

Снова нажимаем Next и создаем пароль для администратора СУБД.

Windows PostgreSQL

На следующем этапе нужно будет вставить порт, он у нас стоит по умолчанию «5432», его и оставляем.

Windows PostgreSQL

Далее выберете язык с которым вам будет удобно работать, мы же оставим Английский по умолчанию.

Windows PostgreSQL

Обязательно ознакомьтесь с конфигурацией установки. Обратите внимание на пункты: Server Installation Directory, Database Port, Database Superuser.

Windows PostgreSQL

Подтверждение установки и ожидание ее окончания. По окончании установки вы получите возможность запустить stack builder, которые автоматически установят дополнительные компоненты и дистрибутивы.

Windows PostgreSQL

Установка Stack Builder

  •  Выберите установленный дистрибутив PostgreSQL.

Windows PostgreSQL

  • выберите приложения для установки. Мы выбрали PEM-HTTPD ( преднастроенный Apache веб-сервер ).

Windows PostgreSQL

  • Укажите каталог для установки пакетов.

Windows PostgreSQL

По завершении установки нажмите кнопку Завершить.

Подключение

Проверим работоспособность PostgreSQL, подключившись к СУБД через PgAdmin, который был установлен вместе с PostgreSQL. Перейдите в меню Пуск → папка PostgreSQL 13 → pgAdmin 4.

Windows PostgreSQL

При первом запуске pgAdmin необходимо будет задать пароль пользователя и раскрыть список серверов. Далее pgAdmin запросит пароль от PostgreSQL (мы его задавали на этапе установки).

Windows PostgreSQL

После успешного подключения к PostgreSQL вы увидите рабочие дашборды и сможете перемещаться по внутренней структуре БД.

Windows PostgreSQL

Настройка и проверка подключения к PostgreSQL окончена.

In this article, we want to teach you How To Set up PostgreSQL on Windows Server 2019. PostgreSQL (often referred to as Postgres) is an open-source object-relational database management system with a particular focus on extensibility and standards compliance.

Now you can follow the steps below to Set up PostgreSQL on Windows Server 2019.

To install PostgreSQL on your Windows Server, you can follow the steps below.

Install PostgreSQL (psql) on Windows Server 2019

In this guide, we will install PostgreSQL from the PostgreSQL enterprise website.

Download PostgreSQL for Windows

First, visit the page and get the latest version of PostgreSQL.

PostgreSQL installer for windows server

Then, open your PostgreSQL downloaded file on Windows Server 2019.

You will see the PostgreSQL setup wizard, click next to continue.

PostgreSQL setup wizard on windows server

In the next window, you need to choose your installation directory for your PostgreSQL on Windows Server and click on the next.

PostgreSQL installation directory

At this point, you need to select the PostgreSQL components on the Windows server 2019 that you want to install. By default, all components are selected. If you don’t want components clear them and click on the next.

set up postgreSQL components

Now you need to choose your Data directory for your PostgreSQL and click on the next.

PostgreSQL data directory

Next, you need to set up a password for the PostgreSQL superuser and click on the next button to continue.

set up password for PostgreSQL superuser

By default, PostgreSQL listens on port 5432. Select the port number that you can access on the PostgreSQL web and click the next button.

PostgreSQL port number

Here you need to select the time zone and the default language. Then, press the next button to continue your setup.

PostgreSQL advanced options on Windows server

Finally, you can confirm your pre-installation summary and click on the Next button.

PostgreSQL pre-installation summary

Your setup is now ready to start the PostgreSQL installation on Windows Server 2019 by clicking on the Next button.

PostgreSQL is ready to install on Windows Server

When your installation is completed, click on the finish button.

Additional utilities and add-ons can be installed using the Stack builder.

PostgreSQL complete setup

In the stack builder wizard, select your server and click next.

PostgreSQL stack builder on Windows server

In the next window, select the additional applications for PostgreSQL that you want to install and press next.

PostgreSQL additional apps

Now select your download directory and click next.

download additional packages for PostgreSQL

Then, you just need to press next to install your additional apps.

PostgreSQL install additional apps

When your installation is completed, your Windows Server 2019 will restart.

Access the PostgreSQL Instance

At this point, you need to open your pgAdmin4. and it will ask you for the password that you have set for the PostgreSQL super enter it and you will see all the objects in your server.

pgAdmin4 on windows server 2019

Conclusion

At this point, you have learned to Set up PostgreSQL on Windows Server 2019. You can easily visit the official website, download the latest package available for Windows, and start your setup.

Hope you enjoy using it. You may like these articles:

How To Set up WordPress on Windows Server 2019

How To Set up Plesk on Windows Server 2019

This article describes How To Install PostgreSql 12.2 1 on Microsoft Windows Server 2019

PostgreSQL is a powerful, open source object-relational database system that uses and extends the SQL language combined with many features that safely store and scale the most complicated data workloads. The origins of PostgreSQL date back to 1986 as part of the POSTGRES project at the University of California at Berkeley and has more than 30 years of active development on the core platform.

PostgreSQL has earned a strong reputation for its proven architecture, reliability, data integrity, robust feature set, extensibility, and the dedication of the open source community behind the software to consistently deliver performant and innovative solutions. PostgreSQL runs on all major operating systems, has been ACID-compliant since 2001, and has powerful add-ons such as the popular PostGIS geospatial database extender. It is no surprise that PostgreSQL has become the open source relational database of choice for many people and organisations.

PostgreSQL comes with many features aimed to help developers build applications, administrators to protect data integrity and build fault-tolerant environments, and help you manage your data no matter how big or small the dataset. In addition to being free and open source, PostgreSQL is highly extensible. For example, you can define your own data types, build out custom functions, even write code from different programming languages without recompiling your database!

PostgreSQL tries to conform with the SQL standard where such conformance does not contradict traditional features or could lead to poor architectural decisions. Many of the features required by the SQL standard are supported, though sometimes with slightly differing syntax or function. Further moves towards conformance can be expected over time. As of the version 12 release in October 2019, PostgreSQL conforms to at least 160 of the 179 mandatory features for SQL:2016 Core conformance. As of this writing, no relational database meets full conformance with this standard.

PostgreSQL is the first database management system that implements multi-version concurrency control (MVCC) feature, even before Oracle. The MVCC feature is known as snapshot isolation in Oracle.

PostgreSQL is a general-purpose object-relational database management system. It allows you to add custom functions developed using different programming languages such as C/C++, Java, etc.

PostgreSQL is designed to be extensible. In PostgreSQL, you can define your own data types, index types, functional languages, etc. If you don’t like any part of the system, you can always develop a custom plugin to enhance it to meet your requirements e.g., adding a new optimizer.

If you need any support, an active community is available to help. You can always find the answers from the PostgreSQL’s community for the issues that you may have when working with PostgreSQL. Many companies offer commercial support services in case you need one.

Many companies have built products and solutions using PostgreSQL. Some featured companies are Apple, Fujitsu, Red Hat, Cisco, Juniper Network, etc.

Now you can find some examples in this video.

Please subscribe to support our channel.
To be aware of our new videos please subscribe our channel.

Visit our website https://sdk-it.com
Visit our youtube channel
Watch IT & Learn IT & Apply IT.

Enjoy!

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Microsoft windows 10 professional ltsc
  • Установка windows не найдены подписанные драйверы устройства
  • Бесконечное завершение работы windows 10 после обновления
  • Как найти программы автозапуска в windows 7
  • Не могу закрепить ярлык на панели задач windows 11