Difference between revisions of "Install and Configure GeoServer"
(→GeoServer Connector installation) |
(→GeoServer Connector installation) |
||
Line 8: | Line 8: | ||
===GeoServer Connector installation=== | ===GeoServer Connector installation=== | ||
− | Here follow the steps to install the '''GeoServer Connector''' (version 0.1.0) in SmartGear: | + | Here follow the steps to install the '''GeoServer Connector''' (''version 0.1.0'') in SmartGear: |
− | 1. download the | + | 1. download the '''gcube-geoserver-connector''' source code from gCube repository (https://svn.research-infrastructures.eu/d4science/gcube/trunk/data-access/gcube-geoserver-connector/). |
2. compile the code using the pom.xml file to generate the JAR file ('''gcube-geoserver-connector-0.1.0-SNAPSHOT.jar'''). To compile please use ''maven 3'' and ''JDK 8''. | 2. compile the code using the pom.xml file to generate the JAR file ('''gcube-geoserver-connector-0.1.0-SNAPSHOT.jar'''). To compile please use ''maven 3'' and ''JDK 8''. | ||
− | 3. add ''gcube-geoserver-connector-0.1.0-SNAPSHOT.jar'' file in to '''/home/gcube/tomcat/webapps/geoserver/WEB-INF/lib''' folder of GeoServer Virtual Machine. | + | 3. add ''gcube-geoserver-connector-0.1.0-SNAPSHOT.jar'' file in to ''''/home/gcube/tomcat/webapps/geoserver/WEB-INF/lib'''' folder of GeoServer Virtual Machine. |
To access on GeoServer VM you need of the '''keypair''', the '''host''' (geoserver1-spatial-dev.d4science.org) and the '''user''' (gcube). | To access on GeoServer VM you need of the '''keypair''', the '''host''' (geoserver1-spatial-dev.d4science.org) and the '''user''' (gcube). | ||
− | 4. add GeoServerFilter filter in the web.xml (/home/gcube/tomcat/webapps/geoserver/WEB-INF) of GeoServer VM as follow: | + | 4. add GeoServerFilter filter in the '''web.xml''' (''/home/gcube/tomcat/webapps/geoserver/WEB-INF'') of GeoServer VM as follow: |
<filter> | <filter> | ||
<filter-name>gcubeAuthenticationFilter</filter-name> | <filter-name>gcubeAuthenticationFilter</filter-name> | ||
Line 28: | Line 28: | ||
</filter-mapping> | </filter-mapping> | ||
− | 5. edit the '''/home/gcube/tomcat/webapps/geoserver/WEB-INF/gcube-handlers.xml''' file to add the request handler as '''authentication-filter''' tag inside the '''request''' tag: | + | 5. edit the ''''/home/gcube/tomcat/webapps/geoserver/WEB-INF/gcube-handlers.xml'''' file to add the request handler as '''authentication-filter''' tag inside the '''request''' tag: |
<handlers> | <handlers> | ||
Line 43: | Line 43: | ||
''Please note that you need to edit steps 4 and 5 only the first time. If you change the source code you can jump these.'' | ''Please note that you need to edit steps 4 and 5 only the first time. If you change the source code you can jump these.'' | ||
− | 6. restart the service. In '''/home/gcube''' folder stop and start the server with these commands: | + | 6. restart the service. In ''''/home/gcube'''' folder stop and start the server with these commands: |
− | $ ./stopContainer.sh | + | gcube@geoserver1-spatial-dev:~$ ./stopContainer.sh |
− | $ ./startContainer.sh | + | gcube@geoserver1-spatial-dev:~$ ./startContainer.sh |
− | To see the log, you can open the '''/srv/geoserver_spatialite/data/logs/geoserver.log''' file | + | To see the log, you can open the ''''/srv/geoserver_spatialite/data/logs/geoserver.log'''' file |
Revision as of 10:30, 23 June 2017
Installation
SmartGears Installation
GeoServer Connector installation
Here follow the steps to install the GeoServer Connector (version 0.1.0) in SmartGear:
1. download the gcube-geoserver-connector source code from gCube repository (https://svn.research-infrastructures.eu/d4science/gcube/trunk/data-access/gcube-geoserver-connector/).
2. compile the code using the pom.xml file to generate the JAR file (gcube-geoserver-connector-0.1.0-SNAPSHOT.jar). To compile please use maven 3 and JDK 8.
3. add gcube-geoserver-connector-0.1.0-SNAPSHOT.jar file in to '/home/gcube/tomcat/webapps/geoserver/WEB-INF/lib' folder of GeoServer Virtual Machine. To access on GeoServer VM you need of the keypair, the host (geoserver1-spatial-dev.d4science.org) and the user (gcube).
4. add GeoServerFilter filter in the web.xml (/home/gcube/tomcat/webapps/geoserver/WEB-INF) of GeoServer VM as follow:
<filter> <filter-name>gcubeAuthenticationFilter</filter-name> <filter-class>org.gcube.data.access.connector.GeoServerFilter</filter-class> </filter>
<filter-mapping> <filter-name>gcubeAuthenticationFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
5. edit the '/home/gcube/tomcat/webapps/geoserver/WEB-INF/gcube-handlers.xml' file to add the request handler as authentication-filter tag inside the request tag:
<handlers> <lifecycle> <profile-management /> </lifecycle> <request> <request-validation /> <request-accounting /> <authentication-filter /> </request> </handlers>
Please note that you need to edit steps 4 and 5 only the first time. If you change the source code you can jump these.
6. restart the service. In '/home/gcube' folder stop and start the server with these commands:
gcube@geoserver1-spatial-dev:~$ ./stopContainer.sh gcube@geoserver1-spatial-dev:~$ ./startContainer.sh
To see the log, you can open the '/srv/geoserver_spatialite/data/logs/geoserver.log' file