Note that GeoServer versions 1.5.4 and above already include this definition, so no additional server side configuration is needed to overlay on OpenLayers as long as you are using the latest versions.

Note that GeoServer's WKT uses a special PROJECTION parameter which will probably not be supported by other software.

In PostGIS, you can run this sql script to add the correct projection setting:

The SphericalMercator projection in OpenLayers uses code epsg:900913. When Google started to use the SphericalMercator projection, a corresponding EPSG code did not yet exist, so a temporary code '900913' (notice the resemblance to the word 'google') was invented. Many other services, such as OpenStreetMap, Bing and Yahoo are now also using the same projection, but are not necessarily supporting the use of code EPSG:900913. Other codes, such as EPSG:3857 and EPSG:102113 were invented. Today, there is an officially registered EPSG code 3857 whose projection is identical to EPSG:900913. (http://www.epsg-registry.org/export.htm?gml=urn:ogc:def:crs:EPSG::3857). So, if you need to combine overlay layers that are using either an alias or the official EPSG code with an OpenLayers SphericalMercator layer, you have to make sure that OpenLayers requests EPSG:3857 or other alias in stead of EPSG:900913. You can accomplish this by overriding the layer projection before adding the layer to the map. For example: