I'm not so sure there is one thread devoted to replacing carpet per say. However, there are tons of boat projects on these threads and forums and many have replaced their carpet. So I suggest you search for key words about marine carpet and take a look. I am pretty sure you will find lots of such ideas.
Basically remove the old carpet and clean the carpet remains from the surface in prep to re-carpet. Some times that is a chore in itself. Some use Acetone to help with that effort and others sand and scrap, whatever works best for you. Once you have the surface prepped, then it is time to cut the new carpet to fit into the area. I used a template myself to get the carpet cut pretty close to the area I was covering. That way I could finish cutting it when installing it for a prefect fit. But again, whatever works best for you.
One thing to remember, carpet has a grain or direction to it. So however you start installing your carpet, the rest has to go in in the same direction. Otherwise you will see a color difference when finished. There are so many types of glue people use that again, that is up to you. Some use Weld Wood adhesive and some use a water based glue. Search and read and then buy what you like the best.
Other then that, there is no on-way-only to carpet your boat. With that stated, just make sure whatever carpet you select, make sure it is for marine applications. JMHO