how can I change my B2 visa to F2 visa, while i am in the States?

I am currently in USA with visitors visa /B2 and i am authorized to stay here for 5 more months, i want to get married with my boy friend who is a student here and has got F1 visa,

  1. can i apply for F2 visa after registering the marriage, while I am here?

  2. If yes, how long does it take approximately to receive my F2 visa ?

  3. And do i need to leave USA to change my status?

  4. What documents do I need to receive F2 visa?