Hi,

A very flexible way is to import data into a local PostGIS database with osm2pgsql and publish the osm_point, osm_line and osm_polygon tables as WFS feature types with Geoserver. Geoserver offers an vendor option to output WFS as zipped shapefiles.

Of course, if you have OSM data in a local PostGIS database you do not need WFS really. Most open source GIS softwares can query data directly from PostGIS.