Popular blog tags

How To Install and uninstall reinstall PostgreSQL on Windows 10


I’ll show you how to install PostgreSQl on Windows 10.


To install PostgreSQL, we’ll complete the following tasks:

Downloading the PostgreSQL package.

Installing and configuring PostgreSQL.

Starting the postgres server application.

Verifying that PostgreSQL is working.

 Install PostgreSQL

os:Ubuntu 18.04.3 LTS


主机名:           SERVER100
OS 名称:          Microsoft Windows 10 专业版
OS 版本:          10.0.19042 暂缺 Build 19042
OS 制造商:        Microsoft Corporation
OS 配置:          独立工作站


Step 1:Download the PostgreSQL installer 

To install PostgreSQL on your computer, you can download it from the official site or by using the download link for Windows. Once you’re on the right page, click the “Download the installer” link.

Download the PostgreSQL installer  for Windows,available as a graphical installer package from the PostgreSQL website at: https://www.enterprisedb.com/downloads/postgres-postgresql-downloads

you will get:




Other:download a zip archive of the binaries, without the installer



Advanced users can also download a zip archive of the binaries, without the installer. This download is intended for users who wish to include PostgreSQL as part of another application installer


Step 2:Installing and Configuring PostgreSQL


Follow the installation instructions for Ubuntu as follow:

sudo apt-get update
sudo apt-get install postgresql postgresql-client


Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]         
Get:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]                     
Fetched 252 kB in 0s (531 kB/s)                                                                  
Reading package lists... Done
Setting up nginx-core (1.14.0-0ubuntu1.7) ...
Not attempting to start NGINX, port 80 is already in use.
Setting up nginx (1.14.0-0ubuntu1.7) ...


psql (9.5.17)
Type "help" for help.


Uninstall  Nginx on Ubuntu 18.04(aliyun)

step 1:

sudo apt-get remove nginx nginx-common # Removes all but config files.


sudo apt-get purge nginx nginx-common # Removes everything

step 2:

sudo apt-get autoremove # After using any of the above commands, use this in order to remove dependencies used by nginx which are no longer required.



To recreate it, first uninstall using purge to remove even configuration files and records:

# Run these commands as your normal login (e.g. "michael")
# Remove any existing versions of nginx
sudo apt-get remove '^nginx.*$'
# Setup a sources.list.d file for the nginx repository
cat << 'EOF' | sudo tee /etc/apt/sources.list.d/nginx.list
deb http://nginx.org/packages/ubuntu/ precise nginx
deb-src http://nginx.org/packages/ubuntu/ precise nginx
# Add nginx key
curl http://nginx.org/keys/nginx_signing.key | sudo apt-key add -
# install nginx
sudo apt-get update && sudo apt-get -y install nginx

then reinstall:

apt-get install nginx