1. Update the yum source The PostgreSQL version of the default yum repository of CentOS7 is too old and is not suitable for use in this version. Find the RPM source suitable for CentOS7 at https://yum.postgresql.org/repopackages.php, copy its URL address, and install it using yum. At the same time, install epel (Extra Packages for Enterprise Linux 7). For stability, the default yum source of CentOS7 lacks many components, which can be found on epel. Order: yum install -y https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm yum -y install epel-release 2. Install PostgreSQL Use the yum search postgre command to see multiple versions of PostgreSQL. Here I choose PostgreSQL10. yum install -y postgresql10-server postgresql10-contrib Initialize /usr/pgsql-10/bin/postgresql10-setup initdb Set boot startup systemctl enable postgresql-10 Start the database systemctl start postgresql-10 3. Configure the database
If all IP addresses are required to log in using a password, configure it as host all all 0.0.0.0/0 md5. 4. Install PostGIS Use the yum search postgis command to see multiple versions of PostGIS. Here I choose postgis25, yum install -y postgis25_10. After the installation is complete, switch to the postgres user and enable the extension. // Enable plugin# su postgres # psql // Enable the pgsql plugin postgres=# create extension postgis; postgres=# create extension postgis_topology; postgres=# create extension fuzzystrmatch; postgres=# create extension address_standardizer; postgres=# create extension address_standardizer_data_us; postgres=# create extension postgis_tiger_geocoder; At this point, PostgreSQL and PostGIS are installed. Summarize The above is what I introduced to you about how to install PostgreSQL and PostGIS on CentOS7 using yum. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time! You may also be interested in:
|
<<: How to limit the value range of object keys in TypeScript
>>: Quickly master how to get started with Vuex state management in Vue3.0
I installed MySQL smoothly in Ubuntu 16.04 before...
Table of contents Preface 1. Cause of the problem...
Table of contents 1. Installation 2. Import in ma...
In order to centrally manage the images we create...
This article introduces how to create an index on...
The difference between := and = = Only when setti...
The first step is to add the corresponding databa...
I have previously written an article about file t...
The CSS counter attribute is supported by almost ...
HTML stands for Hypertext Markup Language. Nowada...
Recently, I encountered a requirement to display ...
As we all know, binlog logs are very important fo...
There are two ways to install MySQL 5.7. One is t...
This article records the specific method of insta...
Table of contents Short Introduction 1. Check the...