Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account


CentOS 7.5 1804 yum install Postgre

2024-05-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >


Shulou( Report--

1. Preparatory work:

1.postgresql official website:

two。 Download page:

3.Red Hat Family Linux (including CentOS/Fedora/Scientific/Oracle) download page:

4. The system used in this paper is: centos 7.51804

5. You can use the following URL to find the corresponding postgresql yum installation page:


Second, the system executes the command:

1.yum install-y

Yum-y install postgresql11yum-y install postgresql11-server/usr/pgsql-11/bin/postgresql-11-setup initdbsystemctl enable postgresql-11systemctl start postgresql-11

3. Open the PostgreSQL port (this step can be ignored if the firewall is off) firewall-cmd-- zone=public-- add-port=5432/tcp-- permanentfirewall-cmd-- reloadfirewall-cmd-- list-ports

4. Set the password for postgres

Last login: Fri Jul 19 17:13:49 CST 2019 on pts/0

-bash-4.2$ psql-U postgres

Psql 11.4

Type "help" for help.

Postgres=# ALTER USER postgres with encrypted password 'welcome1'


Postgres=#\ Q

-bash-4.2$ exit


Fifth, set up remote access


Vim / var/lib/pgsql/11/data/postgresql.conf

After opening it, you can find: listen_addresses is modified to:

Listen_addresses =''

The IP address to listen on; a comma-separated list of addresses; the default is' localhost'; for all'. Save and close after modification.


Vim / var/lib/pgsql/11/data/pg_hba.conf

After opening the text, the new content is as follows:

Host all all md5

Save and close editing after the modification is complete.

six. Restart the postgres database

Systemctl restart postgresql-11

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To



© 2024 SLNews company. All rights reserved.