When you install PostGIS from the OpenGeo Suite [link] on Ubuntu, you might notice that PostGIS Shapefile and DBF loader is missing from pgAdmin III plugins. This post explains the steps to get the plugin to work:
Install opengeo-postgis2-shapeloader using this command at terminal:
It gets installed in /usr/lib/postgresql/9.2/bin as shp2pgsql-gui. Now create a symbolic link for the same in /usr/bin directory. Prior to this you may want to check if the postgresql version you have is 9.2.
Now it's the time to edit plugins.d file. Use the following command to open the file for editing:
Paste the following contents at the end of the file:
Note: You may have to set the environment variable PGBINDIR on your machine. To check if the environment variable is already set type this on your terminal:
If an empty line appears as a result, it indicates that environment variable is not set. You will have to set it to /usr/bin (the location where the symbolic link for shapefile loader resides). For that use this command:
Once the above steps are done invoke pgAdmin III to see the 'PostGIS Shapefile and DBF Loader' listed under plugins.