Registration for GRE

Hi

How soon should I register for the computer based GRE test? I need the score for PhD admissions in December.
I still need time to learn so I don’t want to rush but I don’t want to be too late either.

Thank You

edit: I have another question. Do you require a Master’s degree for the application to the PhD - or can you apply while still working on the master’s degree?