Centos7安裝PostgresSQL
sudo yum update -y
sudo yum install -y https://download./pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo yum install -y postgresql13-server postgresql13
sudo rpm -qi postgresql13-server
sudo /usr/pgsql-13/bin/postgresql-13-setup initdb sudo systemctl enable postgresql-13 sudo systemctl start postgresql-13 # 停止數(shù)據(jù)庫 sudo systemctl stop postgresql-13
vim /var/lib/pgsql/13/data/postgresql.conf listen_addresses = '*'
vim /var/lib/pgsql/13/data/pg_hba.conf 主要就是在ip4下加 # IPv4 local connections: host all all 0.0.0.0/0 trust 修改postgres密碼 su postgres psql alter user postgres with password 'postgres';
#登陸postgresql sudo -u postgres psql #修改i登陸postgresql密碼 alter user postgres with password 'postgres';
firewall-cmd --zone=public --add-port=5432/tcp --permanent firewall-cmd --reload # 查看是否開放 firewall-cmd --query-port=5432/tcp 安裝PostGIS
EPEL存儲庫中有許多依賴項,運行以下命令在CentOS 7計算機中安裝epel存儲庫: sudo yum -y install epel-release
sudo yum -y install postgis31_13 |
|
來自: HUC王子 > 《數(shù)據(jù)庫》