Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- After you have installed you postgres and pgadmin3, follow these steps
- reset the password for the ‘postgres’ admin account for the server
- sudo su postgres -c psql template1
- template1=# ALTER USER postgres WITH PASSWORD ‘password’;
- template1=# \q
- That alters the password for within the database, now we need to do the same for the unix user ‘postgres’:
- sudo passwd -d postgres
- sudo su postgres -c passwd
- Now enter the same password that you used previously.
- 2. /etc/postgresql/8.2/main/postgresql.conf
- Now, to edit a couple of lines in the ‘Connections and Authentication’ section
- listen_addresses = ‘*’
- password_encryption = on
- 3. /etc/postgresql/8.4/main/pg_hba.conf
- # DO NOT DISABLE!
- # If you change this first entry you will need to make sure that the
- # database
- # super user can access the database using some other method.
- # Noninteractive
- # access to all databases is required during automatic maintenance
- # (custom daily cronjobs, replication, and similar tasks).
- #
- # Database administrative login by UNIX sockets
- local all postgres ident
- # TYPE DATABASE USER CIDR-ADDRESS METHOD
- # "local" is for Unix domain socket connections only
- local all all ident
- # IPv4 local connections:
- #host all all 127.0.0.1/32 md5
- host all all 127.0.0.1 255.255.255.255 trust
- # IPv6 local connections:
- host all all ::1/128 md5
- ===========================================================
- Taken from
- http://www.ubuntugeek.com/howto-setup-database-server-with-postgresql-and-pgadmin3.html
- http://www.forosdelweb.com/f99/conectar-postgresql-con-pgadmin3-424533/
- =======================================================
- Instalación de Postgis
- =======================================================
- If you have installed postgres and postgis from apt, so you can follow up these steps
- sudo -u postgres createdb geo_db
- sudo -u postgres createlang plpgsql geo_db
- sudo -u postgres psql -d geo_db -f /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql
- sudo -u postgres psql -d geo_db -f /usr/share/postgresql/8.4/contrib/postgis-1.5/spatial_ref_sys.sql
- sudo -u postgres psql -d geo_db -f /usr/share/postgresql/8.4/contrib/postgis_comments.sql
- ================================================================
- Taken from
- http://kjoller.eu/blog/en/2011/03/25/installation-af-postgis-pa-debian-60/
- ========================================================
- comandos sql for postgis
- =======================================================
- Select ST_AsEWKT(the_geom) from "Huanuco" LIMIT 5;
- Select ST_AsText(the_geom) from "Huanuco" LIMIT 5;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement