Time for action – adding a new shapefile
We already added a single shapefile data store, now we want to upload a new shapefile and configure it on GeoServer. And, of course, we are going to use only HTTP operations to accomplish the task.
We will use a new layer from the Natural Earth repository. We will use a small shapefile, that is, the small-scale world admin boundaries:
~$ wget http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/cultural/110m-admin-0-countries.zip
Don't uncompress the archive; we will forward it to GeoServer in the ZIP format, and we will use a PUT operation. Note that to the header specifying the content type, we are transferring a zip file to GeoServer; this way we can publish a data set on a remote node without accessing the remote filesystem. We are also creating a new data store,
Natural+Earth+Countries
; the URL points to this nonexistent data store:curl -u admin:password -XPUT -H 'Content-type: application/zip' -T /home/stefano/110m-admin...