-
Notifications
You must be signed in to change notification settings - Fork 96
Building instructions
Get the source as usual from github.
The git
command line should be something like
git clone git@github.com:geosolutions-it/geostore.git geostore
Geostore is released with a default configuration that use an in-memory DB for quick running, usefull for evaluation and tests. If your git working directory is called geostore, enter in the sub directory src and type the command:
#geostore/src$ mvn clean install
for build geostore with the default profile wich provide support only for H2 DBMS configured to run in-memory. Once you have finished the build process, go into geostore\src\server\web\app and type the command:
#geostore/src/server/web/app$ mvn jetty:run
this command launch geostore in jetty Servlet container, you can see the exposed service at URL:
http://localhost:8181/geostore/rest
Obviously you can also take the created war archive in your local .m2 repository and deploy it on other servlet containers.
In order to be able to run the psql and createdb commands, you must first set in the "PATH" environment variable the path to the /bin folder of Postgres. The follow commands are referred to the Postgres use.
- Create a PostgreSQL DB called "geostore" (PostGis support is not required).
You may need to run these commands as userpostgres
in the windows Console.
C:\currentDir>createdb -U postgres geostore
- Run the sql script
doc/sql/001_setup_db.sql
on geostore db; it will create the users:
-
geostore
with pwgeostore
-
geostore_test
with pwgeostore_test
and schemas `geostore` and `geostore_test`. You may need to run these commands as user `postgres`.
C:\currentDir>psql -U postgres -d geostore -f YOUR_GEOSTORE_DIR/doc/sql/001_setup_db.sql
- Run the sql script
doc/setup/sql/002_create_schema_postgres.sql
on geostore db, geostore schema; it will create the base tables, indices, etc. Thegeostore_test
schema will be automatically recreated during tests.
C:\currentDir>psql -U geostore -d geostore -f YOUR_GEOSTORE_DIR/doc/sql/002_create_schema_postgres.sql
Note that you are logging in postgres as usergeostore
, so you will be asked for user password, that's set as geostore
as stated above.
The follow commands are referred to the Postgres use.
- Create a PostgreSQL DB called "geostore" (PostGis support is not required).
You may need to run these commands as userpostgres
.
createdb geostore
- Run the sql script
doc/sql/001_setup_db.sql
on geostore db; it will create the users:
-
geostore
with pwgeostore
-
geostore_test
with pwgeostore_test
and schemas `geostore` and `geostore_test`. You may need to run these commands as user `postgres`.
psql -d geostore -f YOUR_GEOSTORE_DIR/doc/sql/001_setup_db.sql
- Run the sql script
doc/sql/002_create_schema_postgres.sql
on geostore db, geostore schema; it will create the base tables, indices, etc. Thegeostore_test
schema will be automatically recreated during tests.
psql -U geostore -d geostore -f YOUR_GEOSTORE_DIR/doc/sql/002_create_schema_postgres.sql
Note that you are logging in postgres as usergeostore
, so you will be asked for user password, that's set as geostore
as stated above.
After you have installed the Oracle DMBS (10g or 11g) in your system you have to following the steps below to obtain a simple installation:
-
Access to the Oracle Enterprise Manager control page at:
YOUR_HOST:1158/em
and go to the 'Administration' section.
-
Create a new User named GEOSTORE with password 'geostore' and sufficient rights to read and write own schema. For example you can enable CONNECT and DBA rules.
-
Connect to the database using a proper tool like DbVisualizeror Oracle SQL Developer using the newly created user with:
- username: geostore
- password: geostore
-
Run the sql script
doc/sql/002_create_schema_oracle.sql
on GEOSTORE schema; It will create the base tables, indices, etc.
Enter the src/
directory and launch:
-
If you are using PostgreSQL
mvn clean install -Dovrdir=postgres -Ppostgres
-
If you are using Oracle
mvn clean install -Dovrdir=oracle -Poracle
Due to Oracle license restriction, there is NO public Maven repository provides Oracle JDBC driver. To use the Oracle jdbc drive with Maven, you have to install it manually into your Maven local repository.
Without this JDBC driver installed, the previous mvn command will not work !
Below the steps to follow to add an Oracle JDBC driver ( ojdbc6.jar ) into your Maven local repository:
-
Download manually the Oracle JDBC driver from [Oracle web site](http://www.oracle.com/technetwork /database/features/jdbc/index-091264.html).
-
Install the Oracle jdbc driver using the command below:
mvn install:install-file -Dfile={YOU_JDBC_DIR/ojdbc6.jar} -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar
-
You may want to use the profile extjs
in order to have services offering output in EXT json format. For example:
mvn clean install -Pextjs,postgres
The maven install command will create a .war file:
-
src/server/web/app/target/geostore.war
: the geostore service
It will also make available the GeoStore client jar as maven artifact
<dependency>
<groupId>it.geosolutions.geostore</groupId>
<artifactId>geostore-rest-client</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
(The current code may have a later version for the client)
You can run the webapp using the embedded Jetty http server.
In order to run GeoStore, enter into the directory src/server/web/app
and run the command
mvn jetty:run
adding the extjs profile -Pextjs
if needed.