
My question is, how would I have to arrange a bunch of magnets to invert this system and still have it work?
Old fashioned MS Paint diagram for explanation:

I want to have a long tube (PVC or whatever) with small neodymium magnets embedded in the wall throughout its length. Inside the tube will be a solenoid attached to some other circuitry such that when the solenoid slides through the pipe, it provides power to the circuitry.
Can I get away with one row of magnets all aligned with their poles in the same direction, for example North always facing the inside of the pipe?
If I have to make two opposing rows across 180 degrees apart from each other like in the diagram, how do I orient their poles with respect to the other row? Always the same pole facing inwards? One inwards and one outwards?
I'm only concerned with the solenoid moving in one direction, let's say "forwards" and I want to produce DC so no rectification would be necessary.
Any E&M buffs around here?