In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
1. Go to the official website to download the required version of https://www.postgresql.org/download/linux/redhat/
2. Start the installation
Yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm-y
Yum install postgresql12-y
Yum install postgresql12-server-y
3. Database initialization and setup self-startup
/ usr/pgsql-12/bin/postgresql-12-setup initdb
Systemctl enable postgresql-12
Systemctl start postgresql-12
This step initializes the database command to create a folder named 12 in the / var/lib/pgsql directory, and 12 is the database version. If there is already a corresponding version of the folder here, an error will be reported in the initialization step. You need to delete the corresponding folder and initialize it.
4. A linux login user named postgres will be created by default, and the password will be changed here.
5. Modify the configuration file
Modify postgresql.conf: # listen_addresses = 'localhost' is listen_addresses =' *'
5.2 modify pg_hba.conf
Before modification
After modification
And restart
Systemctl restart postgresql-12
6. Set the account secret of login database
Su postgres # cannot log in with root user, switch to normal user
Psql-U postgres
\ password # set user password
Select version (); # View version
7. Log in and test the database connection
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.