Setting up the database
Because the ShapeEditor will make heavy use of PostGIS, we first need to set up a PostgreSQL user and database for the ShapeEditor to use and then enable the PostGIS extension for this database. Let's do that now:
Open a terminal or command-line window and type the following:
createuser -P shapeeditor
Tip
Don't forget to add the
-U postgres
command-line option or usesudo
for this command if you need to run Postgres under a different user account.You will be prompted to enter a password for the
shapeeditor
Postgres user. Make sure you remember the password you use, as you'll need to use it when setting up the ShapeEditor so that it can access the database.We next need to create the database itself:% createdb shapeeditor
Tip
Once again, add the
-U
command-line option, or usesudo
if you need to.We then need to tell Postgres that the
shapeeditor
user can access theshapeeditor
database:% psql -c "GRANT ALL PRIVILEGES ON DATABASE shapeeditor TO shapeeditor; "
Finally...