In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to install postgreSQL11 on the CentOS7 system". In the daily operation, I believe many people have doubts about how to install postgreSQL11 on the CentOS7 system. The editor consulted all kinds of materials and sorted out a simple and easy-to-use method of operation. I hope it will be helpful to answer the doubt of "how to install postgreSQL11 on the CentOS7 system". Next, please follow the editor to study!
1. Add a PostgreSQL Yum repository
Sudo yum install https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm
two。 Install PostgreSQL Server and client packages
Sudo yum-y install postgresql11-server postgresql11
3. Initialize the database and enable automatic startup
# initialize sudo / usr/pgsql-11/bin/postgresql-11-setup initdb# Boot sudo systemctl start postgresql-11# Settings Boot self-boot sudo systemctl enable postgresql-11# the following two configurations are about firewall (I didn't use it) sudo firewall-cmd-- add-service=postgresql-- permanentsudo firewall-cmd-- reload
4. Enable remote access to PostgreSQL (the purpose is to connect to your database through the public network, provided you have a public network ip)
# my path is like vi / var/lib/pgsql/11/data/postgresql.conf# modify listen_addresses ='*'# my path is like this sudo vim / var/lib/pgsql/11/data/pg_hba.conf# modify host all all 127.0.0.1 to 32 md5# add host all all 0.0.0.0 to 0 trust# restart sudo systemctl restart postgresql-11
5. Set the password for the PostgreSQL administrator user (be sure to configure the username and password in this format)
Sudo su-postgrespsql-c "alter user postgres with password '123456'"
It should be noted that if it is a CVM, you need to open the corresponding port. That's what I suffered, and it took me a long time.
At this point, the study on "how to install postgreSQL11 on a CentOS7 system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.