In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Preparatory work:
1.postgresql official website: https://www.postgresql.org
two。 Download page: https://www.postgresql.org/download/
3.Red Hat Family Linux (including CentOS/Fedora/Scientific/Oracle) download page: https://www.postgresql.org/download/linux/redhat/
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:
Https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm
Second, the system executes the command:
1.yum install-y https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm
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'
ALTER ROLE
Postgres=#\ Q
-bash-4.2$ exit
Logout
Fifth, set up remote access
Command:
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.
Command:
Vim / var/lib/pgsql/11/data/pg_hba.conf
After opening the text, the new content is as follows:
Host all all 0.0.0.0/0 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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.