I completely agree with this. Put down some type of paint/gelcoat mixed with anti-slip compound (Interlux makes one as well as many other manufacturers) and call it good. Boat manufacturers are actually getting smarter. I've noticed that most new boats have a removeable carpet system, underneath which is a non-skid surface. Take a look at some new boats to see how they do this, and copy it. That would be my advice if you absolutely must have carpet in your boat, but for goodness sake, PLEASE don't lay down a permanently installed, glued-down carpet. Boomyal has it dead on right here.
I would use indoor/outdoor carpet adhesive. It comes in latex and oil-based formulas and may be had at the Home Despot or Lowe's. Boat carpets do trap some stuff, however unlike your home's carpet, you can clean 'em with laundry soap, super clean or any other strong cleaner you have.
I personelly use red carpet. That way the blood doesn't show!
1. Install carpet throughout boat.
2. Get it wet from time to time.
3. Give mold/rot some time to develop & grow.
4. Junk boat or have a big restoration project.