当前位置:网站首页>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
边栏推荐
- [Title Fine brushing] 2023 Hesai FPGA
- LINQ query
- C language student achievement ranking system
- leetcode 91. Decode ways (medium)
- Yyds dry goods counting tail recursion is better than recursion
- LINQ 查詢
- leetcode 91. Decode Ways 解码方法(中等)
- You can also do NLP (classification)
- Day575: divide candy
- Add / get and delete cookies
猜你喜欢

Read Amazon memorydb database based on redis

Overview of visual object detection technology based on deep learning

OSPF综合实验

Day367: valid complete square

Autumn move script C
![[hdu] P6964 I love counting](/img/ff/f8e79d28758c9bd3019816c8f46723.png)
[hdu] P6964 I love counting

Development status of full color LED display

SFOD:无源域适配升级优化,让检测模型更容易适应新数据

LeetCode 206. Reverse linked list (iteration + recursion)

OSPF experiment in mGRE environment
随机推荐
Dual cross domain: access allow origin header contains multiple values "*, *", but only one is allowed
Up the Strip
OOP multiple storage (class template)
SAP ui5 application development tutorial 102 - detailed explanation of the print function of SAP ui5 applications
Cadence spb17.4 - Allegro - optimize and specify the polyline connection angle of a single electrical line - polyline to arc
Learn the specific technical learning experience of designing reusable software from the three levels of class, API and framework
Day260: the number III that appears only once
Vscade personalization: let a cute girl knock the code with you
leetcode 91. Decode Ways 解码方法(中等)
JS image resolution compression
MySQL-Seconds_ behind_ Master accuracy error
SQL programming task02 job - basic query and sorting
Template specialization template <>
关于打算做一个web的问题看板,需要使用哪些方面语言及数据库知识!
Hierarchy selector
"Hearing" marketing value highlights, Himalaya ushers in a new situation
Pat class A - 1012 the best rank (PIT)
Ansible learning summary (7) -- ansible state management related knowledge summary
Vector 2 (friend and copy construction)
[Luogu] P2887 Sunscreen G