get an external hard drive (usb most likely) and disk image your internal hard drive to the external drive.Replace your hard drive and then disk image the external hard drive to your new internal hard drive.
you can either buy a external hard drive and transfer all your data to that, and make more room on your computer. or you can buy a internal hard drive and use both of them at the same time.
Back everything up on another computer or on an external hard drive, then put in your new hard drive and copy everything back on your computer after your done installing the OS.