How do I put page numbers only on certain pages?

I’ve been struggling with this for a long time now. I have to put numbers on all pages except first and last one. I want the numbering to start on page 2, starting with number 2, and to finish with the page before the last one. Please help. Thank you in advance

See http://forum.openoffice.org/en/forum/viewtopic.php?f=71&t=1221 - Tutorial Page numbering.
In short: use different page styles for handling pages with different headers and/or footers. Here you’d need two.