For the first object you want rotating you have to create basically two brushes.
The first one is the object you want seen by the player. The second one is the origin brush. Now for a fan I usually create a block right in the middle stretching from top to bottom, this one must be textured in the origin texture (found in the halflife.wad)
Now select both of them and turn them into a func_rotating entity. You have to check the flag "start on" if you want it to ehm... start on

That is all you have to do, no need for any other flags or settings (other then sound and speed perhaps). By default it will always rotate on the z-axis if no other axis flags have been selected.

The second part is even easier then you might think. Just set the yaw part in the direction you want the door to move from closed to open. This is related to the topdown view in Hammer, yaw is the direction the door will go. For a door to move up or down (into floor or ceiling) you can set these to up or down from the pulldown menu. But since you want them to move into walls, you can simply set the yaw in the opening direction of the door.