Testing Environment:
- OS: MacOS 10.13
- Virtualization: VirtualBox + Vagrant
Launch Centos 7 VM
- Vagrantfile
Vagrant.configure("2") do |config|
### Postgresql Host
config.vm.define "pg" do |node|
node.vm.hostname = "pg"
node.vm.box = "centos/7"
end
end
|
- vagrant up pg
- vagrant ssh pg
- sudo yum update -y
- sudo yum install -y epel-release
- sudo yum repolist
Install Postgresql
-
sudo yum install -y postgresql-server
-
sudo postgresql-setup initdb
-
sudo systemctl enable postgresql
-
sudo systemctl start postgresql
-
sudo su - postgres
-
psql -c "select version()"
-
Install PostGIS
- sudo yum install -y postgis
-
sudo su - postgres
- createdb test
- psql test
- CREATE EXTENSION postgis;
- CREATE EXTENSION postgis_topology;