微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

centos 8 安装 PostgreSQL-10

下载 Postgresql-10软件包

官网地址:https://www.postgresql.org/

image

选择自己的版本

image

此处已postgresql-10.16-2-linux-x64.run安装为例进行安装说明

下载地址:https://get.enterprisedb.com/postgresql/postgresql-10.16-2-linux-x64.run

第一步上传安装包至服务器

postgresql-10.16-2-linux-x64.run

第二步开始安装

[root@sonar1 /]# ./postgresql-10.16-2-linux-x64.run

Welcome to the Postgresql Setup Wizard.

Please specify the directory where Postgresql will be installed.
Installation Directory [/opt/Postgresql/10]:

Select the components you want to install; clear the components you do not want
to install. Click Next when you are ready to continue.
Postgresql Server [Y/n] :Y
pgAdmin 4 [Y/n] :
Stack Builder [Y/n] :
Command Line Tools [Y/n] :
Is the selection above correct? [Y/n]:

Please select a directory under which to store your data.
Data Directory [/opt/Postgresql/10/data]:

Please provide a password for the database superuser (postgres). A locked Unix
user account (postgres) will be created if not present.
Password :
Retype password :

Please select the port number the server should listen on.
Port [5432]:

Advanced Options
Select the locale to be used by the new database cluster.
Locale
[1] [Default locale]
[2] C
[3] C.utf8
[4] en_AG
[5] en_AU
[6] en_AU.utf8
[7] en_BW
[8] en_BW.utf8
[9] en_CA
[10] en_CA.utf8
[11] en_DK
[12] en_DK.utf8
[13] en_GB
[14] en_GB.iso885915
[15] en_GB.utf8
[16] en_HK
[17] en_HK.utf8
[18] en_IE
[19] en_IE@euro
[20] en_IE.utf8
[21] en_IL
[22] en_IN
[23] en_NG
[24] en_NZ
[25] en_NZ.utf8
[26] en_PH
[27] en_PH.utf8
[28] en_SC.utf8
[29] en_SG
[30] en_SG.utf8
[31] en_US
[32] en_US.iso885915
[33] en_US.utf8
[34] en_ZA
[35] en_ZA.utf8
[36] en_ZM
[37] en_ZW
[38] en_ZW.utf8
[39] POSIX
[40] zh_CN
[41] zh_CN.utf8
[42] zh_HK.utf8
[43] zh_SG
[44] zh_SG.utf8
[45] zh_TW.euctw
[46] zh_TW.utf8
Please choose an option [1] : 41
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Pre Installation Summary
The following settings will be used for the installation::
Installation Directory: /opt/Postgresql/10
Server Installation Directory: /opt/Postgresql/10
Data Directory: /opt/Postgresql/10/data
Database Port: 5432
Database Superuser: postgres
Operating System Account: postgres
Database Service: postgresql-10
Command Line Tools Installation Directory: /opt/Postgresql/10
pgAdmin4 Installation Directory: /opt/Postgresql/10/pgAdmin 4
Stack Builder Installation Directory: /opt/Postgresql/10
Press [Enter] to continue:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Setup is Now ready to begin installing Postgresql on your computer.
Do you want to continue? [Y/n]:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Please wait while Setup installs Postgresql on your computer.
Installing
0% ______________ 50% ______________ 100%
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Setup has finished installing Postgresql on your computer.

第三步验证安装成功并启动

[root@sonar1 /]#
[root@sonar1 /]# netstat -an |grep 5432
tcp        0      0 0.0.0.0:5432            0.0.0.0:*               LISTEN

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。