当前位置:网站首页>Centos7 installing postgresql12
Centos7 installing postgresql12
2022-06-23 01:26:00 【Halyace】
One 、 Environmental Science
- System :Centos7.9
- Mirror source : Alibaba cloud PostgreSQL
Two 、 Configure image source
# establish repo Mirror source files
touch /etc/yum.repos.d/pgsql12.repo
# Edit profile
vi /etc/yum.repos.d/pgsql12.repo
- pgsql12.repo Reference resources :
[pgdg12]
name=PostgreSQL 12 for RHEL/CentOS $releasever - $basearch
baseurl=https://mirrors.aliyun.com/postgresql/repos/yum/12/redhat/rhel-$releasever-$basearch
enabled=1
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/postgresql/repos/yum/RPM-GPG-KEY-PGDG
repo_gpgcheck = 1
# to update yum cache
yum makecache
3、 ... and 、 Install and configure PostgreSQL12
# install postgresql12-server
yum install postgresql12-server
# Edit the service configuration Modify the database directory location
# Environment=PGDATA=/opt/pgsql/12/data
vi /usr/lib/systemd/system/postgresql-12.service
# Initialize database
/usr/pgsql-12/bin/postgresql-12-setup initdb
# Modify the configuration file Allow connections from any host
# listen_addresses = '*'
vi /opt/pgsql/12/data/postgresql.conf
# Modify the configuration file Authorized host password connection
# host all all 0.0.0.0/0 md5
vi /opt/pgsql/12/data/pg_hba.conf
# Start the service
systemctl start postgresql-12.service
# Boot up automatically
systemctl enable postgresql-12.service
# Switch to postgres user
su -l postgres
# Sign in pg database
psql
# Set up postgres password
\password postgres
Four 、 Firewall configuration
# release postgresql service
firewall-cmd --zone=public --add-service=postgresql --permanent
# Overloaded firewall
firewall-cmd --reload
边栏推荐
- [learning notes] roll back Mo team
- Node fetch download file
- How about precious metal spot silver?
- Extend your kubernetes API using the aggregation API
- office2016+visio2016
- [hdu] p1466 calculate the number of intersections of straight lines
- Lexical Sign Sequence
- SAP ui5 application development tutorial 102 - detailed trial version of print function implementation of SAP ui5 application
- cadence SPB17.4 - allegro - 優化指定單條電氣線折線連接角度 - 折線轉圓弧
- Real topic of the 2020 Landbridge cup provincial competition - go square (dp/dfs)
猜你喜欢

基于深度学习的视觉目标检测技术综述

Installing MySQL for Linux

How to calculate the position of gold ETF

Steps to implement a container global component

Read Amazon memorydb database based on redis

3D打印微组织

Day367: valid complete square

JMeter associated login 302 type interface

Autumn move script a

SQL programming task05 job -sql advanced processing
随机推荐
C# SerializableDictionary序列化/反序列化
Vscade personalization: let a cute girl knock the code with you
A hundred lines of code to realize reliable delay queue based on redis
Steps to implement a container global component
Shell view help
【机器学习-西瓜书】更文挑战【Day1】:1.1 引言
Development status of full color LED display
LeetCode 206. 反转链表(迭代+递归)
时间复杂度
Installing MySQL for Linux
魔王冷饭||#099 魔王说西游;老板的本质;再答中年危机;专业选择
Huawei cloud recruits partners in the field of industrial intelligence to provide strong support + commercial realization
Vector 1 (classes and objects)
SYSTEMd summary
OSPF experiment in mGRE environment
Binary String
Found several packages [runtime, main] in ‘/usr/local/Cellar/go/1.18/libexec/src/runtime;
You can also do NLP (classification)
New progress in the construction of meituan's Flink based real-time data warehouse platform
Hierarchy selector