Child pages
  • New Server Page
Skip to end of metadata
Go to start of metadata

URL: dystopia.uc.nps.edu

Database: dystopia_test

User: gis

Password: <is required, ask administrator>

Port: 5222 (changed from 5432)

 

DB Cluster location: /var/lib/pgsql/data

  • install PostgreSQL
  • install PostGIS
  • Open port 5432 for PostgreSQL remote connections (link)
  • Export previous Dystopia database from old server
  • Import/create Dystopia database on new server

Install PostgreSQL 8.4.20

>sudo yum install postgresql-server
>sudo service postgresql initdb
>sudo chkconfig postgresql on
///add users/roles permissions using psql


Open port

///open port in firewall
>sudo vi /etc/sysconfig/iptables
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5432 -j ACCEPT
>sudo service iptables restart

 

Install PostGIS 1.5

>sudo yum install postgis
>sudo su postgres
>cd /usr/share/pgsql/contrib
>psql -d dystopia_test -f postgis-64.sql
>cd postgis-1.5
>psql -d dystopia_test -f spatial_ref_sys.sql
 

 

Export from old database

>pg_dump dystopia_test > database_dump.sql

Input to new database

>sudo su postgres
>psql -f database_dump.sql


To Restart PostgreSQL

>sudo su postgres
>pg_ctl restart -D /var/lib/pgsql/data

 

  • No labels